6

Whenever i select a category like users/content etc from administrator area the submenus are getting displayed 6 times. Like the below picture for Users.

enter image description here

Debug: Administrator template (hathor/index.php) Line 92:

<jdoc:include type="modules" name="submenu" style="rounded" id="submenu-box" />
var_dump("test");

This is where the mod_submenu is included and the submenus are displayed.After the var_dump i get only one output (wanted to test if i were inside a loop) , so i thought that the problem would be inside the mod_submenu .

Altough i noticed that the whole code of mod_submenu is executed inside a

<ul id="submenu">

But the output after i inspected the page is this for each line :

<div id="submenu-box">
    <div class="m">
        <ul id="submenu"></ul>

If the mod_submenu was executed 6 times i would have something like that for output:

<div id="submenu-box">
   <div class="m">
      <ul id="submenu"></ul>
      <ul id="submenu"></ul>
      <ul id="submenu"></ul>
   etc..

Now the output is this:

 <div id="submenu-box">
       <div class="m">
          <ul id="submenu"></ul>
       </div>
    </div>
    <div id="submenu-box">
       <div class="m">
          <ul id="submenu"></ul>
       </div>
    </div>
    <div id="submenu-box">
       <div class="m">
          <ul id="submenu"></ul>
       </div>
    </div>
    etc...

So if im not mistaken <jdoc:include type="modules" name="submenu" style="rounded" id="submenu-box" /> creates both <div id="submenu-box"> and <div class="m"> .

After alot of debugging i came to the conclusion that the include statement and only that ( the rest code of hathor is running normally ) is executed 5 more times.

I thought of getting rid of the 5 extra divs using jquery. altough the problem is that there are 6 divs with the same id. So i tried to change the id="submenu-box" on include to class="submenu-box" . after i refreshed the page, instead of having a <div class="submenu-box"> i had an empty <div> . Cant i use a class with the jdoc:include?

Has anyone encountered something like that before ? Or anyone has any idea what could be the problem ? I Hope i was clear enough.

P.S: error_log is empty !

4

I had something like this in the past, and the reason was that the module had more than 1 instances in the db.

Why don't you check in Module Manager -> Admin Modules, to see if you have the same admin module (submenu) many times?

If you can't see them in the module manager, consider checking also directly in the db.

In my case, what it caused that issue, was a sql - database fix statement that I run directly in the db, after updating Joomla that has db structure issues, and was not possible to fix those issues with the DB->Fix schemas structure in the backend.

Although I updated Joomla db schemas, I also duplicated a couple of admin modules.

  • Bingo!We had the KMFasTrans plugin.A plugin for translation. And it created 5 more modules for every language. I would never think of checking the admin modules. Thanks ! – IseNgaRt Feb 25 '15 at 12:10
  • @IseNgaRt: You are welcome. Sometimes solutions are much simpler than what we would expect. – FFrewin Feb 25 '15 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.