Envira Gallery is Blocking my back-end WordPress Access

Hi! I installed the Envira Gallery a couple of weeks ago, and WP indicated there was an update. So I updated the plugins. And now I can no longer access the WordPress back end of my website.

I contacted my host and they said:

I have checked this issue and I found the error saying “Class ‘Envira_Gallery_License’ not found in /home/theantgr/public_html/wp-content/themes/x/framework/functions/global/plugins/envira-gallery.php on line 30”
12:25:12 PM
Chaya S
The issue is with the theme X.
12:25:33 PM

How do I fix this? Envira is one of X’s extensions, so I’m at a loss for how this could happen. I need to get back online ASAP please - thanks!

UPDATE
I think I just figured it out on my own. I just deleted line 30 from the code and I can get back into WordPress again now. Will contact the Envria folks to make sure that was the right thing to do… Unless you can confirm if that was the right thing to do? Thanks!

1 Like

I’ve just updated Envira Gallery and have had the exact same problem.
I’m on the phone with WP Engine and they are helping me revert back to the previous version of the Envira Gallery plugin, which is version 1.6.17.

UPDATE: Reversion to previous release of Envira Gallery did not prove to be as straightforward as hoped so for now have commented out the offending code, line 30 as mentioned above by @Jen6566.

This was the reply from Envira Gallery, and I hope it will allow you to fix whatever in X/Pro is causing this to break because I don’t want to have to manually “fix” this on 30+ sites:

James replied
Oct 19, 3:05pm
Hi Craig,

Thanks for reaching out about this! :wink:

Yes, X Theme has some code that breaks WordPress when Envira is installed. Originally, this code was used to hide the Settings page for Envira. You can add the following to the theme’s function.php to resolve the issue.
function x_envira_gallery_remove_license_functionality() { return true; }

Let me know if you have any other issues. Thanks so much!

Thank you!

Hi Craig,

Same thing happened to me today as well. My excellent web host service just renamed the Envira plugin directory on the back end, ( I could have done it myself through CPanel) and I was able to get back my environment. I agree 100% that doing this on 30 sites is terrible, but am offering it up for anyone else who can benefit. I had to find another portfolio plugin and fix several internal pages that uses Envira. Luckily for me none of my other clients upgraded their Envira plugins today.

Good luck,
Pam

Same problem. Deleted line 30 and back in?

I have a similar issue (except our entire site was knocked out with 1.7 Envira). I was able to easily fix it by restoring the site from a backup (rolling back to old Envira) Here is the response from Envira:

I see now. You are using X Theme. X Theme seems to have had a bit of outdated code that was designed to hide Settings and Addons pages from users using Envira. In order to remove the old code, please add the following to your theme’s functions.php:
function x_envira_gallery_remove_license_functionality() { return true; }

_Once this is in place, you can update without issue. Thanks so much."

Functions.php would not be my preferred way to handle this! Sounds like an update to X is in order.

Thanks!

Hi Folks,

This will be addressed in the next release, apologies about the hassle. For now commenting out said code is fine. While we wouldn’t normally recommend editing core theme files, in this case that’s only way it can be resolved until we release a patch.

Thanks!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.