Functions.php error

Hi, in the latest versions of Betheme there is an error Undefined array key "jsclass". This error appears every time I save changes to the page. As I found out, this error is caused by the fact that I added a function to disable Gutenberg in the child theme:

add_filter( 'use_block_editor_for_post', '__return_false' );

Can this be fixed or do I have to replace the feature on all websites with a plugin?

Best regards,

Martin


Comments

  • For example, this website:

    https://www.svjkyselova.cz/

    But the frontend is perfectly fine.

  • Hi,

    Sorry, but we do not provide help with child theme file customization.

    https://support.muffingroup.com/documentation/installation-updates/#child-theme

    However, in Theme options -> Global -> Advanced, there is already an option to hide the WordPress Editor.

    Best regards

  • Hi Phil, thanks for your reply. Unfortunately, completely hiding the WordPress Editor does not solve anything for me, because then, for example, it is necessary to insert posts via the builder.


    For me, it is only about suppressing Gutenberg and thus having a basic (classic) version of the WordPress Editor.


    I solved this by adding a filter in functions.php. This is a standard feature in WP, so I don't consider it a custom modification. This worked without problems until version 27.2.10.


    Best regards,

    Martin

  • As I know there is a plugin called Classic Editor that changes Gutenberg to the old Classic editor.

    https://wordpress.org/plugins/classic-editor/

    Unfortunately, as I mentioned, I cannot help with modifications to the child theme.


    Best regards

  • Hi Phil, thanks for your reply.

    If I use the Classic Editor plugin or the Disable Gutenberg plugin or the WPCode plugin, I always get the same error message.


    As far as I know, all of these solutions use a command

    add_filter( 'use_block_editor_for_post', '__return_false' );


    So in my opinion it is a collision of recent versions of Betheme with this standard WordPress feature. The problem is not only about child theme customization.


    Best regards,

    Martin

  • For confirmation, we checked this filter in our environment, and it works properly.

    Please send us the WordPress dashboard and FTP access privately through the contact form, which is on the right side at http://themeforest.net/user/muffingroup#contact and we will check what might be the reason.

    Notice!

    Please attach a link to this forum discussion.

    Sending incorrect or incomplete data will result in a longer response time.

    Therefore, please ensure that the data you send are complete and correct.

    Thanks

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.