WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Yalla-one
    Member
    Posted 4 years ago #

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

    [Sat Dec 26 14:35:58 2009] [error] [client 88.88.88.248] 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

    Anyone?

    http://wordpress.org/extend/plugins/mappress-google-maps-for-wordpress/

  2. saschapi
    Member
    Posted 4 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
    Member
    Posted 4 years ago #

    And by the way this is related to this issue:
    http://core.trac.wordpress.org/ticket/11537

  4. Yalla-one
    Member
    Posted 4 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
    Member
    Posted 4 years ago #

    Hi,

    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 1.5.8.9 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 1.5.8.10 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