Skip Navigation

[Resolved] Many errors in error log re: toolset-maps-shortcode-generator

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.

This topic contains 6 replies, has 2 voices.

Last updated by Christopher Amirian 1 year, 10 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2532185

Jim

Tell us what you are trying to do?
I'm trying to get rid of errors caused by Toolset.

Is there any documentation that you are following?
None that I have found.

Is there a similar example that we can see?
Not that I have found.

What is the link to your site?
hidden link

My error log is filling up with this error and I'm not sure how to fix it. Here's an example:
[Wed Jan 11 09:57:38.640193 2023] [cgi:error] [pid 514422:tid 140341423490816] [client 13.89.219.230:0] AH01215: PHP Notice: Undefined index: meta_key in /home/manipxl7/manippt.org/wp-content/plugins/toolset-maps/includes/toolset-maps-shortcode-generator.php on line 844: /dh/cgi-system/php74.cgi

Line 844 in toolset-maps-shortcode-generator.php is:
$options[$postmeta_field['meta_key']] = $postmeta_field['name'];

Thanks for any help you can offer!

Jim

#2532661

Christopher Amirian
Supporter

Languages: English (English )

Hi Jim,

The point that you mentioned is a notice and not an error.

A PHP notice is a suggestion and not an error.

We constantly work to improve the notices when it comes to the new PHP versions.

It is a work in process and not something that we can offer a change at the moment.

If you used the method below:
https://stackoverflow.com/questions/930154/stop-notices-from-displaying-in-php

PHP will only show warnings and fatal errors instead of notices.

As the map shortcode works ok, the notices have a low priority to make sure we are on the same page.

For more information:

hidden link

Thanks

#2533015

Jim

Hi Christopher.

Thank you for your reply.

Sorry, I should have said "My error log is filling up with this 'notice'". Even though it's not an error, logging all of these notices to the error log uses up system resources and can affect performance.

Thank you for your suggestion about not writing notices to the error log. I will try that.

Jim

#2533053

Jim

Hi again.

So, to set this up as you suggest, I need to edit my phprc file. Whenever I upgrade my PHP version, I need to remember to go into the phprc file for that version and make this change again.

This isn't ideal.

It seems to me it would be better to fix what is causing this notice in the first place, no?

Jim

#2534767

Christopher Amirian
Supporter

Languages: English (English )

Hi Jim,

Yes for sure, as mentioned we constantly work on that and if there is a need for changes in the new version of PHP we will do.

But for now the best way is to force PHP not to log every notice.

Also you can ask WordPress to not log anything:

Would you please access your website files and edit the "wp-config.php" file on the root folder of your WordPress installation and add the code below into the file:

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

Please add the code above the line below:

/* That's all, stop editing! Happy blogging. */

Thanks.

#2536749

Jim

Thanks Christopher.

Won't adding that to wp-config.php also stop errors from being reported? I do want to see errors.

Jim

#2537107

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I suggest that you do as follows. Add the code below to the same place I mentioned:

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

This will not deactivate logging but it will not show on the website; instead, it will show it on the specific file with the address below:

YOURWEBSITE.com/wp-content/debug.log

That can be a good solution so that you will not see the notices on the website itself but you still will have logging available for you.

Thanks.