Tagged: 

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #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
    #1211541

    Hi Rob,

    Can you tell us what PHP version you’re using?

    Best regards,
    Nikko

    #1211572

    PHP 7.3 I believe. Some on 7.4.

    #1211949

    Hi 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.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. 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 ).
    5. Click ” Submit “.
    6. 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,
    Nikko

    #1211958

    Sounds good, will do now.

    #1211961

    All set, you should have the link and testing URL that gives the error.

    #1211964

    FYI it happens in PHP 7.3.17 and 7.4.5, I just tested both.

    #1212380

    Hi 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,
    Nikko

    #1212418

    Hmm… 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.

    #1212435

    Hi 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,
    Nikko

    #1212441

    Hmm, 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?

    #1214148

    Ah 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!

    #1215002

    Hi,

    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,
    Ismael

    #1215072

    Works 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. :-)

    #1216468

    Hi,

    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,
    Ismael

    #1216994

    Hi!

    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.

    // https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_4_7_5/config-gutenberg/class-avia-gutenberg.php

    Best regards,
    Ismael

    #1217122

    I 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.

    #1217644

    Hi,

    The fix is not included in the latest version of the theme yet. We’ll add it in the next patch. Thank you for the confirmation.

    Best regards,
    Ismael

Viewing 18 posts - 1 through 18 (of 18 total)
  • You must be logged in to reply to this topic.