<p dir="auto">I just upgraded our project from symfony2.4 to symfony2.6, everything went fine except web profiler is not working correctly, when I page source code, I found web profiler's javascript code are being included twice.</p>
<p dir="auto">And after web page is loaded, profiler alert "404 message".</p>
<p dir="auto">I temporary fixed this problem by adding this code: Symfony/Component/HttpKernel/EventListener/ProfilerListener.php</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/**
 * Handles the onKernelResponse event.
 *
 * @param FilterResponseEvent $event A FilterResponseEvent instance
 */
public function onKernelResponse(FilterResponseEvent $event)
{
    // Start temporary fix
    static $ran = false;

    if (!$ran) {
        $ran = true;
        return;
    }
    // End temporary fix

    $master = $event-&gt;isMasterRequest();
    if ($this-&gt;onlyMasterRequests &amp;&amp; !$master) {
        return;
    }"><pre class="notranslate"><span class="pl-c">/**</span>
<span class="pl-c"> * Handles the onKernelResponse event.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * @param FilterResponseEvent $event A FilterResponseEvent instance</span>
<span class="pl-c"> */</span>
<span class="pl-k">public</span> <span class="pl-k">function</span> onKernelResponse(<span class="pl-smi"><span class="pl-smi">FilterResponseEvent</span></span> <span class="pl-s1"><span class="pl-c1">$</span>event</span>)
{
    <span class="pl-c">// Start temporary fix</span>
    <span class="pl-k">static</span> <span class="pl-s1"><span class="pl-c1">$</span>ran</span> = <span class="pl-c1">false</span>;

    <span class="pl-k">if</span> (!<span class="pl-s1"><span class="pl-c1">$</span>ran</span>) {
        <span class="pl-s1"><span class="pl-c1">$</span>ran</span> = <span class="pl-c1">true</span>;
        <span class="pl-k">return</span>;
    }
    <span class="pl-c">// End temporary fix</span>

    <span class="pl-s1"><span class="pl-c1">$</span>master</span> = <span class="pl-s1"><span class="pl-c1">$</span>event</span>-&gt;<span class="pl-en">isMasterRequest</span>();
    <span class="pl-k">if</span> (<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">onlyMasterRequests</span> &amp;&amp; !<span class="pl-s1"><span class="pl-c1">$</span>master</span>) {
        <span class="pl-k">return</span>;
    }</pre></div>
<p dir="auto">Can someone upgraded to 2.6, help me a way to solve this problem?</p>
<p dir="auto">Picture of code duplicated <a href="http://i.stack.imgur.com/sW2DY.jpg" rel="nofollow">http://i.stack.imgur.com/sW2DY.jpg</a></p>
<p dir="auto">Whenever starting with an incognito or clean cache browser in any app in any browser</p>
<p dir="auto">I am getting Warning: session_start(): The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9</p>
<p dir="auto">Whenever reloading it works and also whenever I try to debug with phpstorm it gives no problems, however this is a problem because whenever i use sahi and try to test it blocks because of this issue</p>
<p dir="auto"><a href="http://www.craftitonline.com/2011/07/symfony2-keep-your-project-guided-with-behat-and-mink/" rel="nofollow">http://www.craftitonline.com/2011/07/symfony2-keep-your-project-guided-with-behat-and-mink/</a> see below at the bottom for comments</p>
<p dir="auto">several users are experiencing this besides me so it is not confined to me alone</p>
<p dir="auto">Thanks</p>