HTTPS missing in multilanguage/multidomain setup when rebuilding from Drush or cron

Created on 30 August 2019, over 5 years ago
Updated 25 May 2023, almost 2 years ago

This can actually be solved easily by implementing the following hook.

/**
 * Implements hook_xmlsitemap_context_url_options_alter().
 */
function MYMODULE_xmlsitemap_context_url_options_alter(array &$options, array $context) {
  $options['https'] = TRUE;
}

But to let this be environment-specific I think it's actually better to be able to set that in settings(.local).php.

Set $settings['xmlsitemap_url_options_https'] = TRUE; to enforce HTTPS for all languages.
Set $settings['xmlsitemap_url_options_https']['es'] = TRUE; to enforce HTTPS only for Spanish links.

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

leymannx Berlin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024