Errors since WordPress 4.3 – WP_Widget
-
After upgrading to WP 4.3 the message “The called constructor method for WP_Widget is deprecated since version 4.3.0!…..” appears.
If I disable the NextCellent plugin the messages disappear – I found out that this has to do with PHP (4->5).
Since I like the plugin and I would like to keep using it I post my findings. Can anyone help?
https://ww.wp.xz.cn/plugins/nextcellent-gallery-nextgen-legacy/
-
Hi suffie,
Thanks for reporting this. We are aware of this issue, and it should be fixed in the next version or so (the changes are currently under review).
In the mean time, if the warning bothers you, you can apply the fix to the widgets. In these files:
- NEXTCELLENT_FOLDER/widgets/class-ngg-gallery-widget.php
Change
parent::WP_Widget( 'ngg-images', __( 'NextCellent Gallery Widget', 'nggallery' ), array(
to
parent::__construct( 'ngg-images', __( 'NextCellent Gallery Widget', 'nggallery' ), array( - NEXTCELLENT_FOLDER/widgets/class-ngg-media-rss-widget.php
Change
parent::WP_Widget( 'ngg-mrssw', __( 'NextCellent Media RSS', 'nggallery' ), array(
to
parent::__construct( 'ngg-mrssw', __( 'NextCellent Media RSS', 'nggallery' ), array( - NEXTCELLENT_FOLDER/widgets/class-ngg-slideshow-widget.php
Change
parent::WP_Widget( 'slideshow', __( 'NextCellent Slideshow', 'nggallery' ), array(
to
parent::__construct( 'slideshow', __( 'NextCellent Slideshow', 'nggallery' ), array(
Hi niknetniko,
Thanks for a quick response!I have edited the files on my test-site and this has fixed the issue! (The error messages have disappeared).
However it seems a new problem was introduced: pagination is not working anymore, and it seems (I am not sure) that the thumbnail sizes have change a little bit.
Be aware: This can be caused by other reasons because I have been messing around with another gallery.
I hope this helps – in the mean time I keep using the original php files on the production environment until the next version (or so) will be available.
Hi suffie,
Happy to know it fixes it. Your other issues will likely be caused by something else, as the changes from my previous post are pure PHP-syntax related. They have no effect on style, functionality or any other aspect of the site.
If the other issues were caused by the 4.3 upgrade, that’s another thing. Should that be the case, please make a separate post about the issue.
- NEXTCELLENT_FOLDER/widgets/class-ngg-gallery-widget.php
The topic ‘Errors since WordPress 4.3 – WP_Widget’ is closed to new replies.