Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

sitemap erstellt keine ssl links mehr #8270

Closed
css-umsetzung opened this issue Mar 12, 2016 · 2 comments
Closed

sitemap erstellt keine ssl links mehr #8270

css-umsetzung opened this issue Mar 12, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@css-umsetzung
Copy link

Aktuelle Version 3.5..8

wir benutzen eine contao Installation für zwei Domains.
in der englischen Fassung .com werden noch SSL links in der sitemap generiert,
in der Hauptdomain *.de nicht mehr

Ich gehe davon aus das es daran liegt, dass der Cron unter .de aufgerufen wird?

@fritzmg
Copy link
Contributor

fritzmg commented Mar 13, 2016

I can confirm this. The problem is the following:

Backend::findSearchablePages uses the following code:

$feUrl = $objPage->getFrontendUrl();

if (strncmp($feUrl, 'http://', 7) !== 0 && strncmp($feUrl, 'https://', 8) !== 0)
{
    $feUrl = $domain . $feUrl;
}

https://github.com/contao/core/blob/3.5.8/system/modules/core/classes/Backend.php#L707

So, whenever $objPage->getFrontendUrl() does not return a scheme in its URL (i.e. a relative URL), the current scheme and host is added. $objPage->getFrontendUrl() always either returns an absolute or a relative URL, depending on the current host. Thus, for the current host, the useSSL option of the page is ignored.

This issue was introduced in #8238.

Contao should introduce a generateAbsoluteUrl function as proposed in contao/core-bundle#458 so that errors like this are less likely to happen. This function would always add the correct scheme and host according to the page's properties.

@leofeyer
Copy link
Member

Fixed in 354b3a4.

jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Mar 26, 2016
### 4.1.2 (2016-03-22)

 * Handle derived classes in the exception converter (see #462).
 * Prevent the autofocus attribute from being added multiple times (see contao/core#8281).
 * Respect the SSL settings of the root page when generating sitemaps (see contao/core#8270).
 * Read from the temporary file if it has not been closed yet (see contao/core#8269).
 * Always use HTTPS if the target server supports SSL connections (see contao/core#8183).
 * Adjust the meta wizard field length to the column length (see contao/core#8277).
 * Correctly handle custom mime icon paths (see contao/core#8275).
 * Show the 404 error page if an unpublished article is requested (see contao/core#8264).
 * Correctly count the URLs when rebuilding the search index (see contao/core#8262).
 * Ensure that every image has a width and height attribute (see contao/core#8162).
 * Set the correct mime type when embedding SVG images (see contao/core#8245).
 * Handle the "float_left" and "float_right" classes in the back end (see contao/core#8239).
 * Consider the fallback language if a page alias is ambiguous (see contao/core#8142).
 * Fix the error 403/404 redirect (see contao/website#74).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants