Support

Home Forums Event Espresso Premium CSV Export Failure

CSV Export Failure

Posted: April 10, 2018 at 1:26 pm


merit

April 10, 2018 at 1:26 pm

I’m attempting to export all of the CSVs from a client’s old website. We moved our client to a new site and a new, fresh install of Event Espresso, and we were unable to transfer old registrations over for a number of reasons. As such, as stated above, I’m attempting to export CSVs for all (3000+) registrations from the old site, but I’m consistently getting the same error:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
An error occurred and the job has been stopped.

I have tried filters, from events to dates, and combinations of them all, each giving me the same error.

We’ve attempted switching to the old export mode, per a support topic I came across earlier, and checked out the WP_Debug situation but we’ve come up with nothing.

Thanks


Tony

  • Support Staff

April 10, 2018 at 1:56 pm

Hi there,

We have received your support token request however in order to help with this we will need to be able to log into the site in question to view what is happening on the above request, can you resubmit the form and provide valid details we can use to log into the site?

It sounds like something is either hijacking the request or an error/notice is being thrown during the request which is then sent before the JSON data, so then EE sees the error when its expecting JSON and fails.


merit

April 10, 2018 at 2:22 pm

Hey Tony,

As I said in the support request, the site has two-factor authentication that is not controlled by myself or anyone on my time; this is a client project. I’ve requested that the 2fa is temporarily removed so someone from your team can log in and debug, but it’s not outside the realm of possibility for them to turn down that request; being a security company they’re terribly paranoid about these things.

Is there any direction you could point me in until I get a confirmation on giving you access?


Tony

  • Support Staff

April 10, 2018 at 2:42 pm

I saw that mentioned in your request but it basically ties our hands, without seeing the site I have no idea which request is actually failing as it could be a few, I can guess but then we run around in circles if it’s the wrong one.

Have you tried disabling all non-EE plugins and attempting the CSV export? I’m guessing you can’t disable plugins based on the above?

We’ve attempted switching to the old export mode, per a support topic I came across earlier, and checked out the WP_Debug situation but we’ve come up with nothing.

What WP_Debug situation?

Is error reporting enabled on the server? If so try disabling that, you can do that by using something like this:


// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

That enabled WP_Debug and WP_DEBUG_LOG so errors are logged in /wp-content/debug.log and then sets WP_DEBUG_DISPLAY to false to tell your server not to display errors (which may be happening as mentioned above) then for good measure, uses ini_set to set display_errors to 0 to try and make sure no errors display.

Then try running a CSV and see what happens.


merit

April 10, 2018 at 2:55 pm

My apologies, I didn’t mention in the post or support request that I’ve attempted disabling all plugins, except for the core EE plugin, switching to a default theme, and both together with no effect.

We checked out the debug file and got nothing, and attempted your code updates above with the same JSON parse error. Below is a list of errors in the debug file from the last time I attempted the export. I’m going to take a look at functions.php and see if any of the errors to which that refers relate to EE but to the best of my knowledge they do not.

Thanks.

[10-Apr-2018 20:50:10 UTC] PHP Notice:  Undefined variable: coursestart in /nas/content/live/meritmain/wp-content/themes/pro-child/functions.php on line 3182
[10-Apr-2018 20:50:10 UTC] PHP Warning:  Invalid argument supplied for foreach() in /nas/content/live/meritmain/wp-content/themes/pro-child/functions.php on line 3182
[10-Apr-2018 20:50:10 UTC] PHP Notice:  Undefined variable: coursestart in /nas/content/live/meritmain/wp-content/themes/pro-child/functions.php on line 3257
[10-Apr-2018 20:50:10 UTC] PHP Warning:  Invalid argument supplied for foreach() in /nas/content/live/meritmain/wp-content/themes/pro-child/functions.php on line 3257
[10-Apr-2018 20:50:10 UTC] PHP Notice:  Undefined variable: course_output in /nas/content/live/meritmain/wp-content/themes/pro-child/functions.php on line 3312
[10-Apr-2018 20:50:23 UTC] PHP Notice:  Trying to get property of non-object in /nas/content/live/meritmain/wp-content/plugins/revslider/includes/framework/base-admin.class.php on line 132


Tony

  • Support Staff

April 11, 2018 at 2:54 am

None of those errors relate to EE but if they are being thrown on the request that should return just JSON it can break that request even if they aren’t from EE itself, it shouldn’t if display_error is set to no but it wouldn’t be the first time we’ve seen that setting ignored on specific requests (depends on server config).

If you are comfortable with Chrome Dev tools you can use it to catch the admin-ajax.php requests used to trigger the batch exports and see if anything strange shows on those – http://take.ms/B2tzB

(Open Dev tools, check ‘preserve log’ and run an export, then go through the log to find the admin-ajax request and see it they look like mine)


merit

April 11, 2018 at 7:55 am

Hey Tony,

I gave that a shot and got a response that…kind of made sense? Basically I got the correct response, but there is an exclamation point first. This is super weird, but I’ve noticed while looking around on the site and switching pages, there is a brief flash of a blank screen with only an exclamation point. So, at the very least, there’s an association there that I can track down, and to that end I don’t necessarily think it’s an Event Espresso issue.

Having said that, if this is something you may have seen come up before, let me know!


merit

April 11, 2018 at 8:01 am

We found the issue: the first line in the WP_config file echoed an exclamation point. We have no idea why or how this was here, as this was not there before we brought the site down.

Thanks for your help.


Tony

  • Support Staff

April 11, 2018 at 10:09 am

Yeah that’ll do it, as it happens on every request it’s unexpected output before the JSON so you get an error.

Anyway, I’m glad you found the problem 🙂

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: publish

Updated by  Tony 1 week, 6 days ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!