Navigation überspringen

[Gelöst] PHP Warning – Tooset Access

This support ticket is created vor 1 Jahr, 5 Monaten. 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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Dieses Thema enthält 8 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Nigel vor 1 Jahr, 4 Monaten.

Assistiert von: Nigel.

Author
Artikel
#2648013

Warning: array_intersect(): Expected parameter 1 to be an array, string given in /home/customer/www/peterj104.sg-host.com/public_html/wp-content/plugins/types-access/application/models/access_settings.php on line 410

Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/peterj104.sg-host.com/public_html/wp-content/plugins/types-access/application/models/access_settings.php:410) in /home/customer/www/peterj104.sg-host.com/public_html/wp-admin/includes/misc.php on line 1431

#2648197

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+00:00)

Hi Peter

Typically a warning like that would occur when the load order is different than expected, perhaps because a hook fires out of the expected sequence.

Do you know if any particular activity triggers the warning (e.g. visiting a particular page)?

Could you check if the issue occurs in a minimal set-up with all plugins other than Toolset disabled?

#2648311

Hi Nigel,

It affect all pages. After an action sometimes there will be a fatal error. It still occurs with all non-toolset plugins disabled. Only disbling Toolset Access (which is critical) removes the error.

After reactivating plugins, I got this error:

Warning: array_intersect(): Expected parameter 1 to be an array, string given in /home/customer/www/peterj104.sg-host.com/public_html/wp-content/plugins/types-access/application/models/access_settings.php on line 410

Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/peterj104.sg-host.com/public_html/wp-content/plugins/types-access/application/models/access_settings.php:410) in /home/customer/www/peterj104.sg-host.com/public_html/wp-admin/includes/misc.php on line 1431

Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/peterj104.sg-host.com/public_html/wp-content/plugins/types-access/application/models/access_settings.php:410) in /home/customer/www/peterj104.sg-host.com/public_html/wp-includes/pluggable.php on line 1435

#2648383

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+00:00)

It's not an issue that happens generally, it appears to be something specific to your site.

Could we get a copy of your site for testing? Actually, you could use All In One WP Migration and just export the database, given that we don't need to bundle the plugins if the problem only appears with Toolset plugins active.

(I forgot to mention the theme. Is it also the case that the warnings occur if you switch to a default theme like twentytwentyone?)

You can share a link to Dropbox or similar, or directly to the archive on your server, and it will automatically be hidden from other users.

#2649033

Here is the DB: versteckter Link

I have checked the theme, too. I also have 30 other websites running Kadence Theme with the full Toolset suite with no problems.

#2649165

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+00:00)

I have requested access to that archive on Drive.

#2649323

Thank you. Access granted

#2649389

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+00:00)

I couldn't import that file via phpMyAdmin for some reason.

Can I get credentials for your site, and I'll grab a copy myself?

I've set up a private reply.

#2649673

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+00:00)

Thanks. I installed a copy of the site locally and stepped through the code execution where the error is triggered.

There appear to be problems with the stored Access settings (which include settings for post types that do not exist on your site).

As settings are saved on a per-post-type basis it's not possible to universally save them so that the problem settings might simply be removed.

I was able to solve the problem by simply deleting the settings from the WordPress options table directly (using phpMyAdmin). Are you able to do that?

The option in question has the option name "toolset-access-options".

(Alternatively you could run a one-time PHP snippet that deleted the option using delete_option: https://developer.wordpress.org/reference/functions/delete_option/).

You will have to set the options up again that you do require, though.