littlebizzy / slickstack

Lightning-fast WordPress on Nginx
https://slickstack.io
GNU General Public License v3.0
629 stars 112 forks source link

Fatal error: Uncaught Error: Class 'Elementor\Core\Files\Uploads_Manager' not found in staging #150

Closed backamblock closed 1 year ago

backamblock commented 2 years ago

i'm not really sure if this is related to the #149 , but i just installed another testbench and this happened. i finished WP install with wp cli and installed astra and elementor. the main site works fine, but the staging just gives me that error. this is the first time i try staging, so i can not tell if it was working before.

image
backamblock commented 2 years ago

it works fine without elementor, but i need it badly for an upcoming project. i would love to, but i can not use Gutenberg

jessuppi commented 2 years ago

@backamblock This seems like an error specific to Elementor, and not the environment:

Ref: https://stackoverflow.com/questions/64588773/fatal-error-uncaught-error-class-elementor-controls-manager-not-found

Ref: https://wordpress.stackexchange.com/questions/303752/elementor-fatal-error-class-elementor-widget-base-not-found

Ref: https://github.com/elementor/elementor/issues/5367

This is part of the reason I refuse to use page builder plugins, they are so bloated and non-stop security issues and bugs because of the massive codebase. It might be that ss-sync-staging copies the Elementor SQL data in a way that breaks something on the staging site, but it's strange that no other plugins seem to have problems?

For the record also:

Ref: https://elementor.com/help/fatal-error-after-updating-or-installing-elementor-or-elementor-pro/

Sometimes fatal errors can be due to a corrupt database especially when the fatal error mentions the β€œcore” code of Elementor. Indeed, some plugins and other third-party products can corrupt the database of your website and can prevent Elementor from functioning properly. If you use a database optimization plugin, please deactivate it before accepting an update of Elementor or Elementor pro.

backamblock commented 2 years ago

yes, no other plugin and i use a few that you probably never thought of because germany.. nothing else has these problems. Kadence+blocks works flawless for example.

there seems to be a reason it slows down pages πŸ˜„ okay i cant use the staging then.. i will figure something out πŸ‘πŸ»

i posted about this in the plugin support forum, let's see ...

jessuppi commented 1 year ago

Reopening this as per reports on Discord that it's still happening... and it's SlickStack's fault!

jessuppi commented 1 year ago

Must be some files are being skipped by:

ss_rsync --max-size=5mb --exclude 'blacklist.txt' --exclude 'object-cache.php' --exclude mu-plugins --exclude temp --exclude upgrade --exclude uploads /var/www/html/wp-content/ /var/www/html/staging/wp-content

Ref: https://github.com/littlebizzy/slickstack/blob/master/bash/ss-sync-staging.txt

jessuppi commented 1 year ago

Rsync syntax is pretty nuts, and very sensitive. But I found a pattern that allows directory slashes, with wildcard path prefix that I think will work for our purposes:

rsync [other opts...] --exclude='*/exclude_dirname/' /src/ /dst/

Ref: https://serverfault.com/questions/801875/in-an-rsync-how-do-i-exclude-all-directories-that-match-a-pattern

I had never seen this approach before, the author claims it was introduced in version 3.1.3 so I think that should support at least as far back as Ubuntu 18.04 and maybe even older LTS versions.

More: https://unix.stackexchange.com/questions/83394/rsync-exclude-directory-not-working

jessuppi commented 1 year ago

Here is our new command:

ss_rsync --max-size=5mb --exclude 'blacklist.txt' --exclude 'object-cache.php' --exclude='*/mu-plugins/' --exclude='*/temp/' --exclude='*/upgrade/' --exclude='*/uploads/' /var/www/html/wp-content/ /var/www/html/staging/wp-content

Commit: https://github.com/littlebizzy/slickstack/commit/b6848389dabc927fd2fa94263862a1800a8dfb9a

I haven't tested this but it should fix OP conflict with Elementor in staging.... feedback welcome, thanks!