Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP Compatibility: wp_get_sites() Deprecated #848

jaswrks opened this issue Nov 5, 2016 · 2 comments

WP Compatibility: wp_get_sites() Deprecated #848

jaswrks opened this issue Nov 5, 2016 · 2 comments


Copy link

jaswrks commented Nov 5, 2016

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
@jaswrks jaswrks added this to the Next Release milestone Dec 8, 2016
@jaswrks jaswrks self-assigned this Dec 8, 2016
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Dec 8, 2016
Copy link

renzms commented Dec 15, 2016

@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 added a commit that referenced this issue Dec 21, 2016
- **Bug Fix:** Improving PHP OPcache detection. Now considering the INI option `opcache.restrict_api`. Comet Cache is now smart enough to avoid generating the PHP Warning: _PHP Warning: Zend OPcache API is restricted by "restrict_api" configuration directive_. See [Issue #733](#733).
- **New Feature (Pro): Mobile Mode.** This release adds a new feature that is designed to improve compatibility with Adaptive themes for mobile devices. To learn more, please see: **Dashboard → Comet Cache Pro → Plugin Options → Mobile Mode**. See also: [Issue #471](#471).
- **Enhancement: Auto-Clearing Author Page Cache.** This release makes Comet Cache smart enough to detect when a user is deleted (or removed from a child blog in a Network), at which time the Author page for that user will be cleared from the cache so it can be regenerated automatically. See [Issue #304](#304).
- **Enhancement: Multibyte Compatibility.** This release improves support for WordPress Permalinks that contain UTF-8 symbols (or emojis) in them. More specifically, this release adds the `/u` flag to all `preg_*()` calls in cache clearing routines that generate cache paths from Watered-Down Regex patterns entered by a site owner. See: [Issue #611](#611).
- **Enhancement: Widget Change Detection.** Comet Cache can now detect when **Appearance → Widgets** are added/edited/removed, and Comet Cache will automatically clear the cache so that your site remains up-to-date. See [Issue #411](#411).
- **Enhancement (Pro): Static CDN Filters and `srcset`.** This release enhances Static CDN Filters in Comet Cache Pro. Static CDN Filters are now smart enough to filter all image sources included in an `srcset=""` attribute that is generated by WordPress. See [Issue #660](#660). If you'd like to learn more about `srcset=""`, see [this article at](
- **Enhancement (Pro): Automatic Background Updates.** It is now possible to enable automatic background updates that occur quietly in the background whenever new features, bug fixes, or security issues are addressed by our developers. See: **Dashboard → Comet Cache Pro → Config. Options → Update Credentials**. See also: [Issue #827](#827).
- **Enhancement (Pro): HTML Compressor + Accelerated Mobile Pages (AMP).** Updated to the latest available release of the HTML Compressor (v161208) with improved support for [Accelerated Mobile Pages]( See: [Issue #695](#695). See also: [HTML Compressor v161208 changelog](
- **Enhancement (Pro): HTML Compressor / AMP Compatibility.** Improved compatibility with [Accelerated Mobile Pages]( There is a new HTML Compressor option that is enabled by default and it makes Comet Cache smart enough to auto-detect and selectively disable portions of the HTML Compressor that are incompatible with the AMP spec; i.e., routines that are not necessary when serving APMd pages. In short, if the URI being compressed ends with `/amp/`, or the document contains a top-level `<html ⚡>` tag (`<html amp>` is accepted as well), then features which are incompatible with [Accelerated Mobile Pages]( will be disabled accordingly.
- **Compatibility:** Avoid deprecated `wp_get_sites()` and use `get_sites()` instead. See [Issue #848](#848).
- **Documentation:** Added Watered-Down Regex documentation notes to the inline documentation (in the software) about the use of `^` and `$` in some places where these special characters are not fully supported. Also adding the same notes to the [Watered-Down Regex KB Article]( See also: [Issue #611](#611).
Copy link

raamdev commented Dec 21, 2016

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).

@raamdev raamdev closed this as completed Dec 21, 2016
@wpsharks wpsharks locked and limited conversation to collaborators Dec 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

3 participants