[Plugin: MapPress Easy Google Maps] WP 2.9 + mappress broken? (5 posts)

  1. Yalla-one
    Posted 5 years ago #

    WP2.9 + mappress displays a blank page (completely blank) and apache error-log prints:

    [Sat Dec 26 14:35:58 2009] [error] [client] PHP Fatal error: Call to undefined method Services_JSON::encodeUnsafe() in /home/hiawata.com/htdocs/wp-content/plugins/mappress-google-maps-for-wordpress/mappress.php on line 1225



  2. saschapi
    Posted 5 years ago #

    Same for me. I saw that Chris tried to fix this problem. It works for most of the people but not for us ;)
    For me changinge the mappress JSON function did the trick. Try changing the last lines of mappress.php:

    function mapp_json_encode($content) {
    	//if (!class_exists('Services_JSON'))
    	//	 require_once('class-json.php'); 
    	$json = new Services_JSON;
    	return $json->encode($content);

    I removed the "class-json.php" and modified the call to "encode" (which basically wrong but works in WP2.9. It will have to be changed once again when WP2.9.1 is available!

    Maybe this is also working for you if you have the same server setup! :)

  3. saschapi
    Posted 5 years ago #

    And by the way this is related to this issue:

  4. Yalla-one
    Posted 5 years ago #

    Thanks much saschapi! I don't know what it does, but your proposed change fixed it so it works again.

    I'll remember to re-install the original plugin once I upgrade to 2.9.1. Thanks much!

  5. chrisvrichardson
    Posted 5 years ago #


    This was a tricky issue, but I think it's resolved.

    The original problem was a bug in the wordpress 2.9 json_encode function (ticket 11537 above). I released MapPress to fix this.

    However, there was a second issue: there are other plugins that include versions of JSON.php that don't contain the encodeUnsafe function. If you were using one of these plugins, it would crash MapPress.

    I released MapPress a few days ago. It should fix both issues. I'm now including the standard JSON.php class in my own namespace with my own json_encode function module.

    When WordPress 2.9.1 is released I'll remove the extra code.

Topic Closed

This topic has been closed to new replies.

About this Topic