Skip Navigation

[Resolved] PHP Notice: Trying to access array offset on value of type null

This support ticket is created 3 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 12 replies, has 2 voices.

Last updated by Jamal 3 years, 9 months ago.

Assisted by: Jamal.

Author
Posts
#1673927

I am trying to: Ever since the latest update of the apps I have been getting these notices in my debug log and in query monitor:

[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 74
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 78
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 79
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 81
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 74
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 78
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 79
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 81
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 74
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 78
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 79
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 81
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 74
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 78
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 79
[23-Jun-2020 17:57:11 UTC] PHP Notice: Trying to access array offset on value of type null in /wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 81

and along with these in the query monitor I also get this:
Warning (Suppressed) DOMDocument::loadHTML(): Tag wpv-loop invalid in Entity, line: 5 4 -
wp-content/plugins/toolset-blocks/embedded/inc/wpv.class.php:2216
DOMDocument->loadHTML()
wp-content/plugins/toolset-blocks/embedded/inc/wpv.class.php:2216
WP_Views->render_view()
wp-content/plugins/toolset-blocks/embedded/inc/wpv.class.php:2010
WP_Views->render_view_ex()
wp-content/plugins/toolset-blocks/embedded/inc/wpv.class.php:629
WP_Views->short_tag_wpv_view()
wp-includes/shortcodes.php:343
do_shortcode_tag()
Unknown location
preg_replace_callback()
wp-includes/shortcodes.php:218
do_shortcode()
wp-includes/class-wp-hook.php:287
apply_filters('the_content')
wp-includes/post-template.php:253
the_content()
wp-content/themes/generatepress/content-single.php:63
load_template('wp-content/themes/generatepress/content-single.php')
wp-includes/template.php:672
locate_template()
wp-includes/general-template.php:168
get_template_part('content','single')
wp-content/themes/generatepress/single.php:26

I don't know how to fix these notices and warnings, but it seems to have slowed the front end of my site down considerably.

#1674781

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

To better assist you with this issue, we'll need to know which pages trigger these errors.

I'll suggest:
- Renaming the debug.log.
- Visit different pages on the front and check the new debug.log file to verify which pages trigger the issue.

Then, try to isolate the issue a bit further, check if it appears when:
- Only Toolset plugins are activated. It will tell us if there is an interaction issue with another plugin.
- The theme is set to a WordPress default like Twenty Fourteen. It will tell us if there is an interaction issue with your theme.
If the problem disappears, start activating one at the time to track where the error is produced.

If this does not help, we'll need to take a copy of your website for local debugging.

#1676591

I deactivated all the plugins except tooslet, turned on the twenty twenty theme. Went to a few different pages and each one has the error still.

[25-Jun-2020 14:56:02 UTC] PHP Notice: Trying to access array offset on value of type null in /var/www/zenvada.co/html/wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 74
[25-Jun-2020 14:56:02 UTC] PHP Notice: Trying to access array offset on value of type null in /var/www/zenvada.co/html/wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 78
[25-Jun-2020 14:56:02 UTC] PHP Notice: Trying to access array offset on value of type null in /var/www/zenvada.co/html/wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 79
[25-Jun-2020 14:56:02 UTC] PHP Notice: Trying to access array offset on value of type null in /var/www/zenvada.co/html/wp-content/plugins/cred-frontend-editor/vendor/toolset/common-es/php/Rest/Route/ShortcodeRender/WithMeta.php on line 81

#1676619

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for your feedback. To continue investigating this issue, I'll need to take a copy of your website for some local debugging. We prefer Duplicator copies as explained in https://toolset.com/faq/provide-supporters-copy-site/
Please use filter to reduce the size of the copy as described in this video around 1:00 hidden link
If Duplicator fails to create a copy, we'll need a database copy/export, plugins, and theme folders, all in a zip file.
Your next reply will be private to let you share the download link safely.

#1686865

hidden link is the folder with the installer and the backup file

#1687337
#1687341

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for sharing a copy of your website. Unfortunately, I was not able to build it because my MySQL installation is outdated to yours(5.5 vs 8.0). I asked my teammates to try, to no avail.
For that reason, I created an online installation on our platform and I'd like you to migrate your website on it. Please follow the steps in my previous private reply(July 4, 2020 at 8:45 am).

#1688993

When I enter the details provided into the migration plugin this comes up on the next page: Error! The URL specified is incorrect. Please check if your account is configured with *** (with the stars being the URL that you provided).

So I am not able to set it up. Could you please make sure the URL is correct?

#1689789

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

The URL is correct but it seems that the server has some issues. I am checking with the platform support and I'll try to perform the migration as soon as they get is sorted out.

#1689799

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

I got the server up and running again, but my credentials to your website are not working anymore, I can't test the migration.
Please try to migrate again and provide a working username/password, as I will be using it on the migrated site too.

#1697029
#1700111

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for your feedback.
Let me some time to prepare a server with MySQL 8, and I'll try to build the Duplicator copy on it, hopefully it will pass and I will be able to debug these logs.
I'll get back to you as soon as possible.

#1703001

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

I tried for many hours to set up a development site with MySQL 8 but I did not succeed so far. I am stuck at this stage and I'll ask our 2nd Tier assistance on this.

Thinking about these errors again, I suspect that they are triggered by the PHP version(7.4). But I can't tell if I am not able to reproduce the errors in an environment where I can debug on.

I wonder if you can provide a staging site where we can switch the PHP version to 7.3 or 7.2. It may not be the best solution, but it will definitely help us understand the root cause of these PHP logs.
On this staging site, we can explore the different debugging techniques we can afford, and we'll find out why is this happening.

#1706773

I moved my site down to php 7.3.20 and the notices stopped. So, it seems that it is triggered by the PHP version. Will Toolset be upgraded in the future to support PHP 7.4?

#1707013

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for this feedback. That's awesome, at least we have more information now 🙂

We try to be compatible with all the versions that WordPress support. And we have recently fixed some similar notices/warnings related to PHP7.4. But we were able to reproduce them, and that way, we were able to escalate them to the developer for a fix.
If we can reproduce this issue, we can escalate it to our developers.

I just succeeded to set up a MySQL 8 environment with Local by Flywheel hidden link
And I successfully built a copy of your website with:
- PHP 7.4.1
- MySQL 8.0.16
But I was not able to reproduce the same Notices in:
- The backend.
- The frontpage.
- Add New Page

As long as I cannot reproduce the same error, I am afraid, I remain helpless.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.