Site logo

Archived topic

site crashes every time when installing new site template

18 replies · Started by Bret on December 4, 2019

Viewing posts 1–15 of 19

Everytime the publisher imports a new site template, they are offered the option to "delete previous template's setting". Not sure if this is the exact prompt.

Each time they do this, the site crashes, with the following bug:

https://wordpress.org/support/topic/stack-trace-in-latest-version/

The resolution is for us to log into the site and run the following mysql commands:

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> delete from wp_options where option_name like 'elementor_exclude_user_roles';
Query OK, 1 row affected (0.01 sec)

mysql> delete from wp_options where option_name like 'elementor_cpt_support%';
Query OK, 1 row affected (0.01 sec)

mysql> delete from wp_options where option_name like 'menu-icons';
Query OK, 1 row affected (0.01 sec)

mysql>

This is quite inconvenient for this user......

Hi Bret,

I'm not quite sure I understand - they're running into this error when going through the Site Library Removal process? Where is the error showing up? Only in the logs?

Let me know :)

Hi Tom -

Yes, this is in the site library removal process. If you want to install a new site from the library, you are prompted to remove the previous site's settings, and if you click yes to that, the site crashes.

The site crashes, begins giving a 500, so the error is in the logs, yes.

We have a work-around:

I deactivated the 'menu-icons' plugin [it was enabled at the network level], and then clicked 'remove imported site', worked fine.

Strange, I wonder if it's multi-site related.

Was Menu Icons installed previously before a site was imported?

Good question. I thought one of your site templates brought it in..... but now that I think about it, I'm not actually sure.

It's not a dependency on your side?

We use it on some of our Site Library sites. However, using the reset feature should deactivate it unless it was already activated previously.

I'll run some tests :)

Great. One thing that'd be useful in GP is if it recorded in a log the activities taken through the console, like settings imported, site library import, etc.

Then we can just send you that......

Best,
Bret

Cool idea - thank you! :)

Strange, the menu-icons keeps coming back [it seems to get activated when something from the site library is imported].

Doubly weird .... it comes back activated at the network level. Another crashed subsite.....

Disabling it by hand, and now we get these errors:

Warning: Invalid argument supplied for foreach() in /var/www/hazardu/production/wp-content/plugins/elementor/includes/plugin.php on line 616

Notice: Undefined index: recaptcha_site_key in /var/www/hazardu/production/wp-content/plugins/ninja-forms/includes/Admin/Menus/Settings.php on line 49

This was all cleaned up by running the SQL script from before [but on wp_6_options 'cause its a subsite], and then going into the ninja forms and just clicking save from the settings page.

My hunch here is that importing the site from the site library enables these plugins, but they get put into an inconsistent by whatever goes on under the covers to "delete the previous site" and import a new one.

Deleting the previous site import simply deactivates the plugins that were imported. However, if the system finds those plugins were installed previously (before the site import), it will keep them activated.

I'll see if I can reproduce any of these and will get it tightened up in GPP 1.10.

Hi Tom -

How does it determine that the plugin was "installed previously"?

When you import a new site, the importer takes a "backup" of the current site. During that process, it saves which plugins are currently active.

When a site import is removed, it deactivates any plugins that are active that aren't a part of that backup list.

cool. Well out of curiosity, I'd like to mine out this data and see what's in there. Where do I look?

This archived topic is closed to new replies.