Viewing form submissions creates critical error
-
I have several forms on my site but only one of them is showing this issue. When I try to view the submissions in the admin dashboard, I get a critical error message. If I filter the submission to the last 7 days then the submissions display, but anything more than the last 7 days and it triggers the error message.
-
Hi @helppawz1
I hope you’re well today and thank you for contacting us!
The fact that submissions older than last 7 days are causing errors may suggest that either “something” has changed about 7 days (or slightly more) ago that caused some sort of “corruption” of data or that there is some unexpected conflict that may affect filtering of the data.
But that’s an assumption only, as I can’t replicate any such issue on any of my test sites.
We’ll need some more information so I’d like to ask you following things:
1. Could you enable WordPress debugging and check what exact error is happening?
To do so:
a) add following lines to the “wp-config.php” file of your site, right above “/* That’s all, stop editing! */” line
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_DISPLAY', false ); define( 'WP_DEBUG_LOG', true );
b) once they are there try to trigger that error on submissions page a few times
c) and then look into the “/wp-content/” folder of your WordPress install on the server; there should be a file named “debug.log” generated so please share that file with us
– if you notice some private data there such as IPs or e-mails or similar in it, feel free to edit the file to mask them (e.g. replacing with just XXXXXX)
– then upload the file to your Google Drive, Dropbox or similar and share link to it in response below2. Did you try if the same issue happens if you temporarily disable all the plugins except Forminator? if not, could you give it a try? This would confirm if there is some conflict involved.
3. Also, right before the issue started to happen – were there any changes made on site/server whatsoever (including changes of configuration, updates etc) and if yes, what changes?
Best regards,
AdamI have added the code to the wp-config but there is no debug.log file unfortunately. It doesn’t take the site down, it just gives a screen with the data unformatted the screen looks like this: https://puppychoices.co.uk/wp-content/uploads/2023/10/Screenshot-2023-10-10-160405.png
I have tried disabling a few plugins but as it is a live site I am reluctant to take them all down at once.
I don’t think there were any changes to the site, other than perhaps updating of plugins to latest version automatically.
Hi @helppawz1,
I hope you are doing well today!
Your screenshot still shows that there is a critical error on your site. If you have added/replaced
define('WP_DEBUG', false);
with the following// 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( 'log_errors', 1 ); @ini_set( 'display_errors', 0 );
and still did not have any debug.log file created under wp-content folder, temporarily please change it to following;
// Enable WP_DEBUG mode define('WP_DEBUG', true); // Enable Debug logging to the /wp-content/debug.log file define('WP_DEBUG_LOG', true); // Enable displaying of errors and warnings define('WP_DEBUG_DISPLAY', true); @ini_set( 'log_errors', 1 ); @ini_set( 'display_errors', 1 );
So that you can see the errors printed out to the frontend. Please make sure to make it disabled after seeing the error and share the errors shown on the frontend with us.
Kind regards,
ZaferThank you, I’d made a mistake and had 2 lines, one true one false.
Here’s the log file: debug 12 oct.log
Hi @helppawz1,
Thanks for sharing the log, I could notice the issue. Just to be sure could you please confirm whether you are running the latest version of the Forminator plugin? ie version 1.27?
If I filter the submission to the last 7 days then the submissions display, but anything more than the last 7 days and it triggers the error message.
Is the above issue also related to one specific form? or do you notice the same with every form subimmision?
If its only specific to one form, could you also please share the form export so that we could have a better idea?
Please check the following doc on how to export a form:
https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#import-exportIf you are concerned about any sensitive information in the form, then you can duplicate your form, remove any sensitive information, and then export it.
You can share the export file via Google Drive, Dropbox or any cloud services in the next reply.
Looking forward to your response.
Best Regards,
Nithin
It is only one form – here is the export: forminator-litter-advert-creation-form-export.txt
I do have the latest version of Forminator (1.27.0)
Hi @helppawz1,
Thanks for sharing the export. I could replicate the issue, and I’m afraid this seems more of a bug.
I’m bringing this further to our developers attention to check what might be causing the issue and if there is any workaround that could be suggested.
Will keep you posted once we get further feedback asap.
Best Regards,
Nithin
Hi?@helppawz1,
Please try this snippet as a workaround until this bug is fixed on the plugin side:
<?php add_filter( 'pre_kses', function( $content, $allowed_html, $allowed_protocols ) { if ( is_array( $content ) ) { $content = wp_json_encode( $content ); } return $content; }, 9, 3 );
The above code can be added as a mu-plugins. Please check this link on how to implement the above code as a mu-plugins:
https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-pluginsRegards,
Nithin
Hi @helppawz1,
We haven’t heard from you in a while, we will go ahead and mark this thread as resolved. If you have any additional questions or require further help, please let us know!
Kind regards,
ZaferI can confirm that the workaround is successful, thank you!
- The topic ‘Viewing form submissions creates critical error’ is closed to new replies.