New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double Menu Problem after Updates #27205
Comments
We're still having the same issue on multiple sites, tried customer support last year in march with over 20 mails, including extensive troubleshooting, setting up dev environments, giving login credentials to Elementor team, etc. We had the issue for the menu and the icon list widget: |
@rob1998 Yep, agreed. Something doesn't get updated. There's a simple fix that Ele could incorporate on their updates if they can't be bothered to fix the problem properly, just run the regen CSS tool twice on the completion of updates (they claim that it runs once at the end of the updates). If you're feeling brave, instead of running the regen tool, try running the below in phpMyAdmin (do a backup of the website & db first), this would help prove this is the problem. If you're not familiar with MySQL/MariaDB, not worth it as your table prefix may not be the same, but if you do, post a comment here if it worked or not. UPDATE wp_options |
Yeah, I wrote it into a snippet so we can batch execute it (also replaced http with http:, so it won't create httpss when replacing in url's that are already https):
|
Nice, thanks Rob. A while back I did find some articles where people had added the regen CSS trigger to after update code, so on Ele update, the code ran. I can't remember the details of it, it needed WP Command Line installed, which I tried to do, but couldn't get working, so gave it up. You may be able to add your code to the end of this and have it work on Ele updates without WP Command Line. I'm not a PHP dev, so will leave it to you. If you get it working, let me know how I can set it up. Thanks! Code Snippet 1 Code Snippet 2 if ( isset( $options['action'] ) && $options['action'] == 'update' && $options['type'] == 'plugin' ) { add_action( 'upgrader_process_complete', 'my_after_elementor_update_action', 10, 2 ); |
it's definitely possible to use a hook to run the script automatically after updating. However, that would be a dirty fix. |
@rob1998 Had another site with screwed up menu this morning, ran the SQL (added your : ) and it fixed the menu, so continuing to look like this is the problem. Interesting that you have sites with http instead of https. Do these sites work OK? If so, there must be something specific in the way some are built, that they call https, can't find it, and fail, whereas some, perhaps, just call a URL eg /wp-content/elementor/somefile.css, rather than the fully qualified link of https://domain/wp-content/elementor/somefile.css which it can't find, because it's http://domain/wp-content/elementor/somefile.css in the database. Not sure on your "dirty fix" comment, basically if it's broken and Ele refuse to fix it, then, if you want auto updates, the only option is some sort of dirty fix, especially on sites known to break. |
I don't have any http sites, it's just the 2 Elementor asset url's which are being stored as http in the database, which causes the issue because of CORS
I believe the frontend fileurl is being created like this: I'm looking through the entire source code to figure it out, but I haven't found a way to replicate the issue which makes it harder to debug. |
UPDATE 9-5-24
another site broken, same fix works.
Happy to give you access to a site that breaks frequently if you want to take a look.
UPDATE 7-5-24
I've had another site break and tested this SQL and it fixed the problem:
UPDATE wp_options
SET option_value = REPLACE(option_value, 'http', 'https')
WHERE option_name = '_elementor_assets_data';
Which suggests that the below is indeed the issue.
Prerequisites
Description
The double menu problem, which is widely complained about, appears to be caused by the browser not finding this file:
/wp-content/plugins/elementor-pro/assets/css/widget-nav-menu.min.css
which is probably because it's listed as http instead of https:
This file location is stored in the database at:
table = Options, column option_name = _elementor_assets_data
SQL to find it:
select * from wp_options
WHERE option_name = '_elementor_assets_data ';
The data is either not being updated or, more likely, some part of the update process is adding the URL as http instead of https and the browser is blocking the mixed content OR some part of the code is looking for HTTPS instead of HTTP and not linking it in as required CSS (or something else is the problem).
See the BEFORE and AFTER relevant sections from the Option_Value column.
I changed only the http to https via phpMyAdmin Edit function and this fixed the issue. That might be because something realised there had been a db change and called some other process or it might be because that's all that caused the problem.
After changing to https, the site worked and I checked the data in the table again, and it had been updated with new versions, see the code below, so something triggered the update.
BEFORE
s:8:"nav-menu";a:2:{s:7:"content";s:123:"";s:7:"version";s:6:"3.21.2";}s:7:"divider";a:2:{s:7:"content";s:4311:"<style>/*! elementor - v3.21.0 - 30-04-2024 */
AFTER
s:8:"nav-menu";a:2:{s:7:"content";s:124:"";s:7:"version";s:6:"3.21.2";}s:4:"icon";a:2:{s:7:"content";s:0:"";s:7:"version";s:6:"3.21.4";}s:7:"divider";a:2:{s:7:"content";s:4311:"<style>/*! elementor - v3.21.0 - 30-04-2024 */
Please note that I only have one site at the moment with this issue, so I cannot validate this, but will attempt to next time a site breaks, which happens about once every 2 weeks.
Steps to reproduce
Expected behavior
Isolating the problem
Elementor System Info
Click to reveal
Agreement
The text was updated successfully, but these errors were encountered: