In my sites/default/settings.php I have:
$base_url = 'http://localhost/subfolder'; // NO trailing slash!
and the site is setup with a private file system.
The path to the CSS file is composed as follows:
/
which is obviously not working.
The CSS file does not get loaded and the Simplemenu appears all messed up.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | add_ctools_support-902696-6.patch | 2.76 KB | ducklofty |
| #4 | add_ctools_support-902696-4.patch | 530 bytes | ducklofty |
Comments
Comment #1
savedario commentedSorry.
The path in document head is composed as
Comment #2
AlexisWilke commentedAccording to some who posted an issue about the caching of the JavaScript code generated for the Simplemenu, it is possible to save files in the private file system area and have a link in the HTML that references it. However, I have no clue on how to do that.
In any event, I checked in a patch which should be available within 12h in the -dev version.
Feel free to re-open the issue if you have a better patch (hide the options that are rendered useless, a way to reference private files...) or still have a problem.
Thank you.
Alexis
Comment #4
ducklofty commentedI added a fix using the ctools css API to add the CSS as it handles private downloads. I've created a patch against the 6.x-1.x branch, but in order to integrate it the earlier fix will need to be taken out. It also adds a dependency to CTools, so it might be worth re-formulating it to do an either/or. I'd be willing take a first stab at that if you think it is worth it.
This is my first patch, so I'm fuzzy on the process so apologies if I haven't done it well, or it is badly formatted.
Comment #5
AlexisWilke commentedThe patch has indeed a few problems:
1) You need to use spaces, no tabs allowed
2) If we add a dependency on ctools, then the .info should indicate so
3) If something has to be remove (i.e. previous change) then the patch should remove that something
This being said, I would prefer to check whether ctools exists with a call to module_exists(), if it does then we use it, otherwise we ignore it. It seems to me that if there, it should be used, and if not, we keep the existing behavior. That way it is not required except if you use private files. It will make things a little lighter (except that the module_exist() is not free, but it still is quite fast.)
Thank you.
Alexis
Comment #6
ducklofty commentedThanks for the feedback, I've applied the spaces default to my editor now.
Working version of the patch attached, including modifying the private files warning in simplemenu_admin.inc
Tested in 3 basic scenarios:
1) Public files
2) Private files, no ctools
3) Private files, ctools available
Comment #7
AlexisWilke commentedOkay, this is checked in 6.x-1.x-dev.
Thank you!
Alexis Wilke