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

Already on GitHub? Sign in to your account

define WP_CONTENT_DIR and WP_CONTENT_URL not obeyed #95

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

Comments

Projects
None yet
3 participants

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

Owner

jaswrks commented Apr 18, 2014

@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';
Owner

raamdev commented Apr 18, 2014

@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

@jaswrks jaswrks referenced this issue in websharks/comet-cache-pro Apr 21, 2014

Merged

Everything, plus Auto Cache Engine #17

Owner

raamdev commented Jun 10, 2014

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 milestones: Next Release, v140605 Jun 10, 2014

Owner

raamdev commented Jun 10, 2014

Assigning this to the Next Release milestone.

jaswrks pushed a commit to websharks/comet-cache-pro that referenced this issue Jun 13, 2014

Owner

jaswrks commented Jun 17, 2014

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

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