Skip Navigation

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.

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

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqas Bin Hasan 1 year, 5 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
November 8, 2023 at 3:22 am #14752565

manitS

Description:
Search (using Ajax Search Pro plugin shortcode) does not work when Ajax Search Pro WPML compatibility feature is enabled in PHP 8.2. Message that appears when searching: "The request failed. Please check your connection! Status: 500"

Error in log:

PHP Fatal error:  Uncaught TypeError: Illegal offset type in isset or empty in /home/customer/www/.../public_html/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/class-wpml-url-cached-converter.php:46

The issue does not appear in PHP 7.4

WPML Info & Config:
- Version: 4.6.7 (latest)
- Language URL format: Different languages in directories
- Language filtering for AJAX operations: Enabled

Ajax Search Pro Info & Config:
- Version: 4.26.2 (latest)
- Use the custom ajax handler: Disabled
- WPML compatibility: Enabled

WordPress Info:
- Version: 6.4
- PHP: 8.2.12

Full Log:

[08-Nov-2023 02:20:47 UTC] PHP Fatal error:  Uncaught TypeError: Illegal offset type in isset or empty in /home/customer/www/.../public_html/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/class-wpml-url-cached-converter.php:46
Stack trace:
#0 /home/customer/www/.../public_html/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/class-wpml-url-converter.php(149): WPML_URL_Cached_Converter->get_language_from_url(Object(WP_Error))
#1 /home/customer/www/.../public_html/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/class-wpml-url-cached-converter.php(33): WPML_URL_Converter->convert_url(Object(WP_Error), 'en')
#2 /home/customer/www/.../public_html/wp-content/plugins/sitepress-multilingual-cms/classes/API/Hooks/class-wpml-api-hook-permalink.php(37): WPML_URL_Cached_Converter->convert_url(Object(WP_Error), 'en')
#3 /home/customer/www/.../public_html/wp-includes/class-wp-hook.php(324): WPML_API_Hook_Permalink->wpml_permalink_filter(Object(WP_Error), 'en')
#4 /home/customer/www/.../public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Object(WP_Error), Array)
#5 /home/customer/www/.../public_html/wp-content/plugins/ajax-search-pro/includes/classes/Search/SearchTaxonomyTerms.php(470): apply_filters('wpml_permalink', Object(WP_Error), 'en')
#6 /home/customer/www/.../public_html/wp-content/plugins/ajax-search-pro/includes/classes/Search/AbstractSearch.php(104): WPDRMS\ASP\Search\SearchTaxonomyTerms->postProcess()
#7 /home/customer/www/.../public_html/wp-content/plugins/ajax-search-pro/includes/classes/Query/SearchQuery.php(911): WPDRMS\ASP\Search\AbstractSearch->search('tes')
#8 /home/customer/www/.../public_html/wp-content/plugins/ajax-search-pro/includes/classes/Query/SearchQuery.php(470): WPDRMS\ASP\Query\SearchQuery->get_posts()
#9 /home/customer/www/.../public_html/wp-content/plugins/ajax-search-pro/includes/classes/Hooks/Ajax/Search.php(60): WPDRMS\ASP\Query\SearchQuery->__construct(Array, 5, Array)
#10 /home/customer/www/.../public_html/wp-includes/class-wp-hook.php(324): WPDRMS\ASP\Hooks\Ajax\Search->handle('')
#11 /home/customer/www/.../public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#12 /home/customer/www/.../public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#13 /home/customer/www/.../public_html/wp-admin/admin-ajax.php(203): do_action('wp_ajax_nopriv_...')
#14 {main}
  thrown in /home/customer/www/.../public_html/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/class-wpml-url-cached-converter.php on line 46
November 8, 2023 at 9:45 am #14754467

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

Unfortunately the said plugin isn't on our compatibility list and we don't have much reported about it in our forums too.

Apparently I'll advise to check with plugin author and can return with any useful/technical information which I can then discuss with my team.

Theme and plugin authors are welcome to join WPML’s Go Global program, which helps them make their code multilingual ready. Together with WPML’s compatibility team, they can test and confirm that their theme or plugin works with WPML. See https://wpml.org/documentation/support/go-global-program/ for details and you can refer your theme/plugin provider to this as well.

Besides that, I'll also advise to check with only WPML, Ajax Search Pro and a default WP theme too (if you haven't) to ensure that issue occurs in a minimal setup too. Remember to take full backup before trying this.

Please let me know your findings and any information you receive from the plugin author. And I'll try my best to further help you on the matter.

Regards.

The topic ‘[Closed] WPML and Ajax Search Pro Issues in PHP 8.2’ is closed to new replies.