How to fix the error log
-
I had an issue where sometimes a form submits correctly (i.e. email sent, submission logged in Flamingo etc.) but wasn’t added to the spreadsheet, and no error was reported in the debug log.
I had a look at the plugin source code and found that you need to comment out the following lines of /wp-content/plugins/cf7-google-sheets-connector/lib/google-sheets.php
Comment out lines:
125
// try {
184-187
// } catch ( Exception $e ) {
// return null;
// exit();
// }`These lines cause the plugin to ignore any error (Exception) which occurs when adding a row – it simply ignores the error when it is caught, instead of logging it. I’m not sure why the developer did this, it seems a bit silly so I figure it was an oversight.
By commenting these lines out, the Exception bubbles up to \plugins\cf7-google-sheets-connector\includes\class-gs-service.php where it is caught on line 256 and added to the debug log as a result.
After doing this, I could see the error in the log – in my case, it was:
Quota exceeded for quota metric ‘Read requests’ and limit ‘Read requests per minute’ of service ‘sheets.googleapis.com’ for consumer ‘project_number:xxxxxxx’.
So at least I can use the data in the error log to manually back-fill these. Not ideal, but better than nothing!Please fix this in future versions so I don’t have to repeat this fix whenever the plugin is updated – thanks 🙂
Presh
The topic ‘How to fix the error log’ is closed to new replies.