WordPress.org

Ready to get started?Download WordPress

Forums

CDN Sync Tool
[resolved] Error on activation (9 posts)

  1. Shelby DeNike
    Member
    Posted 3 years ago #

    I have WP-Super-Cache 0.9.7(Also tried the 0.9.8 release and same errors) installed and setup for my CDN (S3, Cloudfront), and also CDN Sync 0.3. When I activate the plugin I get these errors on the top of the Admin screen.
    --------------
    Warning: array_keys() expects parameter 1 to be array, boolean given in /home/USERNAME/public_html/wp-content/plugins/cdn-sync-tool/lib/Cst/Plugin.php on line 48

    Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/USERNAME/public_html/wp-content/plugins/cdn-sync-tool/lib/Cst/Plugin.php on line 49

    Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/USERNAME/public_html/wp-content/plugins/cdn-sync-tool/lib/Cst/Plugin.php on line 50

    Warning: Invalid argument supplied for foreach() in /home/USERNAME/public_html/wp-content/plugins/cdn-sync-tool/lib/Cst/Plugin.php on line 21
    --------------
    And also errors below that
    --------------
    Looks like you don't have your theme files sync'd. Click here to Sync them.
    Plugin Dependices haven't been met, WP Super Cache or W3 Total Cache are required.
    --------------
    I am running PHP 5.3.3, upgrading as we speak to 5.3.4 ... Please advise.

    http://wordpress.org/extend/plugins/cdn-sync-tool/

  2. Shelby DeNike
    Member
    Posted 3 years ago #

    Sorry I am using 0.9.9.8 of WP-Super-Cache right now.

  3. Backie
    Member
    Plugin Contributor

    Posted 3 years ago #

    Yea seems like an error in the plugin depencies check, I'll have a quick look into it and I'll get back to you.

  4. Backie
    Member
    Plugin Contributor

    Posted 3 years ago #

    Figured it out, it's because it's doing a check for network activated plugins on a single site install (Doh!). It's been fixed for the next release but since that isn't going to be ready for a while you may want to do the quick edit yourself.

    Change line 49 of lib/Cst/Plugin.php from

    $activePlugins = array_keys(get_site_option("active_sitewide_plugins"));

    To

    $activePlugins = (get_site_option("active_sitewide_plugins")) ? array_keys(get_site_option("active_sitewide_plugins")) : array();

  5. craigtommola
    Member
    Posted 3 years ago #

    @ Backie - did you mean line 49? My line 49 saya:

    $activePlugins = array_merge( $activePlugins , get_option("active_plugins") );

    not:

    $activePlugins = array_keys(get_site_option("active_sitewide_plugins"));

    As you noted above. Please confirm
    Thx
    CT

  6. Backie
    Member
    Plugin Contributor

    Posted 3 years ago #

    @craigtommola

    Good catch it's actually line 48. On monday or something I'll start using the svn trunk functionality so I can just link to revisions.

  7. craigtommola
    Member
    Posted 3 years ago #

    I made the change and it got me past the recognition of WP Super Cache. Then I was trying to Sync Files and received this error:

    Fatal error: Call to undefined function get_mu_plugins() in /nfs/c01/h08/mnt/14148/domains/landandseapackaging.com/html/wp-content/plugins/cdn-sync-tool/lib/Cst/Plugin.php on line 50

    I'm going to play with that a bit to see if I can solve it.
    Thx
    CT

  8. Backie
    Member
    Plugin Contributor

    Posted 3 years ago #

    I started a thread on wp-hackers about it. The call to that shouldn't be getting done until admin_head and the function does exist so the question is why is it not being found. If you figure it out please let me know :)

  9. Backie
    Member
    Plugin Contributor

    Posted 3 years ago #

    Found a work around, change line 31 from

    add_action("init", array($this, "syncFiles")) &&

    to

    add_action("admin_init", array($this, "syncFiles")) &&

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic