Ticker

6/recent/ticker-posts

Ad Code

Responsive Advertisement

How to fix WordPress Error: Uncaught TypeError: Cannot access offset of type string on string

How to fix WordPress Error - Uncaught TypeError - Cannot access offset of type string on string

Today while working on setting up new brand new Premium Plugins structure I faced this error.

Starting today on Crunchify, for our Premium Plugins we are moving to One time payment option. No monthly or yearly recurring fees going forward.

Please check it out our two premium plugins.

  1. Crunchy Sharing
  2. All-in-one Optimizer and Customizer

Now let’s get back to error message.

How to fix Uncaught TypeError: Cannot access offset of type string on string error?

Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and
notifies you with this automated email.

In this case, WordPress caught an error with one of your plugins, Genesis Blocks.

First, visit your website (https://pro.crunchify.com/) and check for any visible issues. Next, visit the page where the error was
caught (https://pro.crunchify.com/wp-admin/post.php?post=2111&action=edit) and check for any visible issues.

Please contact your host for assistance with investigating this issue further.

If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets
you safely login to your dashboard and investigate further.

https://pro.crunchify.com/wp-login.php?action=enter_recovery_mode&rm_token=test&rm_key=test

To keep your site safe, this link will expire in 1 day. Don't worry about that, though: a new link will be emailed to you if the
error occurs again after it expires.

When seeking help with this issue, you may be asked for some of the following information: WordPress version 6.1.1 Active theme:
Crunchify-v3 (version 5.3.7) Current plugin: Genesis Blocks (version 1.5.3) PHP version 8.1.8

Error Details ============= An error of type E_ERROR was caused in line 197 of the file
/www/pro_123/public/pro/wp-content/plugins/genesis-blocks/src/blocks/block-newsletter/includes/newsletter-functions.php.
Error message: Uncaught TypeError: Cannot access offset of type string on string in
/www/pro_123/public/pro/wp-content/plugins/genesis-blocks/src/blocks/block-newsletter/includes/newsletter-functions.php:
197 Stack trace:
#0
#/www/pro_123/public/pro/wp-content/plugins/genesis-blocks/src/blocks/block-newsletter/includes/newsletter-functions.php
#(257): Genesis\Blocks\Newsletter\mailing_list_providers() 1 /www/pro_123/public/pro/wp-includes/class-wp-hook.php(308):
#Genesis\Blocks\Newsletter\admin_assets('') 2 /www/pro_123/public/pro/wp-includes/class-wp-hook.php(332):
#WP_Hook->apply_filters(NULL, Array) 3 /www/pro_123/public/pro/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 4
#/www/pro_123/public/pro/wp-admin/edit-form-blocks.php(272): do_action('enqueue_block_e...') 5
#/www/pro_123/public/pro/wp-admin/post.php(187): require('/www/pro_123/pu...') 6 {main}
  thrown

In my case, as you see above, exception was coming from plugin Genesis Blocks.

Genesis Blocks and MailChimp API key Error message

I had a wrong MailChimp API key. And WordPress was throwing above message.

In order to fix this, I just deleted MailChimp key and saved value.

That’s it. Going forward you won’t be able to see this error again.

The post How to fix WordPress Error: Uncaught TypeError: Cannot access offset of type string on string appeared first on Crunchify.

Enregistrer un commentaire

0 Commentaires