Support » Plugin: CDN Sync Tool » [Plugin: CDN Sync Tool] Error on activation

  • Resolved Shelby DeNike

    (@sdenike)


    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/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Sorry I am using 0.9.9.8 of WP-Super-Cache right now.

    Plugin Contributor Backie

    (@backie)

    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.

    Plugin Contributor Backie

    (@backie)

    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();

    @ 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

    Plugin Contributor Backie

    (@backie)

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

    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

    Plugin Contributor Backie

    (@backie)

    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 🙂

    Plugin Contributor Backie

    (@backie)

    Found a work around, change line 31 from

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

    to

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: CDN Sync Tool] Error on activation’ is closed to new replies.