Closed (fixed)
Project:
Authenticated User Page Caching (Authcache)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Dec 2014 at 14:59 UTC
Updated:
24 Jan 2015 at 16:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sebastien m. commentedComment #3
znerol commentedThanks for the patch. There are three additional occurrences of the
__FILE__constant. I guess they also need the update?Btw, I strongly recommend to use the safe front controller script in production (see README.txt in the Authcache Personalization API). Is there anything I could do to make installing the safe frontcontroller easier for platform.sh users?
Setting version to 7.x-2.x-dev otherwise test-bot will fail due to missing module dependencies.
Comment #5
sebastien m. commentedThanks for the tip about the test-bot.
Concerning others files I supposed they should changed too, but I don't know how to check it.
On my dev environment I've issues when running simpletest scripts, but I'll do my best.
Comment #6
znerol commentedSo, I think that modifying
AuthcacheEnumCartesianTestCase.phpandAuthcacheEnumCombTestCase.phpis not necessary, because there is no reason to symlink any of the path components there. The destination points to the Authcache Enum directory which is a subdirectory inside the authcache project.The remaining case is
modules/authcache_builtin/tests/frontcontroller/index.phpwhere the same fix can be applied.I still think that
modules/authcache_p13n/frontcontroller/authcache.phpshould not be used at all if possible and therefore I'm reluctant to modify it with the goal to make it more usable on special deployments. Also note that__FILE__is a predefined constant in PHP, while$_SERVER['SCRIPT_FILENAME']depends on theSAPI. For example when using nginx, this variable needs to be supplied in configuration files.Is there something special about platform.sh which prevents the usage of the safe front controller?
Comment #7
sebastien m. commentedNothing prevent platform.sh to use the safe front controller.
You just need to setup the ".platform.app.yaml" to specify a hook to do it.
I'm currently in contact with the platform support to define the best command line for the hook.
Comment #8
znerol commentedWould it help if there was a drush command which installs the safe frontcontroller?
Comment #9
sebastien m. commentedThe only thing you have to do is to edit the file ".platform.app.yaml" by adding the "build" hook:
With that, the file is copied at each deployment in the drupal root folder.
Don't prefix folders by "app", because a this step, the root folder is not this one, so the command must use relative folders.
I encountered issue when setting the variable "authcache_p13n_frontcontroller_path".
I have been oblige to install again the profile to apply correctly the new value in spite of "platform build".
Comment #10
znerol commentedPatch attached.
Comment #12
znerol commentedThank you for reporting the issue. A modified version of the patch has been committed and is now part of the 7.x-2.x-dev version.