wpsharks / comet-cache

An advanced WordPress® caching plugin inspired by simplicity.
https://cometcache.com
GNU General Public License v3.0
76 stars 17 forks source link

WP Compatibility: wp_get_sites() Deprecated #848

Closed jaswrks closed 7 years ago

jaswrks commented 7 years ago

In the latest dev branch, while testing on a network installation.

Notice: wp_get_sites is <strong>deprecated</strong> since version 4.6.0! Use get_sites() instead. in /app/src/wp-includes/functions.php on line 3707

Call Stack:
    0.0009     370624   1. {main}() /app/src/wp-admin/network/plugins.php:0
    0.0013     371008   2. require_once('/app/src/wp-admin/network/admin.php') /app/src/wp-admin/network/plugins.php:11
    0.0016     371712   3. require_once('/app/src/wp-admin/admin.php') /app/src/wp-admin/network/admin.php:13
    0.4040    3372072   4. do_action() /app/src/wp-admin/admin.php:154
    0.4065    3418144   5. WebSharks\CometCache\Pro\Classes\Plugin->checkVersion() /app/src/wp-includes/plugin.php:524
    0.4168    3409016   6. WebSharks\CometCache\Pro\Classes\Plugin->wipeCache() /wp-business/plugins/comet-cache-pro/src/includes/traits/Plugin/InstallUtils.php:64
    0.4241    3481208   7. WebSharks\CometCache\Pro\Classes\DirStats->wipeCache() /wp-business/plugins/comet-cache-pro/src/includes/traits/Plugin/WcpUtils.php:58
    0.4263    3481072   8. wp_get_sites() /wp-business/plugins/comet-cache-pro/src/includes/classes/DirStats.php:302
    0.4263    3481072   9. _deprecated_function() /app/src/wp-includes/ms-deprecated.php:472
    0.4263    3481392  10. trigger_error() /app/src/wp-includes/functions.php:3707
renzms commented 7 years ago

@raamdev @jaswsinc

Compatibility Fix Confirmed 👍

Before updating to Comet Cache Pro v161214-RC, this was the entry in the error logs for the network installation:


[15-Dec-2016 13:54:31 UTC] PHP Notice:  wp_get_sites is <strong>deprecated</strong> since version 4.6.0! Use get_sites() instead. in /var/www/html/wp-includes/functions.php on line 3783
[15-Dec-2016 13:54:31 UTC] PHP Stack trace:
[15-Dec-2016 13:54:31 UTC] PHP   1. {main}() /var/www/html/wp-admin/network/admin.php:0
[15-Dec-2016 13:54:31 UTC] PHP   2. require_once() /var/www/html/wp-admin/network/admin.php:13
[15-Dec-2016 13:54:31 UTC] PHP   3. require_once() /var/www/html/wp-admin/admin.php:31
[15-Dec-2016 13:54:31 UTC] PHP   4. require_once() /var/www/html/wp-load.php:37
[15-Dec-2016 13:54:31 UTC] PHP   5. require_once() /var/www/html/wp-config.php:47
[15-Dec-2016 13:54:31 UTC] PHP   6. do_action() /var/www/html/wp-settings.php:470
[15-Dec-2016 13:54:31 UTC] PHP   7. WP_Hook->do_action() /var/www/html/wp-includes/plugin.php:453
[15-Dec-2016 13:54:31 UTC] PHP   8. WP_Hook->apply_filters() /var/www/html/wp-includes/class-wp-hook.php:323
[15-Dec-2016 13:54:31 UTC] PHP   9. WebSharks\CometCache\Pro\Classes\Plugin->actions() /var/www/html/wp-includes/class-wp-hook.php:298
[15-Dec-2016 13:54:31 UTC] PHP  10. WebSharks\CometCache\Pro\Classes\Actions->__construct() /var/www/html/wp-content/plugins/comet-cache-pro/src/includes/traits/Plugin/ActionUtils.php:18
[15-Dec-2016 13:54:31 UTC] PHP  11. WebSharks\CometCache\Pro\Classes\Actions->saveOptions() /var/www/html/wp-content/plugins/comet-cache-pro/src/includes/classes/Actions.php:72
[15-Dec-2016 13:54:31 UTC] PHP  12. WebSharks\CometCache\Pro\Classes\Plugin->autoWipeCache() /var/www/html/wp-content/plugins/comet-cache-pro/src/includes/classes/Actions.php:577
[15-Dec-2016 13:54:31 UTC] PHP  13. WebSharks\CometCache\Pro\Classes\Plugin->wipeCache() /var/www/html/wp-content/plugins/comet-cache-pro/src/includes/traits/Plugin/WcpUtils.php:229
[15-Dec-2016 13:54:31 UTC] PHP  14. WebSharks\CometCache\Pro\Classes\DirStats->wipeCache() /var/www/html/wp-content/plugins/comet-cache-pro/src/includes/traits/Plugin/WcpUtils.php:58
[15-Dec-2016 13:54:31 UTC] PHP  15. wp_get_sites() /var/www/html/wp-content/plugins/comet-cache-pro/src/includes/classes/DirStats.php:302

After installing, wp_get_sites() is no longer present in the error logs:


15-Dec-2016 14:04:04 UTC] PHP Stack trace:
[15-Dec-2016 14:04:04 UTC] PHP   1. {main}() /var/www/html/wp-admin/index.php:0
[15-Dec-2016 14:04:04 UTC] PHP   2. wp_dashboard() /var/www/html/wp-admin/index.php:135
[15-Dec-2016 14:04:04 UTC] PHP   3. do_meta_boxes() /var/www/html/wp-admin/includes/dashboard.php:218
[15-Dec-2016 14:04:04 UTC] PHP   4. wp_dashboard_site_activity() /var/www/html/wp-admin/includes/template.php:1048
[15-Dec-2016 14:04:04 UTC] PHP   5. wp_dashboard_recent_comments() /var/www/html/wp-admin/includes/dashboard.php:779
[15-Dec-2016 14:04:04 UTC] PHP   6. _wp_dashboard_recent_comments_row() /var/www/html/wp-admin/includes/dashboard.php:923
[15-Dec-2016 14:04:04 UTC] PHP   7. current_user_can() /var/www/html/wp-admin/includes/dashboard.php:612
[15-Dec-2016 14:04:04 UTC] PHP   8. WP_User->has_cap() /var/www/html/wp-includes/capabilities.php:530
[15-Dec-2016 14:04:04 UTC] PHP   9. map_meta_cap() /var/www/html/wp-includes/class-wp-user.php:723
[15-Dec-2016 14:04:04 UTC] PHP  10. map_meta_cap() /var/www/html/wp-includes/capabilities.php:333
raamdev commented 7 years ago

Comet Cache v161221 has been released and includes changes from this GitHub Issue. See the v161221 announcement for further details.


This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#848).