Viewing 25 posts - 1 through 25 (of 25 total)
  • Author
    Posts
  • #938390

    My Main menu (and mega menu, actually) have gone completely nuts and I can’t figure out why. Could you please help me?

    I have created these empty pages samples for your reference:
    Here’s what it should look like (my dev server): https://dev.mediabox.ca/3/z-menu-problem-sample/
    Here’s what it is looking like and should not (live): https://pijaccanada.com/z-menu-problem-sample/

      Switching plugins off has not resolved the problem.
      Rolling back plugins did not resolve the problem.
      No changes where made to any CSS (unless the theme or plugins made them, somehow).

    I could roll back to an older version of the site but would lose a week’s worth of work, and would not be any closer to finding out how this happened. Could you please help me?

    Menu problem sample

    #938570

    Hey GabrielSenn,

    Please send us a temporary admin login and login URL to both the live and dev site so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Best regards,
    Rikard

    #938627

    Hi Rikard,

    Thank you for the prompt reply. Attached are the credentials for you:

    #938724

    Hi,

    Thanks for that, could you post login details to the dev site as well so that we can compare the two please?

    Best regards,
    Rikard

    #938854

    Sure thing (and thank you). Here you go:

    #939300

    PLEASE DON’T CHANGE ANYTHING!

    Hello Rikard,

    My client has requested a rollback on their site and afterwords, I will see if I can figure out where the problem comes from.

    I will post the results here; if I can figure it out. Thanks again for your help!

    #939466

    Well… I am back to square one. I went as far as replacing the entire “plugins” and “themes” directories (from the good/dev site to the live site) and the problem persists. I am clueless as where the issue might be coming from.

    The Child style.css and the “Quick CSS” are identical on both servers, too.

    All help welcome!

    #939497

    Upon further inspection of the code from both sites side-by-side, I can see that code that is present in the simple page of the dev site if not present in the same page on the live site, and this is part of the problem. If you have a look you’ll see that <div class=’avia_mega_div … > is missing from the live site.

    But for the life of me, I can’t figure out why it is disappearing!

    Any clues?

    • This reply was modified 6 years, 7 months ago by GabrielSenn. Reason: Clarification
    #939594

    Hi GabrielSenn,

    From the html structure I see that on dev you have the mega menu enabled and on production, it is a just regular drop-down menu. This can be due to the conflict with iF menu plugin or due to the fact that you have the header.php file in your child theme, have you updated it on production with a fresh copy?

    Best regards,
    Victoria

    #939921

    Hello Victoria, Thank you for your reply.

    Both servers have the header.php file in the child theme, and they are identical. Both versions also have the IF menu plugin and turning it on or off has not made any difference.

    Any other idea?

    #940578

    Update: We merged all the contents of the live site, with the database of the dev site, onto a new dev site, and the menus where not affected.

    This means that the problem is in the database and not with any of the files (theme, plugins). Any ideas you could please share on what might be causing this?

    #940745

    Hi,

    Do you remember any plugin installation or file modification prior to the issue? On the live and dev databases, try to use this query.

    SELECT * 
      FROM wp_posts 
     WHERE post_type = 'nav_menu_item';
    

    This will display the menu items. Compare the rows.

    Best regards,
    Ismael

    #941019

    Thank you Ismael. Searching for that pattern did not return anything. However, there are differences between the databases but I have no clue what they mean. I am including them here to see if you guys can please help.

    EDIT: Moved linked files to private content

    • This reply was modified 6 years, 7 months ago by GabrielSenn. Reason: Moved linked files to private content
    #941026

    yes but do it in private content the download zip file

    #941030

    Done. Cheers!

    #941031

    by the way : I would never have come up with the idea of ​​placing shortcodes in a menu navigation label.
    But it works well !

    #941036

    Well, if I only just knew how to fix it, then, yes.

    I use WP and a theme like ENFOLD because I can do WYSIWYG better than dealing with code.

    #941040

    i mean your first page with the members login. Great idea

    #941041

    Oh. That! :) Cheers

    #941043

    how did you get that banner on top ? https://dev.mediabox.ca/3/

    #941046

    As I said… I’m mostly a WYSIWYG guy (read, designer ;) I design and get help to implement.

    I hired a developer (Zeshan Ahmed) via Codeable. I highly recommend him.

    #941708

    Please read! – Please HELP!

    So I have finally figured out the problem, which is rather complex and managed to duplicate it through process of elimination. Bottom line:

      1. Start with a good copy of the site’s database (properly working menu)
      +
      2. Edit menu by adding an item
      =
      3. Broken menu

    Solution:

      1. Start with a good copy of the site’s database (properly working menu)
      +
      2. Deactivate If Menu plugin, before any edits!
      +
      3. Edit menu by adding an item
      +
      4. Reactivate If Menu plugin
      =
      5. All is good with the world.

      Deactivating the plug in after the problem takes place will not restore the database changes.

    Now, because my client had to continue work on the website and once the problem has happen you cannot revert it, I need to know if there is a way to know which of the database tables the menu is in, so that I can just replace that one table, without losing 10 days worth of work.

    I hope this can be done!

    In addition, please note that as soon as I figured out the problem I did a little research, and it seems that the problem is not with the way If Menu works, but at least in the case shown in this article: https://wordpress.org/support/topic/breaks-mega-menu/ the problem is known and has to do with Mega Menu. Any idea if this is accurate and if it is, when it will be resolved?

    Thank you in advance!

    • This reply was modified 6 years, 7 months ago by GabrielSenn.
    #942420

    Hi,

    database tables the menu is in, so that I can just replace that one table,

    The menu items are not located on a single table. They are actually custom posts and the sql query above should display all posts or items that belongs to the “nav_menu_item” post type. What are you trying to replace? Unfortunately, we are not familiar with the “If Menu” plugin so we don’t know which items to look for in the database. Please contact their support for more info.

    Menu works, but at least in the case shown in this article:

    This is an issue with the PopUp Maker plugin and a limitation of a PHP class that is responsible for creating the menu.

    WordPress core doesn’t include a way to add Custom Fields to the Menu Editor. However, they do allow overriding a PHP Class that is used to create the Menu Editor. The problem is that only one plugin/theme can do this at a time.

    A solution is available in the documentation but I don’t know if it’s going to help with the current issue.

    // http://graphitivity.com/enfold/docs/mega-menu/#mega-menu-appears-as-a-normal-menu

    Best regards,
    Ismael

    #942953

    Thank you Ismael,

    The above is a little too complex for me so I will share the info with developers that help me and see if they can figure it out.

    In the meantime and for the record (in case this helps others), the solution was to edit the database and replace all instances of:
    '_menu-item-avia-megamenu', ''
    with:
    '_menu-item-avia-megamenu', 'active'

    Now, I did see in my “good copy” of the database that '_menu-item-avia-megamenu', '' appeared in a few places too, so perhaps doing a “replace all” was not the smartest thing, but a cursory check of the site showed no problems, so hopefully all will be OK.

    • This reply was modified 6 years, 7 months ago by GabrielSenn.
    #943936

    Hi,

    That is one of the many custom fields created for a menu item. That one defines whether a menu item is set as a mega menu or not. You should check the menu with sub menu items. They were probably converted to a mega menu because the “menu-item-avia-megamenu” custom field of every menu items are set to “active”.

    Best regards,
    Ismael

Viewing 25 posts - 1 through 25 (of 25 total)
  • You must be logged in to reply to this topic.