<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td></td>
</tr>
<tr>
<td>Symfony version</td>
<td>3.3.5</td>
</tr>
</tbody>
</table>
<p dir="auto">For the admin interface of eZ Platform 2.0, we are developing an application where the navigation happens with AJAX request. After an AJAX request corresponding to the navigation, the following is code is run:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Sfjs.load(
    document.querySelector('.sf-toolbar').id,
    `/_wdt/${debugTokenFromHttpHeader}`
);"><pre class="notranslate"><span class="pl-v">Sfjs</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">(</span>
    <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">querySelector</span><span class="pl-kos">(</span><span class="pl-s">'.sf-toolbar'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">id</span><span class="pl-kos">,</span>
    <span class="pl-s">`/_wdt/<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">debugTokenFromHttpHeader</span><span class="pl-kos">}</span></span>`</span>
<span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">so that the toolbar is updated as if the full page was generated (implementation of this feature request <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="99156809" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/15456" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/15456/hovercard" href="https://github.com/symfony/symfony/issues/15456">#15456</a>)</p>
<p dir="auto">Somehow, this is working (the toolbar is updated for instance the Route name, the timing or the memory usage are updated) but after calling <code class="notranslate">load</code> the toolbar is buggy in the following ways:</p>
<ol dir="auto">
<li>if it's was minimized, it becomes maximized</li>
<li>it's impossible to minimized it again, clicking on <em>Close Toolbar</em> link has no effect</li>
<li>if the page does others AJAX requests, the AJAX requests counter is correctly updated, but it keeps on blinking even after the end of those requests</li>
</ol>
<p dir="auto">If, for example, a project consists of the following commands:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="my-website:admin:do-something
my-website:admin:do-something-else
my-website:data:blah
my-website:data:blah-blah"><pre class="notranslate"><code class="notranslate">my-website:admin:do-something
my-website:admin:do-something-else
my-website:data:blah
my-website:data:blah-blah
</code></pre></div>
<p dir="auto">calling <code class="notranslate">app/console list my-website</code> causes an exception:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" The namespace &quot;my-website&quot; is ambiguous (my-website:admin, my-website:data)."><pre class="notranslate"><code class="notranslate"> The namespace "my-website" is ambiguous (my-website:admin, my-website:data).
</code></pre></div>
<p dir="auto">This does not look like what would be expected. Adding a command into <code class="notranslate">my-website</code>  namespace directly (e.g. <code class="notranslate">my-website:test</code>) helps to avoid the issue – command listing starts working fine.</p>
<p dir="auto">Perhaps, the problem is in <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Application.php#L473">Symfony\Component\Console\Application::getNamespaces()</a> – this method registers only one namespace per command, so parent namespaces remain unknown unless they contain any commands directly.</p>