User tests: Successful: Unsuccessful:
All templates that come with standard Joomla installation add some scripts and some stylesheets files. The problem is that not all of them use the same logic and this ends up with an array like this:
From processing point of view that is not a problem as the function in head.php will iron this! But why not echo some variable that is already in the memory and get everything in the same line?
So this is hathor before:
$doc->addStyleSheet('templates/system/css/system.css');
And after:
$doc->addStyleSheet($this->baseurl . '/templates/system/css/system.css');
None
Just test that Beez, protostar, Hathor and Isis still working (css and js files get loaded)
Labels |
Added:
?
|
Category | ⇒ | Templates (admin) Templates (site) |
Easy | No | ⇒ | Yes |
Somehow this pulls sidebar and notification alerts on Isis too close to the Administrator navigation by removing the space in-between.
Thanks for testing. Can you upload a screenshot please
@AlexdeBorba One quick question: if you scroll up and down the page restores that space?
No it doesn't, and I am using latest Joomla! 3.x version as well. Both on Chrome and Mozilla returns the same thing.
@AlexdeBorba This only happens if you apply this patch? What if you clear the browser cache before and after applying this PR? It is very awkward, because all this patch is doing is setting the relative path e.g. from templates/isis/css/template.css
to /administrator/templates/isis/css/template.css
, so in theory this erratic behavior should never, ever happen!
Yes, it only happens when I apply this patch. I clean both browser as Joomla! cache prior to view any changes I made, and once I do this I can confirm the issue comes from this patch. After reversing everything goes back to normal.
Perhaps it could be an issue related to compressed caching, since I run optimization/compression on the website. Just a thought.
@AlexdeBorba honestly if this PR was in any case wrong, the result should be no css and no js should load. So most probably the erratic behavior might come from a 3pd software, you mentioned that you are using something for compression, whitch one?
I am using as plugin, JCH Optimize with server-side compression by MaxCDN. Perhaps it occurs just at my end due to some CDN issue, as I had before issues with JS loads which are now resolved.
@AlexdeBorba I will appreciate it if you can test it in a out of the box environment, without CDN, etc. Most of the times, CDN’s need to propagate the changes and this doesn’t happen immediately...
I have run it without CDN and compression and the result was the same, with or without it, the header pulls the main area toward the top.
@AlexdeBorba This is quite weird. My setup seems fine here:
before
As you can see, the after (thats with this PR applied) got the correct relative paths. Also if something was wrong with this PR most probably the relative path would be wrong and thus the page would be without that template.css and the template.js files…
Are you on the latest staging?
I will give it a second try later this week. Actually I am using the Joomla! Patch Tester Component to apply patches. But thanks for looking into it and don't stress, perhaps its some conflict I have over my setup.
@AlexdeBorba Actually comparing your screenshot (take a look at the sidebars) with mine I can say that you use 3.3.6 (?) and this PR needs at least 3.4_dev. Also because you are using patch tester, the index.php files are replaced and therefore the whole mess.
Yes, you are right, thank you for the insight.
test
works good for me
@waader thanks for testing. The problem I faced in one of my plugins, was that _scripts and _styles arrays had different starting value for the core templates and I had to make some preg to unify them (pricy processing!). The links for the older IE on the other hand are directly injected in documents head, thus I didn’t touch them. But I guess we should stick to one way. I guess it would be better if we convert them to:
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/ie8.css" rel="stylesheet" type="text/css" />
Status | Pending | ⇒ | Ready to Commit |
@zero-24 If you want to make a PR I will definitely test it
So i will mark this PR here as RTC
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-01-29 10:21:48 |
Labels |
Removed:
?
|
Forgot to post the after image of the same array, so here it is:
So to make it clear: templates right now will have a js path like
templates/isis/js/template.js
where it should be
/administrator/templates/isis/js/template.js