Seen this in protostar and I don't know if this is a template ore core issue:
While SEF URLs are activated the site title <a class="brand pull-left">
points to the site root (expected), while when NON SEF are in function the link points to the current page (unexpected).
@brianteeman & @richard67 (as you have tested too...)
This is with SEF:
... and this is without SEF:
substitued SEF screenshot as there was something ill in the address bar (It still displayed non-sef address...)
ah i see ... well i have my local joomla in a subdirectory, so i always have a href="/joomla3" ... maybe this is the reason why i cannot reproduce, because the problem exists only if joomla is located in the root directory (whish is of course the default for production sites).
can be...
@richard67: check if with SEF you have /joomla3/ and without /joomla3
@smanzi no, I have in both cases "/joomla3".
Maybe we have to change in the protostar's index.php and error.php from JUri::base(true) to JUri::base() for the site title link?
The docu sais that if the pathonly parameter of JUri::base($pathonly) is set to true, the trailing "/"is omitted.
And so we get the "".
... unsure... I'll think it over...
In the meanwhile I can confirm that I have this also on the production VPS in Amsterdam, so this is not a trick by my local poltergeist...
you can see at http://test.smz.it
... or if it is a more general issue
more general? i think JUri::base would be very general ;-)
yeap, you seems to be really right! flu making me retard...
Do you want to make a PR?
I think the protostar index.php and error.php have to be changed so they append a slash to $this->baseurl when using it for the site title link. Using JUri::base() instead of $this->baseurl would also be ok, but silly, and anythign else - change the JUri::base function itself or changing the function which sets $this->baseurl would cause a mess because require lots of calling programs to be changed. If I get positive feedback on this idea, I can try to make the pull request. I am not very experienced with this but I would do my best ;-)
@brianteeman what do you think about the above results?
Question is: why when SEF URL are active we get a neat "/" ?
furthermore, few lines above $this->baseurl is used to build the path to a JS, and this is working for both SEF and NON-SEF...
puzzled...
look NOW at my site: SEF active, neat "/"
then we should have two // in the JS for lt IE9, but we don't...
@smanzi But you are right, we cannot just append a "/" in the template when SEF is on. So either we make a bit of code in the template to append "/" only if "", or we use JUri::base instead of $this->baseurl, or $this->baseurl has to be initialized with "/" in function _fetchTemplate in libraries/joomla/document/html/html.php (o wherever else it originally comes from).
I don't want to break something I don't fully understand... better leave this to more experienced hands...
yes, sure, I hope they have a look on it and our discussion at least helps them to find out how it has to be solved in the proper way.
(resetting my site to NON-SEF, for reference...)
Yeah... I'm confident someone will jump in...
I think this is a minor issue (most are using SEF URLs), but anyway... for the sake of code quality...
tried: I've nuked .htaccess, but no success...
ah sorry, the contrary...
wait..
I now have RewriteBase /, but still no success...
@richard67 you are right, but this is apache option control over .htaccess
turning rewrite engine off...
nope... never had to do that in my VPS!
rewrite engine off, no way...
can you send over Skype http.conf?
actually I can't manage Apache... (yes, wait)...
@richard67 Richard... if you are still there, can you please try with your installation (in subdir) to put this: JUri::root(true) . '/';
?
@smanzi to put this where? in index.php (and error.php) of the protostart template?
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5272.
@smanzi and why JUri::root(true) and not JUri::base(true)?
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5272.
in index.php, in place of $this->baseurl;
at line 138
TBH, I don't know! I'm on skype with Dimitris and he has asked me to... it works here with both sef and non sef, but I'm in root... and we want to chheck if it works when in subdir...
@smanzi I did, with JUri::root, and now I get "/joomla3/" in any case (homepage and other, i.e. login page, both with and without SEF URLs). But why JUri::root and not JUri::base? Other templates use JUri::base.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5272.
hold on...
JUri::base A static method that returns the base URI of the Joomla site.
JUri::root A static method that returns the root URI of the Joomla site. If Joomla has been installed in the web server's document root then this method will return "/" for the path.
I guess base is better ?
Actually this should be ```php
echo $this->baseurl . '/';
will not I get // with SEF? Let me try...
nope
@dgt41 If Joomla has been installed in the web server's document root then this method will return "/" for the path ... this is what the docu says, but a few lines below is an explanation of the $pathonly parameter, as is with JUri::base, but it is not clearly told what $pathonly does in case of document root. From my point of view, behavior of JUri::base and JUri::root should be the same at this point, but maybe it isn't. For @smanzi i think the solution I have tested will result in "//" with SEF URLs on, or not?
confirmed OK both SEF and NON-SEF with href="<?php echo $this->baseurl . '/'; ?>"
Let it be href="<?php echo $this->baseurl . '/'; ?>"
...
Who does the PR?
Whoever it does should not forget error.php.
@richard67 do you want to check that it works when J! in subdir and do the PR yourself?
I do so. I come back to you here in case of problems/questions.
no prob... I'm here... quite busy as I have to make a mailing... but I'm here... sergiomanzi on Skype if you wish...
We have a PR #5291
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5272.
Status | New | ⇒ | Closed |
Rel_Number | ⇒ | 5291 | |
Relation Type | ⇒ | Related to |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-12-02 23:22:14 |
Labels |
Added:
?
|
cannot confirm
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5272.