I've recently moved my website to SSL and found that Base meta tag is still "http" not "https".
But if I change this line:
$buffer .= $tab . '' . $lnEnd;
to this one:
$buffer .= $tab . '' . $lnEnd;
in file:
libraries/joomla/document/html/renderer/head.php
then everything works fine and Base meta tag is correct on all https pages.
@GregoryRusakov
Could you please provide more detailed test instructions?
Why do you need $live_site setting at all?
Is Force SSL in Joomla configuration enabled?
Is Search Engine Friendly URLs enabled?
I think reason for the behaviour you see is in /libraries/cms/application/site.php line 159
if ($router->getMode() == JROUTER_MODE_SEF)
{
$document->setBase(htmlspecialchars(JUri::current()));
}
calling method current() in /libraries/joomla/uri/uri.php. But I don't know why there $live_site is ignored (compare with method base() line 218) and I don't know if it should be fixed or if it's the expected bahaviour and base() shouldn't be used there..
When I enable Force SSL I see always expected base tag; with or without $live_site set.
Could you please provide more detailed test instructions?
Then I enabled Force SSL (and Friendly URL also), I got a blank white page and disabled Force SSL option. So, I had to change $live_site to "https", but unfortunately the base tag hadn't changed. So, I had to change the head.php file and use Juri:: base() instead of $document->getBase(). This "Juri:: base ()" correctly set base tag and site works fine. (https://support.analitica.ru)
"Then I enabled Force SSL (and Friendly URL also), I got a blank white page and disabled Force"
But that's not related to this issue. Sounds like a missconfiguration of your server or extension etc.
As I described above, we need a spacialist here, who knows if use of current() for the base tag is required here or if current() should be expanded to takeover the scheme set in $live_site.
"But that's not related to this issue." sure, it's not related with the issue. But it's just an answer to the question "Why do you need $live_site setting at all?".
By the way the problem was solved by replacing one line in head.php file...
Category | ⇒ | Libraries |
Please answer the question why you set the $live_site variable and what the value of that variable was/is. In the end, if you have a http:// URL in $live_site, the behavior that you are seeing is actually expected. What should Joomla expect if you tell it its URL is a http:// one?
Status | New | ⇒ | Information Required |
As @Hackwar says please answer why you have @live_site set and why if you are now on https you didnt change it.
I have set this issue to 'Information Required' and it will be closed in a few weeks if there are no updates
Very weird that this problem still exists. I also just hardcoded it in:
if (!empty($base))
{
$buffer .= $tab . '< base href="https://www.website.com/" />' . $lnEnd;
}
(without the spaces between < and base but otherwise it isn;t showing here)
Now everything is working fine. Force SSL put the site into a loop
@superdeluxxx do you have a setting in live_site
In the configuration.php its set as
$live_site = 'https://www.domain.com';
if that is what you mean.
But that didn't kept the < base href="http://www.domain.com/" > from being shown without the httpS
Please try without anything being set fr live_site. You shouldnt need it
On 2 Mar 2015 05:54, "superdeluxxx" notifications@github.com wrote:
In the configuration.php its set as
$live_site = 'https://www.domain.com';
if that is what you mean.
But that didn't kept the from being shown without the httpS—
Reply to this email directly or view it on GitHub
#4961 (comment).
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-03-07 21:53:17 |
Closed_By | ⇒ | zero-24 |
Set to "closed" on behalf of @zero-24 by The JTracker Application at issues.joomla.org/joomla-cms/4961
Clsoing as we have a Pull Requrst: #6270
Closed_Date | 2015-03-07 21:53:17 | ⇒ | 2015-03-07 21:53:18 |
Since it's vital that your information is protected, we made strides in $1 Web Hosting 2014 to guarantee that we have SSL-declarations over our own particular sites.
@digitalindia02 are you really so stupid to think that this sort of spam will work
The user has been reported.
Hi @GregoryRusakov can you send a pull request against the staging branche?
If you need some help please see here: http://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests It is realy easy. If you have one we can discuss / test and merge the changes realy easy too.
Please add a message if you need more help or have a pull so we can close here and use the pull as place for discussion.
Thanks