Support

Home Forums Event Espresso Premium REGISTRATION CSV REPORT error when using in Registrations

REGISTRATION CSV REPORT error when using in Registrations

Posted: April 19, 2024 at 3:39 pm


EasternEvents

April 19, 2024 at 3:39 pm

The REGISTRATION CSV REPORT button at the bottom of an event registration creates a CSV file that automatically exports to the browser downloads folder.

It works properly when the registrations are rendered from the EVENT ESPRESSO EVENTS page. However, when bypassing the EVENTS page and using the EVENT ESPRESSO REGISTRATIONS page, an error develops when trying to use the REGISTRATION CSV REPORT button.

I get a “502 Bad Gateway, nginx” error.

I am not trying to export the entire 8000 registrations. I typically filter month by month. So, I can see that the list will be rather short for June 2023 (the start of our fiscal year). Not many events are purchased during June. I have tried filtering successive months with instant Gateway errors.

Is this re-creatable on your end, or do I have a misconfiguration with my hosting system?


EasternEvents

April 19, 2024 at 3:51 pm

As we approach the close of our fiscal year, I prefer exporting the Registration reports for analysis in a monthly display fashion, because the action has an EVENT NAME filter (which is missing when exporting CSV by Event).

The Event Name filter is inserted after the REGISTRATION ID column and in front of the FIRST NAME column.

This is a valuable column when analyzing lots of events listed by category.


Rio

  • Support Staff

April 19, 2024 at 8:13 pm

Hello,

Let me try to recreate the issue. Can you tell us your site PHP version, EE version and and database.

Can you also shoot video on the problem you experience? you can use loom to do that.

Have you also tried if there’s any possible plugin conflict? and if you also receive any error log?

Check this article here.
https://eventespresso.com/wiki/troubleshooting-checklist/

thanks


EasternEvents

April 20, 2024 at 10:21 am

I went through the process of deactivating all the non-EE plugins. I try to keep a minimum of plugins because this is meant to be primarily an Event E-Comm website: https://PatrollerSchool.org

We are lucky that our events follow a season. The last transaction is recorded on May 5th, and the new selling season begins mid-June. This gives me five weeks for overhauling and site maintenance, such as hosting site upgrades. I will upgrade MySQL and PHP in May.

Today, we use the following versions:

    Event Espresso – 5.0.19.p
    WordPress Version 6.5.2
    Divi Version: 4.25.0
    MySQL version 5
    PHP 7.4

A video won’t help because I just set the Month picker to JUNE2023, EE produces the following long URL and the “502 Bad Gateway” error. See if the URL is assembling correctly:

