Forums

[resolved] [Plugin: Geotag] map has disappeared (3 posts)

  1. Steve Taylor
    Member
    Posted 2 years ago #

    I'm currently working on this emergency - on a client's recently launched website the Geotag map has simply disappeared.

    The maps still display fine on the single post pages:

    http://www.voteglobal.org.uk/events/norwich-south-climate-question-time/

    But on the main events page I've had to temporarily switch in some placeholder copy:

    http://www.voteglobal.org.uk/events/

    To be clear:

    * This map is placed with the following shortcode in the page's content: [gmap marker_query="numberposts=-1&cat=3"]
    * I have hacked the Geotag plugin in order to only display future events (which are posts, the event date being the publish date). I've tried reverting to the original plugin code, same result.
    * What does get output (you won't see this now because I've put the placeholder code in) is this markup: <div style="width: 570px; height: 500px;" class="gmap" id="gmap_14_1"></div>
    * I have the plugin settings set to only display on posts and pages. I've tried checking all these boxes, and commenting out the first line of the parseShortcode() function in case this was getting confused, no luck.

    This is a bit of an emergency, if anyone can help I'd be very grateful.

    http://wordpress.org/extend/plugins/geotag/

  2. Steve Taylor
    Member
    Posted 2 years ago #

    A little more detail: it displays a generic map if I remove the "marker_query" attribute from the shortcode. But passing any kind of query results in no map at all.

  3. Steve Taylor
    Member
    Posted 2 years ago #

    OK, I've fixed it. The issue was that someone put a post up with single quotes in the title - and this broke the scripting.

    As I'm hacking this plugin anyway, I've added my own fix. For the record, in the original plugin it would be line 526, changing:

    $val->post_title

    To:

    str_replace( "'", "\'", $val->post_title )

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags