elementor / elementor

The most advanced frontend drag & drop page builder. Create high-end, pixel perfect websites at record speeds. Any theme, any page, any design.
https://elementor.com/
GNU General Public License v3.0
6.58k stars 1.42k forks source link

[Bug] Landing Page Experiment causes 404 error when visiting media attachment pages #15943

Open zeinnicholas opened 3 years ago

zeinnicholas commented 3 years ago

Prerequisites

Description

When activating the Landing Page Experiment, users are reporting not being able to visit Media Attachment pages, causing a 404 error.

The issue was reported happening using only Elementor (3.3.1), the Hello Elementor theme (2.4.1), and also the Twenty-twenty-one theme (1.4).

Deactivating the experiment seems to fix the issue.

This might be related to this other issue: https://github.com/elementor/elementor/issues/15903

This was reported in the Elementor Leaders Slack Channel as well as in the WordPress Forum: https://wordpress.org/support/topic/media-attachment-pages-show-404-not-found/

attachment-pages

Steps to reproduce

  1. Install and activate Elementor 3.3.1 using any theme;
  2. Make sure the Landing Page Experiment is active;
  3. Go to the Media Library and upload an image;
  4. Click to see the Attachment Page;
  5. A "Nothing found" page will appear with a 404 error in the console.

Temporary Fix

  1. Deactivate the Landing Page Experiment.

Isolating the problem

Environment

System Info ``` == Server Environment == Operating System: Linux Software: nginx/1.19.3 MySQL version: mariadb.org binary distribution v10.4.21 PHP Version: 7.4.21 PHP Max Input Vars: 1000 PHP Max Post Size: 256M GD Installed: Yes ZIP Installed: Yes Write Permissions: All right Elementor Library: Connected == WordPress Environment == Version: 5.8 Site URL: [redacted] Home URL: [redacted] WP Multisite: No Max Upload Size: 256 MB Memory limit: 256M Permalink Structure: /%postname%/ Language: en-US Timezone: 0 Debug Mode: Inactive == Theme == Name: Twenty Twenty-One Version: 1.4 Author: the WordPress team Child Theme: No == User == Role: administrator WP Profile lang: en_US User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36 == Active Plugins == Elementor Version: 3.3.1 Author: Elementor.com == Elementor - Compatibility Tag == == Elements Usage == == Log == ```
krishneup commented 3 years ago

@zeinnicholas thank you so much.

shilo-ey commented 3 years ago

This issue has been resolved in Elementor v3.4.3

Feel free to update

Thanks!

cirkut commented 3 years ago

@shilo-ey This update broke all landing pages across multiple sites for me. Landing pages result in 404 errors.

Rolling back to 3.4.2 restores them.

zeinnicholas commented 3 years ago

@shilo-ey This update broke all landing pages across multiple sites for me. Landing pages result in 404 errors.

Rolling back to 3.4.2 restores them.

@cirkut Before confirming this is a real bug, can you try to reset your permalinks? Go to your Dashboard > Settings > Permalinks and hit "Save Changes" twice. Then make sure you clear all types of cache, your browser cookies, and also DNS cache (How to clear the DNS cache on your computer).

cirkut commented 3 years ago

@zeinnicholas This was the first step for me prior to commenting here initially. Permalinks changed and then changed back, caching plugin disabled, site/server cache cleared, cloudflare development mode enabled. 3.4.3 broke simple sites that are using landing pages and more complex ones.

DNS cache will have nothing to do with this issue since that's for domain resolution and no hosting or DNS changes were made.

Simply rolling back and forth between 3.4.2 and 3.4.3 breaks and unbreaks landing pages without any of the above steps as well.

On a related note, I am the author this issue regarding the Landing Page experiment that you linked in the original summary. Given our issue here and the other issues with Landing Pages (I understand it's still in beta, but it was enabled by default a little while ago), I'm having a hard time having confidence with using Landing Pages over a regular page with the Canvas template applied.

zeinnicholas commented 3 years ago

@cirkut Awesome, so this definitely needs to be addressed. I would advise you to open a new issue and reference this one so they can address it properly. ;)

cirkut commented 3 years ago

@zeinnicholas Good point, I've opened the new issue but had initially commented here to potentially quickly get this on the dev team's radar since it's what I would consider a relatively big breaking change that should be addressed ASAP (since I believe the merge that caused this issue was the one to address your issue).

Thanks for keeping me in check ;)

shilo-ey commented 3 years ago

Thank you @cirkut @zeinnicholas !

We will review it and release a patch if needed.

Thank you for raising the issue.