Tagged: fatal error
-
AuthorPosts
-
May 8, 2020 at 5:53 pm #1211104
An error of type E_ERROR was caused in line 563 of the file /var/www/vhosts/domain.com/httpdocs/wp-content/themes/enfold/config-gutenberg/class-avia-gutenberg.php. Error message: Uncaught Error: Call to undefined function gutenberg_can_edit_post_type() in /var/www/vhosts/domain.com/httpdocs/wp-content/themes/enfold/config-gutenberg/class-avia-gutenberg.php:563
I do have Enfold set to use the Classic Editor, with WP v5.4.1 but it still causes this fatal error above when I try to visit Appearance > Customize, but only with Hummingbird page cache enabled. If I disable page cache, it works fine, very strange. Try it yourself, it happens across many websites I do maintenance for using Enfold.
Please release Enfold 4.7.4.1 fix? Maybe it will fix the above and lots more with v5.4.1.
- This topic was modified 4 years, 6 months ago by PressWizards.com. Reason: redact domain as best practice
May 9, 2020 at 11:46 pm #1211541Hi Rob,
Can you tell us what PHP version you’re using?
Best regards,
NikkoMay 10, 2020 at 5:00 am #1211572PHP 7.3 I believe. Some on 7.4.
May 12, 2020 at 2:12 am #1211949Hi Rob,
I tried to have to work with the following and it seems to have no issues in Appearance > Customize:
- Hummingbird 2.4.2 (page cache enabled)
- Enfold 4.7.4
- WordPress 5.4.1
- PHP 7.3.16
And it worked just fine.
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( to be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.Best regards,
NikkoMay 12, 2020 at 2:52 am #1211958Sounds good, will do now.
May 12, 2020 at 2:53 am #1211961All set, you should have the link and testing URL that gives the error.
May 12, 2020 at 2:58 am #1211964FYI it happens in PHP 7.3.17 and 7.4.5, I just tested both.
May 12, 2020 at 10:14 pm #1212380Hi PressWizards.com,
Thanks for giving us admin access.
I used Health Check & Troubleshooting plugin so activating/deactivating plugins won’t affect other users.
Here’s what I found out:
– Enfold Theme + All plugins active = Customizer works fine
– Child Theme + All plugins except Hummingbird = Customizer works fine
– Child Theme + Hummingbird = Customizer not working
I guess it’s safe to say that there’s a code in your child theme, please try to backup the child theme, then empty functions.php in of the child theme and remove the framework folder.
Then try to add those functions in the child theme one by one, and finally add the framework folder, test if which one is causing the issue.Best regards,
NikkoMay 13, 2020 at 12:44 am #1212418Hmm… ok, I will look into that. I have other Enfold sites that do not use Child theme at all, same issue and error. I will create an Admin link for you and send you the same Customize.php error URL for that site.
May 13, 2020 at 2:24 am #1212435Hi PressWizards.com,
Yes, the behavior seems different, here are the differences I noticed.
Global site uses PHP 7.4.5 while your other site is 7.3.
This site also triggers the error even when Page cache is disabled unlike the other site.Best regards,
NikkoMay 13, 2020 at 2:48 am #1212441Hmm, I’ve got the error on both 7.3 and 7.4. I’ve dropped that site down to 7.3, same error.
I realized it’s either Gravatar caching or Page caching, cause the error. If I turn off both, error goes away. If I enable one or the other or both, error is back.
Anyways, we’ve replicated the error across sites with and without child theme, error exists… can we get it fixed in Enfold, since it is in the enfold/config-gutenberg/class-avia-gutenberg.php file?
It’s weird because Classic editor is enabled, and so Uncaught Error: Call to undefined function gutenberg_can_edit_post_type() makes sense, there is no gutenberg function to call then? But why is it still trying to call it from that file, that should be disabled?
May 19, 2020 at 2:22 am #1214148Ah I have realized it’s Enfold’s option of choosing Classic Editor or Gutenberg in the theme options causing the issue… if I use the Classic Editor plugin, the error goes away!
I hope Enfold is updated accordingly, thank you!
May 21, 2020 at 2:03 pm #1215002Hi,
Thank you for the info. Is it working properly when the Block Editor is selected in the theme options, and when the Classic Editor plugin is disabled? The function is not found or the error occurs, probably because the Classic Editor plugin disables the Gutenberg editor. Is the plugin already installed before you reported the issue?
Best regards,
IsmaelMay 21, 2020 at 7:42 pm #1215072Works properly when Block Editor is selected, and Classic Editor disabled. The Classic Editor plugin was not installed before I reported the issue.
So it’s how Enfold is turning off Gutenberg which produces the error, different from how the Classic Editor plugin is doing it, which produces no error. And only when visiting the Customize area and only when Page Caching or Gravatar caching is enabled, which is very weird. :-)
May 26, 2020 at 12:28 pm #1216468Hi,
Thank you for the clarification. We’ll forward the issue to our channel and check the issue further. We’ll let you know once we found a fix.
Best regards,
IsmaelMay 27, 2020 at 3:41 pm #1216994Hi!
We added a conditional check to the gutenberg class to prevent the function from executing if it doesn’t exists. Please try to replace the config-gutenberg/class-avia-gutenberg.php with the following file.
Best regards,
IsmaelMay 27, 2020 at 7:18 pm #1217122I updated to Enfold v4.7.5 and the problem was still there, just to confirm.
This file you linked to with the conditional check fixes the problem, the Customizer works without Fatal error now. Thank you.
May 29, 2020 at 10:24 am #1217644 -
AuthorPosts
- You must be logged in to reply to this topic.