https://www.patrollerschool.org/events/wp-admin/admin.php?page=espresso_registrations&return_url=%2F%2Fwww.patrollerschool.org%2Fevents%2Fwp-admin%2Fadmin.php%3Fs%26_wpnonce%3Df57641ead2%26_wp_http_referer%3D%252Fevents%252Fwp-admin%252Fadmin.php%253Fpage%253Despresso_registrations%26action%3D-1%26month_range%3DJune%2B2023%26EVT_CAT%3D-1%26_reg_status%3D0%26use_filters%3Dyes%26page%3Despresso_registrations%26route%3Ddefault%26perpage%3D250%26approve_registrations_nonce%3D72a90a51d2%26approve_and_notify_registrations_nonce%3D1c7960cf0c%26decline_registrations_nonce%3D9cc6165063%26decline_and_notify_registrations_nonce%3D4e719511ac%26pending_registrations_nonce%3Dfa71828a0a%26pending_and_notify_registrations_nonce%3D01bea56343%26no_approve_registrations_nonce%3Dcf6adc9c0b%26no_approve_and_notify_registrations_nonce%3D44a044ed17%26cancel_registrations_nonce%3Dad65fc8419%26cancel_and_notify_registrations_nonce%3D8f7d558872%26wait_list_registrations_nonce%3D439c976b65%26wait_list_and_notify_registrations_nonce%3D2e5d124fb6%26trash_registrations_nonce%3D83d8a2ad57%26paged%3D1%26action2%3D-1%26default_nonce%3D2c89334826&use_filters=1&filters%5Bs%5D&filters%5B_wpnonce%5D=f57641ead2&filters%5Bmonth_range%5D=June%202023&filters%5BEVT_CAT%5D=-1&filters%5B_reg_status%5D=0&filters%5Broute%5D=default&filters%5Bperpage%5D=250&filters%5Bapprove_registrations_nonce%5D=72a90a51d2&filters%5Bapprove_and_notify_registrations_nonce%5D=1c7960cf0c&filters%5Bdecline_registrations_nonce%5D=9cc6165063&filters%5Bdecline_and_notify_registrations_nonce%5D=4e719511ac&filters%5Bpending_registrations_nonce%5D=fa71828a0a&filters%5Bpending_and_notify_registrations_nonce%5D=01bea56343&filters%5Bno_approve_registrations_nonce%5D=cf6adc9c0b&filters%5Bno_approve_and_notify_registrations_nonce%5D=44a044ed17&filters%5Bcancel_registrations_nonce%5D=ad65fc8419&filters%5Bcancel_and_notify_registrations_nonce%5D=8f7d558872&filters%5Bwait_list_registrations_nonce%5D=439c976b65&filters%5Bwait_list_and_notify_registrations_nonce%5D=2e5d124fb6&filters%5Btrash_registrations_nonce%5D=83d8a2ad57&filters%5Bpaged%5D=1&filters%5Baction2%5D=-1&action=registrations_report&registrations_report_nonce=dcf2462a6c&return=-1


EasternEvents

April 20, 2024 at 11:41 am

NEW INFORMATION

I decided to explore all the choice possibilities other than Month/Year from the picker box…

The REGISTRATION CSV REPORT button produces perfect export files when I select the following text link choices offered by EE:

    View All Registrations(7399)
    Today – Apr 20, 2024(0)
    Yesterday – Apr 19, 2024(0)
    This Month(79)
    Incomplete(77)
    Trash(0)

No Bad Gateway errors. I got the entire database of 7399 registrations, from which I was able to trim it down to my requirement of June2023 to April2024. I got what I need for end-of-season analysis.

So then I tried using picker choices from the pull-down boxes. All three boxes produce that Bad Gateway error. These are the picker boxes:

    Select a Month/Year
    All Categories
    Select Status


EasternEvents

April 20, 2024 at 11:56 am

Is it valuable to compare and contrast the URL produced by each?

This URL for the link THIS MONTH (79) worked with the REGISTRATION CSV REPORT button:

https://www.patrollerschool.org/events/wp-admin/admin.php?page=espresso_batch&batch=file&filters=a%3A5%3A%7Bi%3A0%3Ba%3A2%3A%7Bs%3A6%3A%22STS_ID%22%3Ba%3A2%3A%7Bi%3A0%3Bs%3A2%3A%22%21%3D%22%3Bi%3A1%3Bs%3A3%3A%22RIC%22%3B%7Ds%3A8%3A%22REG_date%22%3Ba%3A2%3A%7Bi%3A0%3Bs%3A7%3A%22BETWEEN%22%3Bi%3A1%3Ba%3A2%3A%7Bi%3A0%3Bs%3A19%3A%222024-04-01+00%3A00%3A00%22%3Bi%3A1%3Bs%3A19%3A%222024-04-30+23%3A59%3A59%22%3B%7D%7D%7Ds%3A4%3A%22caps%22%3Bs%3A10%3A%22read_admin%22%3Bs%3A24%3A%22default_where_conditions%22%3Bs%3A15%3A%22this_model_only%22%3Bs%3A8%3A%22order_by%22%3Ba%3A3%3A%7Bs%3A8%3A%22REG_date%22%3Bs%3A4%3A%22DESC%22%3Bs%3A9%3A%22REG_count%22%3Bs%3A3%3A%22ASC%22%3Bs%3A6%3A%22REG_ID%22%3Bs%3A4%3A%22DESC%22%3B%7Ds%3A5%3A%22limit%22%3Ba%3A2%3A%7Bi%3A0%3Bi%3A0%3Bi%3A1%3Bi%3A10%3B%7D%7D&use_filters=1&job_handler=EventEspresso%5Ccore%5Clibraries%5Cbatch%5CJobHandlers%5CRegistrationsReport&return_url=%2F%2Fwww.patrollerschool.org%2Fevents%2Fwp-admin%2Fadmin.php%3Fpage%3Despresso_registrations%26action%3Ddefault%26default_nonce%3D2c89334826%26status%3Dmonth%26return%3D-1&action=default&default_nonce=2c89334826&return=registrations_report

