Support » Plugin: Philantro - Donations and Donor Management » JSON error prevents modal from closing

  • Resolved Morgan Estes


    Inside an admin page for WS Forms, clicking on a link to view an entry brings up the Philantro modal instead. Once it’s open, it won’t close because of this error: Uncaught SyntaxError: JSON.parse: unterminated string at line 1 column 121 of the JSON data.

    Inspecting the string shows that the JSON is breaking at what would be the @ in the email address for organization_email: "[{\"first_name\":\"\",\"last_name\":\"\",\"email\":\"\",\"amount\":0,\"currency_symbol\":\"$\",\"color\":\"#9e3434\",\"organization_email\":\"jim".

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Morgan Estes


    Update: after some more searching, it’s actually breaking on a hyphen in the email address, not the ampersand. When the script calls const e ='-') it expects e[1] to be the stringified JSON string, but with a hyphen in the email address it only gets a portion of the data, and fills e[2] with the rest.

    Plugin Author Philantro Inc.


    Hi Morgan – Thanks. We reached out to DMEI via email and this issue has been solved. You hit the nail on the head, the hyphen in Jim’s email address was breaking during parsing because it’s also used as a delimiter.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JSON error prevents modal from closing’ is closed to new replies.