We are running WordPress version 6.7.1 on PHP 8.3.21.
We are using Toolset Access 2.9.3, WPML Multilingual CMS 4.7.1 and WPML String Translation 3.3.1.
hidden link
Our site is running just fine with the exception of aa search function, which fails and outputs:
Fatal error: Uncaught TypeError: Cannot access offset of type array in isset or empty in /var/www/html/app/web/app/plugins/toolset-access/application/models/wpml_settings.php:456 Stack trace: #0 /var/www/html/app/web/wp/wp-includes/class-wp-hook.php(324): OTGS\Toolset\Access\Models\WPMLSettings->check_language_edit_permissions(Array, Array) #1 /var/www/html/app/web/wp/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #2 /var/www/html/app/web/app/plugins/wpml-multilingual-cms/sitepress.class.php(2888): apply_filters('wpml_active_lan...', Array, Array) #3 /var/www/html/app/web/app/plugins/wpml-multilingual-cms/inc/template-functions.php(96): SitePress->get_ls_languages(Array) #4 /var/www/html/app/web/app/themes/avada/includes/lib/inc/class-fusion-multilingual.php(366): icl_get_languages('skip_missing=0') #5 /var/www/html/app/web/app/themes/avada/includes/lib/inc/class-fusion-multilingual.php(262): Fusion_Multilingual::get_available_languages_wpml() #6 /var/www/html/app/web/app/themes/avada/includes/lib/inc/class-fusion-multilingual.php(85): Fusion_Multilingual::set_available_languages() #7 /var/www/html/app/web/app/themes/avada/includes/bootstrap.php(108): Fusion_Multilingual->__construct() #8 /var/www/html/app/web/app/themes/avada/functions.php(51): require_once('/var/www/html/a...') #9 /var/www/html/app/web/wp/wp-settings.php(672): include('/var/www/html/a...') #10 /var/www/html/app/web/wp-config.php(9): require_once('/var/www/html/a...') #11 /var/www/html/app/web/wp/wp-load.php(55): require_once('/var/www/html/a...') #12 /var/www/html/app/web/wp/wp-blog-header.php(13): require_once('/var/www/html/a...') #13 /var/www/html/app/web/index.php(6): require('/var/www/html/a...') #14 {main} thrown in /var/www/html/app/web/app/plugins/toolset-access/application/models/wpml_settings.php on line 456
This seems to suggest that a fix in Toolset (toolset-access/application/models/wpml_settings.php) is needed, similar to:
Hello. As mentioned, we are using WordPress version 6.7.1 on PHP 8.3.21.
We are using Toolset Access 2.9.3, WPML Multilingual CMS 4.7.1 and WPML String Translation 3.3.1.
The theme we are using is Avada. When we are launching a search on the site, e.g.
domain.com/en_EU/?s=parents&post_type%5B%5D=any&search_limit_to_post_titles=0&live_min_character=4&live_posts_per_page=10&live_search_display_featured_image=1&live_search_display_post_type=1&fs=1&lang=en_EU
We are getting this error:
Fatal error: Uncaught TypeError: Cannot access offset of type array in isset or empty in /var/www/html/app/web/app/plugins/toolset-access/application/models/wpml_settings.php:456 Stack trace: #0 /var/www/html/app/web/wp/wp-includes/class-wp-hook.php(324): OTGS\Toolset\Access\Models\WPMLSettings->check_language_edit_permissions(Array, Array) #1 /var/www/html/app/web/wp/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #2 /var/www/html/app/web/app/plugins/wpml-multilingual-cms/sitepress.class.php(2888): apply_filters('wpml_active_lan...', Array, Array) #3 /var/www/html/app/web/app/plugins/wpml-multilingual-cms/inc/template-functions.php(96): SitePress->get_ls_languages(Array) #4 /var/www/html/app/web/app/themes/avada/includes/lib/inc/class-fusion-multilingual.php(366): icl_get_languages('skip_missing=0') #5 /var/www/html/app/web/app/themes/avada/includes/lib/inc/class-fusion-multilingual.php(262): Fusion_Multilingual::get_available_languages_wpml() #6 /var/www/html/app/web/app/themes/avada/includes/lib/inc/class-fusion-multilingual.php(85): Fusion_Multilingual::set_available_languages() #7 /var/www/html/app/web/app/themes/avada/includes/bootstrap.php(108): Fusion_Multilingual->__construct() #8 /var/www/html/app/web/app/themes/avada/functions.php(51): require_once('/var/www/html/a...') #9 /var/www/html/app/web/wp/wp-settings.php(672): include('/var/www/html/a...') #10 /var/www/html/app/web/wp-config.php(9): require_once('/var/www/html/a...') #11 /var/www/html/app/web/wp/wp-load.php(55): require_once('/var/www/html/a...') #12 /var/www/html/app/web/wp/wp-blog-header.php(13): require_once('/var/www/html/a...') #13 /var/www/html/app/web/index.php(6): require('/var/www/html/a...') #14 {main} thrown in /var/www/html/app/web/app/plugins/toolset-access/application/models/wpml_settings.php on line 456
When inspecting the $post_type inside the wpml_settings.php file (line ~470), the post type is equal to array(1) { [0]=> string(3) "any" }. Is that correct?
Well - I need exact steps that should help me to reproduce the issue.
I visit your site:
- hidden link
And at top right corner there is a search icon and when I click on it, it offers the search box and when I input any string to search box, I do not see the issue. Also, I can see only couple of URL params added on URL and with your URL there are many URL params. For example:
- hidden link
Can you please clarify exact steps I will require to follow that should help me to reproduce the issue.