Skip Navigation

[Resolved] updating CREDFrontendEditor to 1.42: other plugins throw Undefined index Notices

This support ticket is created 8 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by gaborN 8 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#349295

Hello,

I updated to "CRED Frontend Editor" to version 1.4.2 from 1.4.1. From then on I get a lot of these, they keep coming:
PHP Notice: Undefined index: .../plugins/ssite-customroles/ssite-customroles-pluginhider.inc.php on line 37
PHP Notice: Undefined property: stdClass::$slug in .../wp-admin/includes/class-wp-plugin-install-list-table.php on line 44
PHP Notice: Undefined index: .../plugins/ssite-customroles/ssite-customroles-pluginhider.inc.php on line 37
PHP Notice: Undefined index: post_parent in .../wp-content/plugins/wp-csv/CPK_WPCSV_Engine.php on line 222
PHP Notice: Undefined index: category in .../wp-content/plugins/wp-csv/CPK_WPCSV_Engine.php on line 273
PHP Notice: Undefined index: post_tag in .../wp-content/plugins/wp-csv/CPK_WPCSV_Engine.php on line 273
etc...
These are all plugin activity related notices. "CRED Frontend Editor" somehow "broke the whole site".

Please help,
Thank you in advance!

#349378

Dear gabor,

The debug logs you mentioned above are PHP notice, which are produced by other plugins (ssite-customroles, wp-csv). you can disable the wordpress debug mode, like this:
Edit wp-config.php, replace this line, from:
define('WP_DEBUG', true);
To:
define('WP_DEBUG', false);

#349386

Dear luoy,

Thank you for your reply. Yes, I know that these are "just notices", and they can be suppressed but I never do it. I am running a number of WP sites and all of them are "free of" any PHP log messages whatsoever. I consider these notice messages to be a sign of malfunction or of a sing of possible malfunction in the future, so in my point of view they must be tracked down and "fixed".

These messages in question might seem unrelated, whoever I've been running this (actually still in development) site for about six months with your (an other) plugins installed and this is the very first time these notices appeared; after I have updated to "CRED Frontend Editor 1.4.2".

If I downgrade "CRED Frontend Editor", all of them disappear so it must be "CRED Frontend Editor 1.4.2" that is the root of the problem. I have 14 other plugins installed at the moment, none of them generates any log messages and I will not let them do so in the future either.

In a worst case scenario I am even willing to remove a plugin that does not adhere to my strict "rules". However, removing a plugin normally means a lot of hard work to account for the missing functionality, and this is what I try avoid at all costs.

Please help me track down the cause of this issue. It might be a signal that your plugin has changed in a way that can cause more serious problems in the future. So I believe it is in your interest as well.

Thank you in advance,
G

#349424

I can not duplicate same problem in my localhost, please try this:
1) download the latest version of CRED 1.4.2:
https://toolset.com/account/downloads/

2) remove the old version of CRED, install the new version of CRED with manually FTP, and test again:
https://toolset.com/documentation/installation/
section "Initial Install (if you don’t have Types plugin)"

#349522

I have analyzed the issue in detail and figured out what the situation is.
I've been working on this website for a while, and Toolset plugins have also been installed for months (CRED too), but this is the time when I realized that the PHP error reporting level is changed by CRED, which I consider to be a bad practice.

I did not notice that CRED defines error_reporting(E_ALL) in a "sort of hard coded manner", however in the case of CRED 1.4.1 and below the plugin used to use error_reporting(E_ALL ^ E_NOTICE) which was changed to error_reporting(E_ALL) in CRED 1.4.2.

So all the notices were suppressed by CRED 1.4.1 and below and I had not even realized it. I thought I had error reporting set to E_ALL, but this was not the case! By introducing this change in CRED 1.4.2, the plugin was "sort of fixed", because it should not have used error_reporting(E_ALL ^ E_NOTICE) at all. Actually, your plugins should not not change error reporting in this way at all, but that is another story. (Site administrator should be able to decide what reporting level they need and plugins should respect their settings.)

Now I am faced with the task of deciding what to with plugins that generate notices. It would have been nice if CRED had not suppressed notices in the first place 🙁

Lessons learned? I need to be more cautions in the future and check whether plugins change PHP error reporting or not.

Please report this issue to you developer team. I think they should consider abandoning this practice:

if (defined('WP_DEBUG') && WP_DEBUG) {
    error_reporting(E_ALL);
    ini_set("display_errors", 1);
}

A lot of people use these settings on a live site (including me):

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Since just by defining WP_DEBUG to be true does not mean someone wants error_reporting(E_ALL), or anything else, as well.

regards
G

#349601

Thanks for the details, I can locate the codes, which is CRED file plugin.php, line 22~25, I put it into our to-do list ,our developers will take care of it.

#349720

Thank you very much, luoy!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.