Skip to content
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

Uncaught Error: Class 'GFForms' not found #330

Closed
dchenk opened this issue Dec 17, 2018 · 2 comments
Closed

Uncaught Error: Class 'GFForms' not found #330

dchenk opened this issue Dec 17, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@dchenk
Copy link
Contributor

dchenk commented Dec 17, 2018

I'm getting this error when trying to run wp-admin/upgrade.php for the WP core update:

PHP Fatal error:  Uncaught Error: Class 'GFForms' not found in /var/www/html/wp-content/mu-plugins/wp-stateless/lib/classes/compatibility/gravity-forms.php:24
Stack trace:
#0 /var/www/html/wp-includes/class-wp-hook.php(286): wpCloud\\StatelessMedia\\GravityForm->module_init(Array)
#1 /var/www/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /var/www/html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /var/www/html/wp-content/mu-plugins/wp-stateless/lib/classes/class-bootstrap.php(242): do_action('sm::module::ini...', Array)
#4 /var/www/html/wp-content/mu-plugins/wp-stateless/vendor/usabilitydynamics/lib-wp-bootstrap/lib/classes/class-bootstrap-plugin.php(56): wpCloud\\StatelessMedia\\Bootstrap->init()
#5 /var/www/html/wp-includes/class-wp-hook.php(286): UsabilityDynamics\\WP\\Bootstrap_Plugin->pre_init('')
#6 /var/www/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#7 /var/www/html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#8 /var/www/html/wp-setting in /var/www/html/wp-content/mu-plugins/wp-stateless/lib/classes/compatibility/gravity-forms.php on line 24

I have WP Stateless running as a mu-plugin.

A fix would be to check if class_exists of 'GFForms'.

@antonkorotkov
Copy link
Contributor

@alimuzzaman
Copy link
Contributor

@antonkorotkov Yes it's safe. In that stage the plugin will be loaded. Previously the problem was we run the code without any hook/action.
But in this line is inside of a GForm hook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants