JSON: Syntax error, malformed JSON.
-
I just updated the plugin and upon import of my JSON feed I get the following error:
JSON: Syntax error, malformed JSON.
My JSON feed is found here: https://www.suffolkny-aa.org/meeting-guide.php
The JSON validator does not put up a similar error.
Has anyone encountered a similar issue?
The page I need help with: [log in to see the link]
-
Is there an easy way to roll back a plug-in update to confirm that it’s a plug-in issue and not an issue with my JSON feed?
What specifically was added as part of the CSV/JSON validation on in v3.6.5?
by setting
$tsml_conference_providers = array();I was able to import my JSON. Still not sure what part of my JSON was causing the provider validator to barf.
I made this change directly in variable.php. Which I assume will be overwritten then next time I update the plug-in.
The comment above the initialization of this line of code mentions doing this is the ‘Theme’ instead. Where would I put this in the theme? I’m a little green when it comes to customizing themes with regards to plug-in initialization.
I got this working… although I am always a little uneasy when I fix something and not 100% sure how I did it.
But I believe I had some invisible characters embedding in the conference_url string for one of my meetings that was causing the issue.
Beware copy/pasting from Excel or Google Sheets to source code. Arghhh
RESOLVED…
To answer your question, yes, changes made directly to
variables.phpwill be overwritten.You can make a child theme and add the code there. There may be some other ways too using plugins. You can do some researching for alternatives.
Was this a json feed or a CSV import?
It was a JSON feed. My IG has a separate meeting DB and we generate the JSON feed on demand for consumption by meeting guide app and this plugin.
I was able to work around the problem by editing variables.php to skip the provider validation code.
I then started looking at the portions of my list that I thought might be causing the issues, didn’t really do anything major but did roundtrip a suspect string to notepad and back and then backed out the changes to variables.php since I didn’t like the results of skipping the conference provider validation code.
That did the trick… but I can’t really say I know for certain what caused the problem to begin with. I suspect their was an funky invisible character in the URL string.
While I have your attention, I have a few random questions with regards to plug-in. Please feel free to reply directly to me via [email protected] or point me to the threads where this might already be addressed:
1. is there a way to run the JSON import code on a schedule? I assumed this was the case, but instead have to do the import manually whenever there is a change to my meeting list DB.
2. is there a way to have the meeting type displayed next to meeting much in the way Men’s and Women’s meetings are? I noticed http://nassauaa.org/meetings/ was displaying in this way… before the COVID-19 craziness started and the TL meeting type added. I assume this is some CSS magic that I am not aware of… but it could also so be some customization of the plug-in code. Do you know how they did it?
One more quesion:
3. This is more of a meeting guide app question, but I’ll go ahead and ask it anyway. I’m assuming the meeting guide app pulls our JSON feed twice a day … as before we started using the plug-in.
But I also understand the plug-in feeds into the meeting guide app. How does this happen? Does it happen on a schedule? This hasn’t caused us a problem to date, but is this how other IGs handle this?
To restate: We use the same JSON feed for the meeting guide app AND for the plug in. Is this how this the correct way to do this?
Gotta be quick as I’m heading out the door:
1) We have this on our todo list, so if you’re a coder and can contribute, let me know. The basic approach is to use WordPress’ CLI/cron.
2) We call those flags, and with the newer plugin versions, we flag Men, Women, Location Temporarily Closed and Online Meeting. The latter two will not be displayed together; Online Meeting will take precedence. Adding more of these requires changes to PHP, JS and CSS. If the Nassau website had other flags they were displaying, I’m not sure what they did.
3) Are you in TIAA Forum? If not, you might consider joining and being a part of the AA technical fellowship. Anyway, we were able to convinced the Meeting Guide folks to increase the polling frequency to every three hours. AFAIK, this is the same for plugin or JSON feed sites.
HTH
Thank you for the reply. I am on the TIAA Forum. I will follow up with you there to see where I can be of most help.
About your questions regarding including the meeting flags like had been done on the Nassau Intergroup site, as well as changing the order of the columns on the web site,
check the FAQ’s questions/answers on the main plug in page (scroll down, I missed it
for a long time).
Check the answers which talk about making additions to the themes “functions.php” file.
“Can I see types in the Meeting list?…”
There are a couple other tweaks that are also talked about in the FAQ.
These changes only work on the local websites copy of the meeting list and do not
get transferred through to the Meeting Guide Web app.
The topic ‘JSON: Syntax error, malformed JSON.’ is closed to new replies.