Empty spaces in title breaking JSON validness

This topic contains 1 reply, has 2 voices, and was last updated by  Stiofan O’Connor 10 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #26805

    Marco Vega Ramos
    Free User
    Post count: 1

    Hello guys,

    I just came from two hours of really heavy debugging, I’m not a savvy developer. The problem I had is that in my big map my locations wouldn’t display. After testing several stuff and even reinstalling the plugin the problem persisted.

    Happens that whenever the JSON string is not valid, none of the markers will render. This is the JavaScript error if you ever come with this problem:

    SyntaxError: JSON Parse error: Unterminated string

    Here was my error after debugging the JSON string from:
    [PLUGIN]/geodirectory-functions/map-functions/js/map.js

    http://f.extd.co/1jpD4/1iIjSVwH

    Note the white areas before and after.

    jQuery.parseJSON(data);

    Code above will check the validness of the JSON string before parsing, so there’s the error.

    If you ever come up with this problem, removing white space might be the solution.

    #26847

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Marco,

    We have seen this problem a few time but it is rare, i would say the best solution is to fix the listing it’s self.

    Thanks,

    Stiofan

Viewing 2 posts - 1 through 2 (of 2 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount