Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing PHP warnings in your debug.log related to WPML on a multisite installation where not all sites use WPML, and you're using the Cache Enabler plugin, this might be relevant to you. The warning indicates an issue with accessing array offsets on a value of type bool, triggered during cache clearing processes.
Solution:
1. Verify your WPML setup on multisite using our guide: https://wpml.org/documentation/support/multisite-support/
2. Consider deactivating the Cache Enabler plugin temporarily to see if it resolves the issue.
3. If the problem persists, we recommend opening a support ticket with the Cache Enabler plugin team. Additionally, consider using one of the cache plugins verified by our compatibility team: https://wpml.org/plugin-functionality/caching/

If this solution does not apply to your case, or if it seems outdated, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. We highly recommend opening a new support ticket if you need further assistance: WPML Support Forum

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 5 replies, has 2 voices.

Last updated by Carlos Rojas 1 year ago.

Assisted by: Carlos Rojas.

Author Posts
May 13, 2024 at 1:59 pm #15621269

sissiB

I have a multisite intallation, 3 of 4 sites use wpml. Additionally using the cache_enabler plugin from keycdn. On clearing the cache the site with no wpml active is causing the following in the debug.log file:

[13-May-2024 13:24:58 UTC] PHP Warning:  Trying to access array offset on value of type bool in /usr/www/users/client/content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 109
[13-May-2024 13:24:58 UTC] Backtrace (BlogId: 3, PostId: 0) from warning 'Trying to access array offset on value of type null' at /usr/www/users/client/content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php 109: /usr/www/users/client/content/plugins/sitepress-multilingual-cms/sitepress.class.php 4267 calling _process_generic_text() 
| /usr/www/users/client/cms/wp-includes/class-wp-hook.php 324 calling url_to_postid() 
| /usr/www/users/client/cms/wp-includes/plugin.php 205 calling apply_filters() 
| /usr/www/users/client/cms/wp-includes/rewrite.php 502 calling apply_filters() 
| /usr/www/users/client/content/plugins/cache-enabler/inc/cache_enabler_disk.class.php 232 calling url_to_postid() 
| /usr/www/users/client/content/plugins/cache-enabler/inc/cache_enabler.class.php 2175 calling cache_iterator() 
| /usr/www/users/client/content/plugins/cache-enabler/inc/cache_enabler.class.php 1995 calling clear_page_cache_by_url() 
| /usr/www/users/client/content/plugins/cache-enabler/inc/cache_enabler.class.php 1617 calling clear_page_cache_by_site() 
| /usr/www/users/client/content/plugins/cache-enabler/inc/cache_enabler.class.php 612 calling clear_site_cache() 
| /usr/www/users/client/content/plugins/cache-enabler/inc/cache_enabler.class.php 1592 calling each_site() 
| /usr/www/users/client/content/plugins/cache-enabler/inc/cache_enabler.class.php 185 calling clear_complete_cache() 
| /usr/www/users/client/cms/wp-includes/class-wp-hook.php 324 calling on_upgrade() 
| /usr/www/users/client/cms/wp-includes/class-wp-hook.php 348 calling apply_filters() 
| /usr/www/users/client/cms/wp-includes/plugin.php 517 calling do_action() 
| /usr/www/users/client/cms/wp-admin/includes/class-plugin-upgrader.php 421 calling do_action() 
| /usr/www/users/client/cms/wp-admin/update.php 51 calling bulk_upgrade() 
| /usr/www/users/client/cms/wp-admin/network/update.php 17 calling require()

In the backtrace info you will see that this is caused by blogid 3 which is the site that does not use wpml at all.

debug info is from blod id 1

Thank you,
Sissi

May 14, 2024 at 9:24 am #15624382

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hello Sissi,
Thank you for contacting us

This message is just a warning and won't affect any functionality on your site. I recommend you check this guide: https://wpml.org/documentation/support/multisite-support/ that described step-by-step how to correctly setup WPML in a multisite and compare it with the steps you followed.

Regards,
Carlos

May 14, 2024 at 12:17 pm #15625282

sissiB

Hi Carlos,
I know it is just a warning, but it seems that it should be checked. I set up my multisite correclty and everything is working properly.
Eventhough I don't know how your filter can be called (or is active), when the plugin is not active on the current site?
Best,
Sissi

May 14, 2024 at 2:24 pm #15626001

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi Sissi,

I consulted my colleagues about the warning message and it seems that the cause of this problem is the Cache Enabler plugin. They suggested deactivating it temporarily because it seems it's affecting WPML link translation logic.

Best,
Carlos

May 14, 2024 at 2:52 pm #15626161

sissiB

Hi Carlos,
that is not an option, since it is a live site and I need the performance of the cached site.
Maybe you can have a look at it, the plugin is https://wordpress.org/plugins/cache-enabler/ - do you want me to open a ticket with them as well or are you going to look at it yourself?
Thanks,
Sissi

ETA: hidden link

May 14, 2024 at 3:12 pm #15626183

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi Sissi,

I would recommend you open a ticket with them and use one of the cache plugins verified by our compatibility team: https://wpml.org/plugin-functionality/caching/

Cheers!