Home › Forums › Calendar Products › Event Aggregator › Malformed response with JSON returned
- This topic has 10 replies, 5 voices, and was last updated 9 years, 8 months ago by
Daniel Messina.
-
AuthorPosts
-
July 13, 2016 at 5:09 pm #1139425
Daniel Messina
ParticipantI seem to be having an error with any iCals that we have tried. The error seems to be occurring within the response from the ajax call followed by what appears to be a valid JSON formatted add-on response. This php error seems to be causing the alert of “…malformed response. Please see the JS console for more information.”
Here are the iCal calendars I have tested:
https://calendar.google.com/calendar/ical/h23qq7uln1taliebfudj0b0u2g%40group.calendar.google.com/public/basic.ics –Here is what we are seeing for a response:
<div style="padding:1px 10px;border-left:5px solid #EA0;"><p class="error_backtrace"> <strong>gzinflate(): data error</strong><br /> Backtrace from warning<br />In [...]\wp-includes\class-wp-http-encoding.php [line 58]: <ol> <li><unknown file> [line ?] calling process_error()</li> <li>[...]\wp-includes\class-wp-http-encoding.php [line 58] calling gzinflate()</li> <li>[...]\wp-includes\class-wp-http-curl.php [line 293] calling decompress()</li> <li>[...]\wp-includes\class-http.php [line 433] calling request()</li> <li>[...]\wp-includes\class-http.php [line 342] calling _dispatch_request()</li> <li>[...]\wp-includes\class-http.php [line 496] calling request()</li> <li>[...]\wp-includes\http.php [line 170] calling get()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Feed_Parser.php [line 251] calling wp_remote_get()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Feed_Parser.php [line 189] calling get_remote_content()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Main.php [line 665] calling __construct()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Ajax.php [line 205] calling getEventsData()</li> <li><unknown file> [line ?] calling ajaxGetPossibleEvents()</li> <li>[...]\wp-includes\plugin.php [line 525] calling call_user_func_array()</li> <li>[...]\wp-admin\admin-ajax.php [line 89] calling do_action()</li> </ol> </p></div><hr /> <div style="padding:1px 10px;border-left:5px solid #EA0;"><p class="error_backtrace"> <strong>gzinflate(): data error</strong><br /> Backtrace from warning<br />In [...]\wp-includes\class-wp-http-encoding.php [line 58]: <ol> <li><unknown file> [line ?] calling process_error()</li> <li>[...]\wp-includes\class-wp-http-encoding.php [line 58] calling gzinflate()</li> <li>[...]\wp-includes\class-wp-http-curl.php [line 293] calling decompress()</li> <li>[...]\wp-includes\class-http.php [line 433] calling request()</li> <li>[...]\wp-includes\class-http.php [line 342] calling _dispatch_request()</li> <li>[...]\wp-includes\class-http.php [line 496] calling request()</li> <li>[...]\wp-includes\http.php [line 170] calling get()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Feed_Parser.php [line 348] calling wp_remote_get()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Feed_Parser.php [line 420] calling lat_long_set()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Feed_Parser.php [line 219] calling parse_events()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Main.php [line 665] calling __construct()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Ajax.php [line 205] calling getEventsData()</li> <li><unknown file> [line ?] calling ajaxGetPossibleEvents()</li> <li>[...]\wp-includes\plugin.php [line 525] calling call_user_func_array()</li> <li>[...]\wp-admin\admin-ajax.php [line 89] calling do_action()</li> </ol> </p></div><hr /> <div style="padding:1px 10px;border-left:5px solid #EA0;"><p class="error_backtrace"> <strong>gzinflate(): data error</strong><br /> Backtrace from warning<br />In [...]\wp-includes\class-wp-http-encoding.php [line 58]: <ol> <li><unknown file> [line ?] calling process_error()</li> <li>[...]\wp-includes\class-wp-http-encoding.php [line 58] calling gzinflate()</li> <li>[...]\wp-includes\class-wp-http-curl.php [line 293] calling decompress()</li> <li>[...]\wp-includes\class-http.php [line 433] calling request()</li> <li>[...]\wp-includes\class-http.php [line 342] calling _dispatch_request()</li> <li>[...]\wp-includes\class-http.php [line 496] calling request()</li> <li>[...]\wp-includes\http.php [line 170] calling get()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Feed_Parser.php [line 912] calling wp_remote_get()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Feed_Parser.php [line 492] calling get_geo_coordinates()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Feed_Parser.php [line 219] calling parse_events()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Main.php [line 665] calling __construct()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Ajax.php [line 205] calling getEventsData()</li> <li><unknown file> [line ?] calling ajaxGetPossibleEvents()</li> <li>[...]\wp-includes\plugin.php [line 525] calling call_user_func_array()</li> <li>[...]\wp-admin\admin-ajax.php [line 89] calling do_action()</li> </ol> </p></div><hr /> <div style="padding:1px 10px;border-left:5px solid #EA0;"><p class="error_backtrace"> <strong>Cannot modify header information - headers already sent by (output started at [...]\wp-content\mu-plugins\no-white-screen.php:123)</strong><br /> Backtrace from warning<br />In [...]\wp-includes\functions.php [line 3035]: <ol> <li><unknown file> [line ?] calling process_error()</li> <li>[...]\wp-includes\functions.php [line 3035] calling header()</li> <li>[...]\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Ajax.php [line 225] calling wp_send_json()</li> <li><unknown file> [line ?] calling ajaxGetPossibleEvents()</li> <li>[...]\wp-includes\plugin.php [line 525] calling call_user_func_array()</li> <li>[...]\wp-admin\admin-ajax.php [line 89] calling do_action()</li> </ol> </p></div><hr /> {"count":1,"body":"\t\t\t\t<div class=\"description\">\r\n\t\t\t\t\t<span class=\"description\">\r\n\t\t\t\t\t\tThis is a preview of the type of content you will be getting in your recurring import.\t\t\t\t\t<\/span>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<input type=\"hidden\" id=\"_wpnonce\" name=\"_wpnonce\" value=\"59a7ae05b5\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/events-calendar-importer\/wp-admin\/admin-ajax.php\" \/>\t<div class=\"tablenav top\">\n\n\t\t\t\t<div class=\"alignleft actions bulkactions\">\n\t\t\t\t\t<\/div>\n\t\t<div class='tablenav-pages one-page'><span class=\"displaying-num\">1 item<\/span>\n<span class='pagination-links'><span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">«<\/span>\n<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">‹<\/span>\n<span class=\"paging-input\"><label for=\"current-page-selector\" class=\"screen-reader-text\">Current Page<\/label><input class='current-page' id='current-page-selector' type='text' name='paged' value='1' size='1' aria-describedby='table-paging' \/> of <span class='total-pages'>1<\/span><\/span>\n<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">›<\/span>\n<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">»<\/span><\/span><\/div>\n\t\t<br class=\"clear\" \/>\n\t<\/div>\n<table class=\"wp-list-table widefat fixed striped tribe_ajax\">\n\t<thead>\n\t<tr>\n\t\t<th scope=\"col\" id='start_date' class='manage-column column-start_date column-primary'>Start Date<\/th><th scope=\"col\" id='end_date' class='manage-column column-end_date'>End Date<\/th><th scope=\"col\" id='event' class='manage-column column-event'>Event<\/th>\t<\/tr>\n\t<\/thead>\n\n\t<tbody id=\"the-list\">\n\t\t<tr><td class='start_date column-start_date has-row-actions column-primary' data-colname=\"Start Date\">July 14, 2016<button type=\"button\" class=\"toggle-row\"><span class=\"screen-reader-text\">Show more details<\/span><\/button><\/td><td class='end_date column-end_date' data-colname=\"End Date\">July 14, 2016<\/td><td class='event column-event' data-colname=\"Event\">Test event gtest<\/td><\/tr>\t<\/tbody>\n\n\t<tfoot>\n\t<tr>\n\t\t<th scope=\"col\" class='manage-column column-start_date column-primary'>Start Date<\/th><th scope=\"col\" class='manage-column column-end_date'>End Date<\/th><th scope=\"col\" class='manage-column column-event'>Event<\/th>\t<\/tr>\n\t<\/tfoot>\n\n<\/table>\n\t<div class=\"tablenav bottom\">\n\n\t\t\t\t<div class=\"alignleft actions bulkactions\">\n\t\t\t\t\t<\/div>\n\t\t<div class='tablenav-pages one-page'><span class=\"displaying-num\">1 item<\/span>\n<span class='pagination-links'><span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">«<\/span>\n<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">‹<\/span>\n<span class=\"screen-reader-text\">Current Page<\/span><span id=\"table-paging\" class=\"paging-input\">1 of <span class='total-pages'>1<\/span><\/span>\n<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">›<\/span>\n<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">»<\/span><\/span><\/div>\n\t\t<br class=\"clear\" \/>\n\t<\/div>\n<div id=\"tribe-events-ical-status-category\">\r\n\t\t<label>\r\n\t\tImport Status:\r\n\t<\/label>\r\n\t<select name=\"tribe-events-importexport-import-status\" id=\"tribe-events-importexport-import-status\">\r\n\t\t selected='selected'<option value=\"publish\" selected='selected'>\r\n\t\t\t\t\t\t\tPublished\r\n\t\t\t\t\t\t\t<\/option><option value=\"pending\" >\r\n\t\t\t\t\t\t\tPending\r\n\t\t\t\t\t\t\t<\/option><option value=\"draft\" >\r\n\t\t\t\t\t\t\tDraft\r\n\t\t\t\t\t\t\t<\/option>\t<\/select>\r\n\r\n\t<label>\r\n\t\tCategory:\r\n\t<\/label>\r\n\t<select name=\"tribe-events-importexport-import-category\" id=\"tribe-events-importexport-import-category\">\r\n\t\t<option value=\"\">\r\n\t\t\tSelect Category\t\t<\/option>\r\n\t\t\t<\/select>\r\n\r\n\r\n\t\t<p>\r\n\t\t<label for=\"tribe-events-importexport-import-recurring_overwrite\">\r\n\t\t\tOverwrite Existing:\t\t<\/label>\r\n\t\t<input id=\"tribe-events-importexport-import-recurring_overwrite\" type=\"checkbox\" name=\"tribe-events-importexport-import-recurring_overwrite\" value=\"checked\" \/>\r\n\t\t<br>\r\n\t\t<small>\r\n\t\t\tIf checked the importer will update\/overwrite the existing events when they are changed in the source.\t\t<\/small>\r\n\t<\/p>\r\n\t<\/div><input type=\"hidden\" id=\"tribe-events-ical-importer-submit-import\" name=\"tribe-events-ical-importer-submit-import\" value=\"f3a98e784e\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/events-calendar-importer\/wp-admin\/admin-ajax.php\" \/>\r\n<div class=\"tribe-after-table-buttons\">\r\n\t<input type=\"button\" class=\"button-primary\" name=\"tribe-events-import-auto-import-save\" id=\"tribe-events-import-auto-import-save\" value=\"Save Recurring Import\"\/>\r\n\t<span class=\"spinner\" id=\"tribe-events-importexport-save-import-spinner\"><\/span>\r\n\t<div class=\"clear\">\r\n\t\t<span class=\"description\">\r\n\t\t\tThis will run the import now, then continue as a recurring import according to the settings.\t\t<\/span>\r\n\t<\/div>\r\n<\/div>\r\n","previous_request":{"url":"https:\/\/calendar.google.com\/calendar\/ical\/h23qq7uln1taliebfudj0b0u2g%40group.calendar.google.com\/public\/basic.ics","location":"Cheney, wa","radius":"160.9","start":"2016-07-13","keywords":"","schedule":"every_30mins","recurring_overwrite":"","paged":"1","action":"tribe_events_ical-importer_get_possible_events","manual":"true"}}July 14, 2016 at 6:06 am #1139605Cliff
MemberHi Daniel. Sorry you’re experiencing this, and thanks for all the details.
For that Cloudup link, I assume you’re trying to import this URL and not actually that Cloudup URL: http://calagator.org/events.ics
Either way, please follow our recommended troubleshooting steps:
Could you please make sure all your Modern Tribe plugins (and WordPress core) are at their latest versions?
Once you verify you’re on the latest versions, please test to see if the issue is still happening for you.
If it is, please follow our Testing for Conflicts Guide and see if that helps narrow down the cause of this.
If it doesn’t, please share your System Information (again once you’re in the Testing for Conflicts mode). That will give me a lot of extra information to help diagnose the problem.
Let us know what you find out.
Thanks.
July 14, 2016 at 8:47 am #1139684Daniel Messina
ParticipantWhen I was researching the issue, I came across other threads with this generic form response and:
- I’ve already attempted to go through these steps before creating this new thread;
- confirmed I was not using the cloudup url;
- Updated a segment of code found on another thread and have received the following subsequent underlying error:
<div style="padding:1px 10px;border-left:5px solid #EA0;"><p class="error_backtrace"> <strong>gzinflate(): data error</strong><br /> Backtrace from warning<br />In D:\xampp\htdocs\wpmu\wp-includes\class-wp-http-encoding.php [line 58]: <ol> <li><unknown file> [line ?] calling process_error()</li> <li>D:\xampp\htdocs\wpmu\wp-includes\class-wp-http-encoding.php [line 58] calling gzinflate()</li> <li>D:\xampp\htdocs\wpmu\wp-includes\class-wp-http-curl.php [line 293] calling decompress()</li> <li>D:\xampp\htdocs\wpmu\wp-includes\class-http.php [line 433] calling request()</li> <li>D:\xampp\htdocs\wpmu\wp-includes\class-http.php [line 342] calling _dispatch_request()</li> <li>D:\xampp\htdocs\wpmu\wp-includes\class-http.php [line 496] calling request()</li> <li>D:\xampp\htdocs\wpmu\wp-includes\http.php [line 170] calling get()</li> <li>D:\xampp\htdocs\wpmu\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Feed_Parser.php [line 348] calling wp_remote_get()</li> <li>D:\xampp\htdocs\wpmu\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Feed_Parser.php [line 420] calling lat_long_set()</li> <li>D:\xampp\htdocs\wpmu\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Feed_Parser.php [line 219] calling parse_events()</li> <li>D:\xampp\htdocs\wpmu\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Main.php [line 665] calling __construct()</li> <li>D:\xampp\htdocs\wpmu\wp-content\plugins\the-events-calendar-importer-ical\src\Tribe\Ajax.php [line 205] calling getEventsData()</li> <li><unknown file> [line ?] calling ajaxGetPossibleEvents()</li> <li>D:\xampp\htdocs\wpmu\wp-includes\plugin.php [line 525] calling call_user_func_array()</li> <li>D:\xampp\htdocs\wpmu\wp-admin\admin-ajax.php [line 89] calling do_action()</li> </ol> </p></div>July 14, 2016 at 9:53 pm #1140091Cliff
MemberWhen I tried your Gcal URL in iCal Importer, I got this error: “Your Start Date returned no results. Please adjust your Start Date.” –> https://cl.ly/3D0Y0u0f3w0M, but I think this is because of one of our known bugs that doesn’t include past events even if the “from date” is cleared out.
I’ll mark this ticket as Pending Fix, which means this thread should receive a reply once the applicable fix has been released. I cannot guarantee when it will be fixed as it’s in the development team’s hands now. They need to assign it, code it, test it, and schedule it for release.
Please note that even if this thread gets closed due to inactivity (automatically happens after a couple weeks), this thread should still get a reply added if/when the fix is released.
I apologize for this issue and appreciate your understanding and patience.
===
Trying http://calagator.org/events.ics in iCal Importer worked just fine for me: https://cl.ly/2n1P0W1K0z1m
===
Regardless, I’m not getting any PHP or WordPress error messages when trying to do iCal importing.
You might try disabling all custom coding/snippets (including the one(s) you referenced in a previous reply) and theme overrides, switching to a WordPress default theme like TwentySixteen, deactivating all non-Modern Tribe plugins, disabling PHP error reporting, and then trying these actions:
- try importing a Google Calendar URL that includes one or more events that are in the future
- try importing the Calagator URL
If these don’t work with the setup I described, please send me your System Information report while your setup is as I described, then you might also want to ask your web host if there’s anything they see that should be modified to get things working.
Thanks for your efforts here. Sorry you’re having to deal with it. I look forward to hearing back from you.
July 18, 2016 at 2:45 pm #1141200Daniel Messina
ParticipantI’ve tracked down an issue but I’m not yet sure whether it was related or not.
The latest versions of the plugins are:
The Event Calendar: 4.2.2
Events Calendar Pro: 4.2.2.1
iCal Importer: 4.2.2When installing these on a fresh wordpress installation, I get the following error:
The page "events" uses the "/events" slug: the Events Calendar plugin will show its calendar in place of the page. Edit the page slug or edit Events settings.Also, the Events > Settings > Events URL slug URL appears incorrect with http://your.domain/events-calendar-importer/events
However, When I install these versions:
The Event Calendar: 4.2.2
Events Calendar Pro: 4.2.2
iCal Importer: 4.2.2The error is not present and the Events URL slug setting has a URL of http://your.domain/events.
However, this doesn’t appear to resolve this malformed JS issue.
-
This reply was modified 9 years, 9 months ago by
Daniel Messina.
-
This reply was modified 9 years, 9 months ago by
Daniel Messina. Reason: editing for clarity
-
This reply was modified 9 years, 9 months ago by
Daniel Messina. Reason: clarity
July 19, 2016 at 9:07 am #1141496Cliff
MemberI created a fresh WP 4.5.3 install and activated the latest versions of those 3 plugins and did NOT get the message about /events already existing. That message should only appear if you’ve created a WordPress “Page” with that slug and should go away once you delete that page (or rename its slug). Or you could go to wp-admin > Events > Settings > “Events URL slug” to something other than “events”.
I created a test event on this fresh new WP install and its URL was http://localhost/event/test-event-1/ so I couldn’t replicate that issue either (that you reported for 4.2.2, 4.2.2.1, and 4.2.2). If you’re seeing “events-calendar-importer” instead of “event”, maybe you have something other than “event” in the “Single event URL slug” settings field.
When I did a One-Time Import test (1 event from http://calagator.org/events.ics), it imported as http://localhost/event/portland-azure-user-group/
Therefore, I wasn’t able to replicate any of the issues you’ve reported in this thread so far. 🙁
Please let me know if there’s anything else you can figure out that I might be able to recreate and therefore be able to create a bug report.
Thank you.
July 20, 2016 at 7:04 pm #1142247Daniel Messina
ParticipantThis reply is private.
July 21, 2016 at 10:34 am #1142580Cliff
MemberI’ll mark this ticket as Pending Fix, which means this thread should receive a reply once the applicable fix has been released. I cannot guarantee when it will be fixed as it’s in the development team’s hands now. They need to assign it, code it, test it, and schedule it for release.
If you don’t want to wait for the fix to be released, you could edit /wp-content/plugins/the-events-calendar-importer-ical/src/Tribe/Utils/Timezone_Parser.php to replace Line 104:
if ( ( new DateTime( $definition->getProperty( 'DTSTART' ) ) )->format( "c" ) == ( new DateTime( $transition["time"] ) )->format( "c" ) && $transition["offset"] === $this->parseOffsetToInteger( $definition->getProperty( 'TZOFFSETTO' ) ) ) {with this:
$start_datetime = new DateTime( $definition->getProperty( 'DTSTART' ) ); $transition_datetime = new DateTime( $transition[ 'time' ] ); if ( $start_datetime->format( 'c' ) == $transition_datetime->format( 'c' ) && $transition[ 'offset' ] === $this->parseOffsetToInteger( $definition->getProperty( 'TZOFFSETTO' ) ) ) {Let me know how you’d like to proceed.
August 5, 2016 at 10:27 am #1148294Geoff
MemberHey there,
Just wanted to give you a heads up that iCal Importer 4.2.3 was just released this week and included a fix for this issue. Please update when you have a chance and please do let us know if you continue to see this or any other issue happen — we’d be happy to help. 🙂
Cheers and thanks for working with us on this!
GeoffAugust 27, 2016 at 9:35 am #1156693Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Malformed response with JSON returned’ is closed to new replies.
