Home › Toolset Professional Support › [Resolved] Views plugin is suppressing display of PHP error messages.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
Tagged: Views plugin
This topic contains 7 replies, has 2 voices.
Last updated by Beda 6 years, 11 months ago.
Assisted by: Beda.
PHP error message display is correctly configured in wp-config.php
Since the last upgrade to View (I think) PHP errors are not appearing on-screen or in a log file.
De-activating the Views plugin causes the PHP errors to be displayed normally.
I have deleted and reinstalled the plugin, it hasn't really helped.
Sample page (with deliberate error) hidden link
I've done some more looking around, and I've noticed that wp-views/vendor/toolset/toolset-theme-settings/compatibility-modules/controllers/toolset-theme-integration-settings-front-end-controller.php
public function execute_global_option_hooks() { try { //Turn of error reporting when executing third-party methods to prevent unexpected runtime errors error_reporting( 0 );
turns off error reporting. Does it get turned back on somewhere else?
Well, this is strange.
I debug Views daily and I see the errors, this depends on a setting in wp-config.php.
The code you mention is only used when Integrations (Themes) have to be provided, but even with that I was not able to make the PHP error display disappear by simply using Views on the site.
This should definitely not happen.
Can you provide me examples how I can replicate this?
Hi Beda, thanks for your reply.
I have deactivated Views, Layouts and Types on my site.
You'll need to log in as admin (I've sent you login/pw) to see the error messages.
Go to hidden link - the template for this page has a deliberate PHP error which will display.
Now go to the Plugins page and Activate Views, Layouts and Types.
Go back to the /scratch page with the error and the error display disappears.
wp-config has the line
define('WP_DEBUG', true);
I've tried deactivating other plugins, it doesn't seem to make much difference.
Many thanks
Richard
You are right, as I suspected it happens only with the integrated themes, but also only if the error is not breaking the whole site.
I will escalate this, thank your for catching it!
This will be in the next Views / Layouts releases.
I will update you here as soon we have released that.
Many thanks, I am grateful for your help.
This was released in Views 2.5.1
Please let me know if there are any issues.