Skip Navigation

[Resolved] Map Filter by distance not working – admin-ajax 500 error

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

Problem:
Using a maps distance filter fails with an ajax error code 500 in the console.

Examining the PHP logs, a fatal error is reported:

PHP Fatal error: Uncaught Error: Call to undefined function mb_strtolower() in .../wp-content/plugins/types/application/controllers/utils/utils.php:154

Solution:
The MultiByte String extension must be activated on the server.

Relevant Documentation:
https://toolset.com/toolset-requirements/

This support ticket is created 4 years, 10 months ago. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by umbertoZ 4 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#1267661

Hi, I'm using Oxygen Builder, Toolset, WPML, Contact 7 and Yoast.

I set up a view with a custom search with a "distance" filter. It was working fine, but now it is not.

I'm getting this error:

.../wp-admin/admin-ajax.php 500

I'm also getting this error when I try to update Yoast:

Update Failed: Could not copy file. wordpress-seo/js/dist/components-1140.min.js

I had WP Fastest Cache on, I thounght that was the problem, but I'm getting both with WP Fastest Cache disabled.

can you help me?

#1267753

Nigel
Supporter

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

Timezone: Europe/London (GMT+01:00)

If the browser console reports a 500 error for an ajax request it means a fatal error on the server, and the specific error will be reported in your debug logs.

If you haven't already, turn on the debug log by editing your wp-config.php file and change the line with WP_DEBUG like so:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

That will create a debug.log file in your /wp-content/ directory which you can examine in any text editor. Try using the distance filter again and then inspect the log.

It sounds like you may also find other errors in the logs. The message from Yoast may be a symptom rather than a cause, but it wouldn't hurt to disable Yoast and then test the distance filter again.

#1268417

Hi, this is the error log:

[13-Jun-2019 15:56:31 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mb_strtolower() in .../wp-content/plugins/types/application/controllers/utils/utils.php:154
Stack trace:
#0 .../wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/definition_abstract.php(19): Types_Utils::is_string_match('location', 'Gallery')
#1 .../wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/definition_factory.php(535): Toolset_Field_Definition_Abstract->is_match('location')
#2 .../wp-content/plugins/types/application/controllers/api.php(310): Toolset_Field_Definition_Factory->query_definitions(Array)
#3 .../wp-includes/class-wp-hook.php(286): Types_Api->query_field_definitions(Array, Array)
#4 .../wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array)
#5 .../public_html/jcarchitect/wp-content/plugins/types/application/controllers/utils/utils.php on line 154

thanks

#1268819

Nigel
Supporter

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

Timezone: Europe/London (GMT+01:00)

Please see the requirements page: https://toolset.com/forums/topic/map-filter-by-distance-not-working-admin-ajax-500-error/

The Multibyte String extension must be enabled on your server.

#1268973

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.