-
AuthorPosts
-
April 6, 2018 at 9:35 pm #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?
April 7, 2018 at 9:01 am #938570Hey 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,
RikardApril 7, 2018 at 5:50 pm #938627Hi Rikard,
Thank you for the prompt reply. Attached are the credentials for you:
April 8, 2018 at 8:40 am #938724Hi,
Thanks for that, could you post login details to the dev site as well so that we can compare the two please?
Best regards,
RikardApril 8, 2018 at 6:22 pm #938854Sure thing (and thank you). Here you go:
April 9, 2018 at 4:30 pm #939300PLEASE 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!
April 10, 2018 at 12:21 am #939466Well… 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!
April 10, 2018 at 1:30 am #939497Upon 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, 6 months ago by GabrielSenn. Reason: Clarification
April 10, 2018 at 6:39 am #939594Hi 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,
VictoriaApril 10, 2018 at 4:16 pm #939921Hello 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?
April 11, 2018 at 5:31 pm #940578Update: 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?
April 12, 2018 at 4:19 am #940745Hi,
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,
IsmaelApril 12, 2018 at 4:05 pm #941019Thank 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, 6 months ago by GabrielSenn. Reason: Moved linked files to private content
April 12, 2018 at 4:28 pm #941026yes but do it in private content the download zip file
April 12, 2018 at 4:29 pm #941030Done. Cheers!
April 12, 2018 at 4:39 pm #941031by the way : I would never have come up with the idea of placing shortcodes in a menu navigation label.
But it works well !April 12, 2018 at 4:56 pm #941036Well, 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.
April 12, 2018 at 5:01 pm #941040i mean your first page with the members login. Great idea
April 12, 2018 at 5:02 pm #941041Oh. That! :) Cheers
April 12, 2018 at 5:05 pm #941043how did you get that banner on top ? https://dev.mediabox.ca/3/
April 12, 2018 at 5:11 pm #941046As 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.
April 13, 2018 at 10:55 pm #941708Please 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 menuSolution:
- 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, 5 months ago by GabrielSenn.
April 16, 2018 at 5:41 am #942420Hi,
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,
IsmaelApril 17, 2018 at 6:57 am #942953Thank 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, 5 months ago by GabrielSenn.
April 19, 2018 at 7:24 am #943936Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.