This is the identical filtration, using the picker box selecting APRIL2024. I click the filter button and see 79 lines of registration rendered on the page. This is the failed URL that is generated along with the 502 Bad Gateway error:

https://www.patrollerschool.org/events/wp-admin/admin.php?page=espresso_registrations&return_url=%2F%2Fwww.patrollerschool.org%2Fevents%2Fwp-admin%2Fadmin.php%3Fs%3D%26_wpnonce%3Df57641ead2%26_wp_http_referer%3D%252Fevents%252Fwp-admin%252Fadmin.php%253Fpage%253Despresso_registrations%2526action%253Ddefault%2526default_nonce%253D2c89334826%2526status%253Dall%2526return%253Ddefault%26action%3D-1%26month_range%3DApril%2B2024%26EVT_CAT%3D-1%26_reg_status%3D0%26use_filters%3Dyes%26page%3Despresso_registrations%26route%3Ddefault%26perpage%3D250%26approve_registrations_nonce%3D72a90a51d2%26approve_and_notify_registrations_nonce%3D1c7960cf0c%26decline_registrations_nonce%3D9cc6165063%26decline_and_notify_registrations_nonce%3D4e719511ac%26pending_registrations_nonce%3Dfa71828a0a%26pending_and_notify_registrations_nonce%3D01bea56343%26no_approve_registrations_nonce%3Dcf6adc9c0b%26no_approve_and_notify_registrations_nonce%3D44a044ed17%26cancel_registrations_nonce%3Dad65fc8419%26cancel_and_notify_registrations_nonce%3D8f7d558872%26wait_list_registrations_nonce%3D439c976b65%26wait_list_and_notify_registrations_nonce%3D2e5d124fb6%26trash_registrations_nonce%3D83d8a2ad57%26paged%3D1%26action2%3D-1%26default_nonce%3D2c89334826&use_filters=1&filters%5Bs%5D&filters%5B_wpnonce%5D=f57641ead2&filters%5Bmonth_range%5D=April%202024&filters%5BEVT_CAT%5D=-1&filters%5B_reg_status%5D=0&filters%5Broute%5D=default&filters%5Bperpage%5D=250&filters%5Bapprove_registrations_nonce%5D=72a90a51d2&filters%5Bapprove_and_notify_registrations_nonce%5D=1c7960cf0c&filters%5Bdecline_registrations_nonce%5D=9cc6165063&filters%5Bdecline_and_notify_registrations_nonce%5D=4e719511ac&filters%5Bpending_registrations_nonce%5D=fa71828a0a&filters%5Bpending_and_notify_registrations_nonce%5D=01bea56343&filters%5Bno_approve_registrations_nonce%5D=cf6adc9c0b&filters%5Bno_approve_and_notify_registrations_nonce%5D=44a044ed17&filters%5Bcancel_registrations_nonce%5D=ad65fc8419&filters%5Bcancel_and_notify_registrations_nonce%5D=8f7d558872&filters%5Bwait_list_registrations_nonce%5D=439c976b65&filters%5Bwait_list_and_notify_registrations_nonce%5D=2e5d124fb6&filters%5Btrash_registrations_nonce%5D=83d8a2ad57&filters%5Bpaged%5D=1&filters%5Baction2%5D=-1&action=registrations_report&registrations_report_nonce=dcf2462a6c&return=-1


Tony

  • Support Staff

April 23, 2024 at 2:34 am

Hi there,

Firstly, thank you for the thorough testing and reporting 🙂

