define WP_CONTENT_DIR and WP_CONTENT_URL not obeyed #95

Closed
timreeves opened this Issue Apr 17, 2014 · 5 comments

Projects

None yet

3 participants

@timreeves

If you have moved your "wp-content" directory to another location (for security reasons) using the defines in wp-config.php, this modified path is not noticed by Quick Cache - it still makes its own cache by default under wp-content, creating that directory again.
I know I can modify the path by hand before activating Quick Cache - but it would be really neat if it suggested the right path itself...

@jaswsinc
WebSharks, Inc. member

@timreeves I agree with you.

@raamdev Instead of us hard-coding wp-content/cache, perhaps something like this.

str_replace(ABSPATH, '', WP_CONTENT_DIR).'/cache';
@raamdev
WebSharks, Inc. member

@timreeves Thanks so much for reporting this! I'll get this fixed in the next release.

@raamdev raamdev added this to the Next release milestone Apr 18, 2014
@raamdev raamdev self-assigned this Apr 18, 2014
@jaswsinc jaswsinc referenced this issue in websharks/comet-cache-pro Apr 21, 2014
Merged

Everything, plus Auto Cache Engine #17

@raamdev
WebSharks, Inc. member

Reopening this issue because we discovered that WP_CONTENT_DIR is not obeyed in the scenario where it's set to a path outside of ABSPATH. See related discussion on #206.

Also see relevant comment from Jason regarding fixing this by using content_url() instead of site_url():

QC currently doesn't use site_url() much at all anyway, and where it does use it, it's warranted (i.e. for the sitemap location).

I also checked the source code for the HTML Compressor, and it uses both WP_CONTENT_DIR and WP_CONTENT_URL when they are available; so we are already good there too.

I think all that needs to happen here, is that we need to remove wp-content from the base_dir in the QC options array; and replace existing occurrences of ABSPATH with WP_CONTENT_DIR as the new root directory from which to nest everything else into. The method abspath_to() should get renamed to wp_content_dir_to() maybe.

@raamdev raamdev reopened this Jun 10, 2014
@raamdev raamdev modified the milestone: Next Release, v140605 Jun 10, 2014
@raamdev
WebSharks, Inc. member

Assigning this to the Next Release milestone.

@jaswsinc jaswsinc pushed a commit to websharks/comet-cache-pro that referenced this issue Jun 13, 2014
JasWSInc Finalizing websharks/comet-cache#151
Additional work toward achieving websharks/comet-cache#130
Also resolves websharks/comet-cache#206
Also resolves websharks/comet-cache#95
Also resolves websharks/comet-cache#193
ad53482
@jaswsinc
WebSharks, Inc. member

This was resolved by the above referenced pull request(s).

@jaswsinc jaswsinc pushed a commit that closed this issue Jun 17, 2014
JasWSInc Finalizing websharks/comet-cache#151
Additional work toward achieving websharks/comet-cache#130
Also resolves websharks/comet-cache#206
Also resolves websharks/comet-cache#95
Also resolves websharks/comet-cache#193
29eaf58
@jaswsinc jaswsinc closed this in 29eaf58 Jun 17, 2014
@raamdev raamdev removed their assignment Apr 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment