Closed (fixed)
Project:
Active Template
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
8 Aug 2008 at 07:46 UTC
Updated:
29 Aug 2008 at 06:24 UTC
Jump to comment: Most recent file
from template_file.inc:
define('TAPI_ROOT_DIR', 'files/template');
define('TAPI_CSS_DIR', TAPI_ROOT_DIR . '/css');
define('TAPI_JS_DIR', TAPI_ROOT_DIR . '/javascript');
Drupal filesystem settings simply ignored...
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | create_dirs.patch | 3.53 KB | Steve Dondley |
Comments
Comment #1
OnkelTem commentedSorry, I'v posted above by mistake. The rest of the post:
Well, then later in function template_api_inject_files($tpid) we have:
On 4th line file_exists check is performed against not expanded path (not taking into account filesystem Dru setting). I haven't check it yet, but will drupal_add_css() expand path by itself? If not, we need to do it correctly, using Drupal way.
The second issue with code injection. When saving template it creates directory structure under root 'files/' directory, not where it is located according to filesystem settings.
And third. When saving css/js code for the first time, it tries to save it into the wrong place. For example on installation it failed to save code at all until I created needed directory structure under 'sites/all/mysite/files/files/templates' [note doubling 'files']. (My filesystem setting is set to 'sites/all/mysite/files'.
Comment #2
OnkelTem commentedSimple fix, not tested much:
replace:
to
in template_file.inc
Comment #3
OnkelTem commentedComment #4
derekwebb1 commentedLooks reasonable. Thanks for the keen eye! We'll have a look and see if we can get that patched soon.
Thank you!
Regards, Derek
Comment #5
Steve Dondley commentedThe Drupal way of creating and testing directories to see if they are writable is with the file_check_directory() function. Patch attached.
If the user wants to change which directory the template files get saved in, they can just change the files setting in the drupal admin interface so there is no need for those TAPI constants.
Comment #6
derekwebb1 commentedThis has been fixed (hopefully) in the 5-1.1 version of Active Template. Thanks for your help on this.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.