5XX errors aren’t thrown from within EE itself, those are server-side errors and 502 Bad Gateway means the server received an invalid response from upstream (could be a proxy, load balancer etc which then received an error from the server processing the request).

Now that’s not to say EE isn’t causing the error (obviously it is here) but, I’m not getting any errors on 5.0.19.p when testing the same steps so EE is likely triggering something on the server here, for example, a mod_sec rule which doesn’t like the CSV request with the filters set.

Can you test the ‘old’ CSV reporting on the site, please? To do that, just add:

define( 'EE_USE_OLD_CSV_REPORT_CLASS', true );

to your site’s wp-config.php file and then perform the same test.

That disables the ‘batch’ processing but I’d like to see if that also triggers a 502 if possible.


EasternEvents

April 23, 2024 at 7:56 am

I made the edit into wp-config.php and the host server tried to process the JUNE2023 filtered CSV query string.

This time, the behavior took 2 minutes to time out and returned a 500 Server Error:

It looked different. I recognized it as a server error, whereas the Gateway Error occurs instantly upon button press.

Thanks for the suggested probe…


Tony

  • Support Staff

April 23, 2024 at 9:24 am

This time, the behavior took 2 minutes to time out and returned a 500 Server Error:

That is likely a timeout error, but I wouldn’t expect a timeout with those lower numbers of registrations (the ‘old’ system had issues from about 2000 registrations up, it was heavily dependant on the server in use).

I recognized it as a server error, whereas the Gateway Error occurs instantly upon button press.

I assumed the 502 errors were instant earlier, that’s part of why I suspect is hitting a mod_sec rule. Request initiates and is instantly blocked, usually to a 404 or 403 but not always.

Ok, lets try some error logging and see where that gets us.

In your wp-config.php file, add this:

https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug

That snippet replaces this single line that is usually already set in that file: define( 'WP_DEBUG', false);

That tells the serve to log error within /wp-content/debug.log

With that code in place, try again (you can try both with and without define( 'EE_USE_OLD_CSV_REPORT_CLASS', true ); if preferred but I’m currently focusing on what happens without that being set)


EasternEvents

April 23, 2024 at 10:04 am

I set up the DeBug TRUE snippet, but I can not find ../wp-content/debug.log

It does not seem to be creating the log file.

Is there another place to look? Is it putting the log elsewhere?


Rio

  • Support Staff

April 23, 2024 at 5:15 pm

Hello,

Just to be sure, did you use whole blocked here.
https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug

define( 'WP_DEBUG', true );
if ( WP_DEBUG ) {
        @ini_set( 'display_errors', 0 );
        define( 'WP_DEBUG_LOG', true );
        define( 'WP_DEBUG_DISPLAY', false );
}

After adding the code, you have to recreate the issue, by processing the JUNE2023 filtered CSV query string.

then you go and check the log and send it to us.

thanks


EasternEvents

April 24, 2024 at 7:37 am

Yes, I used the entire block and left it in. After your message, I decided to force a detectable bug in another location.

This produced the DEBUG LOG in the correct location. This morning, I logged into the admin EE panel. Went to registrations. Filtered for JUNE2023, then July thru October.

The 502 Gateway Error instantly poped up, but upon opening the debug log, nothing was added from EE. This is what I pulled off the log:

[23-Apr-2024 16:53:06 UTC]  .../builder/core.php:5358  et_builder_get_google_fonts():
An unkown error has occured while trying to retrieve the fonts from the Google Fonts API. Please ensure your Google API Key is valid and active.

It ended without recording errors…


Rio

  • Support Staff

April 24, 2024 at 6:49 pm

A 502 gateway error usually means the server is down, not necessarily running into any error from code or conflicts.

Can you check your hosting about this?

You also try this troubleshooting method:

Try temporarily deactivating all other plugins on the site and try those links again. If no Bad Gateway error with all other plugins deactivate, you reactivate the other plugins one-by-one until the you see the error again.

You can check similar thread here.
https://eventespresso.com/topic/filtered-csv-export-and-502-error/

thanks

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

Event Espresso