Home›Support›English Support›[Resolved] PHP Warning in multisite installation from site that is not using wpml
[Resolved] PHP Warning in multisite installation from site that is not using wpml
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.
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.
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.
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
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.
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
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.