Notice on widget registration
-
I get this notice in debug.log
Dec 23, 09:19:56
Notice: the_widget was called incorrectly. Widgets need to be registered usingregister_widget(), before they can be displayed. Please see Debugging in WordPress for more information. (This message was added in version 4.9.0.) in /home/public/sites/www.benlinders.com/wp-includes/functions.php on line 5311Using the plugin string locator I found this call of the_widget, line 460 of wp-content/themes/oceanwp/inc/edd/edd-config.php
<?php the_widget( ‘edd_cart_widget’, ‘title=’ ); ?>
I can’t seem to find the registration of the widget edd_cart_widget anywhere in my WordPress directory (again using string locator).
Could it be that this is causing the notice in debug.log?
The page I need help with: [log in to see the link]
-
Hello,
I apologize for the delay in response and I will coordinate with the concerned dev team regarding the notice and get back to you soon.
-
This reply was modified 5 years, 7 months ago by
Abhishek.
Thanks Abhishek
Hello,
As I checked from the edd plugin file, the widget is registered.
https://github.com/easydigitaldownloads/easy-digital-downloads/blob/master/includes/widgets.php (check at the line 489)If it is giving error, kindly try to reach the edd plugin support.
Hi Abhishek,
I’m assuming you are referring to this plugin edd that does the registration?
https://wordpress.org/plugins/easy-digital-downloads/I do not have this plugin installed.
Is this plugin mandatory with Oceanwp?When I don’t have the edd plugin, I think the code for the cart should not be executed?
<?php the_widget( ‘edd_cart_widget’, ‘title=’ ); ?>Ben Linders
Hello,
No, this plugin is not mandatory. But since you are getting the error related to edd plugin, therefore, I mentioned it. We have tested the issue locally but not able to reproduce it.
Can you share the steps to replicate this issue?I don’t know a way to “reproduce” it. The error turns up in the debug log, probably due to someone visiting my website.
Regarding the code in edd config in oceanwp, is there a test if the plugin edd is active?
I’m assuming this code should only be executed when easy digital downloads is installed (which isn’t the case on my website).
-
This reply was modified 5 years, 7 months ago by
The topic ‘Notice on widget registration’ is closed to new replies.
