PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Plugin fails on activation for external content folder WordPress install

  1. So we can use Subversion for storing themes and rapid update of many client websites when WordPress updates, we use the alternate location for the content folder, as described here:
    http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content

    The problem is line 28 in gravityforms.php:
    require_once (preg_replace("/wp-content.*/","wp-includes/pluggable.php",__FILE__));

    In our case, we standardize by setting up our folder structure like this:

    wp-config.php
    .htaccess
    wordpress/
      wp-includes/
      (etc...)
    content/
      plugins/
      themes/
      uploads/

    To get it to work quickly, I modified line 28 as follows:
    require_once (preg_replace("/content.*/","wordpress/wp-includes/pluggable.php",__FILE__));

    Better, though, would be to use the WordPress constants instead, like WP_CONTENT_URL. Any chance you can take the time to provide a version of this line that's independent of where the content folder is and where WordPress is installed?

    Blue skies,
    -Aaron

    P.S. Just below, where it says "Tags", it's "separated" not "seperated". :)

    Posted 15 years ago on Wednesday September 9, 2009 | Permalink
  2. In fact, here's a good article on this:
    http://codex.wordpress.org/Determining_Plugin_and_Content_Directories

    Posted 15 years ago on Wednesday September 9, 2009 | Permalink
  3. Hey Overton, i'll forward this to our lead developer to take a look at. Thanks!

    Posted 15 years ago on Wednesday September 9, 2009 | Permalink
  4. Very good. If he needs someone to test it, I have both standard and modified installs readily at hand. Having purchased a developer's license, I am now invested in your success. :)

    Posted 15 years ago on Wednesday September 9, 2009 | Permalink
  5. Thanks! I can't guarantee that this will make it into the v1.1 release as development on it is wrapping up and we have to start testing in order to be able to release it. Don't want to delay what we already have ready to go. But we will look at including this in the 1.2 release.

    Posted 15 years ago on Wednesday September 9, 2009 | Permalink
  6. I had the exact same issues and resolved it in the exact same way. It would be great to add this feature to the header and footer calls in the preview screens too, as on non-standard installs the same problem manifests.

    Really anywhere you're calling core WP files, using the WP constants would be appreciated!

    Thanks! This is a great plugin.

    Posted 15 years ago on Wednesday September 9, 2009 | Permalink
  7. We are certainly going to look into implementing this change, it might even make it into the 1.1 release which we are wrapping up now.

    Posted 15 years ago on Thursday September 10, 2009 | Permalink
  8. Aaron,
    The fix for the pluggable.php include (gravityforms.php like 28) will be added to version 1.1 that is coming out soon. Thanks for pointing me in the right direction. Once we have a release candidate, we will be contacting you to help us test this.

    jrgkgb,
    I am having a hard time finding a solution for the includes in the preview.php file. The problem is that the preview page runs out of WordPress context (we go directly to .../plugins/gravityforms/preview.php to load the preview), so none of the global variables are defined. It will take a little re-work on my part to get the includes to use WP's global variables, so I won't be able to include it in v.1.1, but I will make sure it gets addressed in the following release

    Posted 15 years ago on Thursday September 10, 2009 | Permalink

This topic has been resolved and has been closed to new replies.