Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
- create a taxonomy space
- go to "Features" tab
- set the drop down menu "Default front page" to "Other..."
- set internal drupal path eg. "node/1234" at "A relative path"
- go to the front page of the taxonomy space
Result: Showing the default front page of the website instead of the chosen node.
I found a TODO in spaces_controller_variable.inc in the function init_overrides() .
// If we have overridden 'site_frontpage', we need to do some extra
// work to reinit the drupal path.
// TODO: Is purl_language_strip still needed?
//if ($this->get('site_frontpage') !== $this->get('site_frontpage', 'original') && function_exists('purl_language_strip')) {
// $_GET['q'] = purl_language_strip($_REQUEST['q']);
// drupal_path_initialize();
//}
Comment | File | Size | Author |
---|---|---|---|
#6 | 1761546-6-spaces-default_front_page.patch | 1.46 KB | pfrenssen |
#4 | spaces-1761546-4-correct_frontpage.patch | 1.3 KB | sandervd |
#1 | 1761546-1-spaces-set_correct_frontpage.patch | 1.18 KB | iSoLate |
Comments
Comment #1
iSoLate CreditAttribution: iSoLate commentedI created an initial patch. This covers only spaces_taxonomy.
Comment #3
pfrenssenThis only works for paths that do not end in a slash. To support paths ending in a slash as well:
Comment #4
sandervd CreditAttribution: sandervd commentedA bit more generic approach: Call drupal_path_initialize when the variables controller is loaded. Sets the frontpage correctly for all spaces types.
Comment #5
pfrenssenPatch from #4 looks promising but I'm encountering some problems:
$this->get('site_frontpage', 'original')
returnsNULL
until it is manually resaved in the default features variable settings at the path/features
. There are instructions at/admin/config/system/site-information
but this should really work out of the box without manual intervention.Comment #6
pfrenssenAddressed the problems from #5.
Comment #7
kristiaanvandeneyndeThis is actually a problem in PURL, not Spaces. Fixed in #2599098: PURL activated too late..
(Although I'm all for removing the commented out code which is now obsolete.)