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.
The document content type is promoted to the frontpage by default.
Patch follows.
Comment | File | Size | Author |
---|---|---|---|
#5 | commons-2000702-5-document-promotion.patch | 972 bytes | BarisW |
#1 | commons-2000702-1-document-promotion.patch | 420 bytes | BarisW |
Comments
Comment #1
BarisW CreditAttribution: BarisW commentedComment #2
ezra-g CreditAttribution: ezra-g commentedThanks for the patch! Can you provide an upgrade path that updates this value for upgrading sites?
Comment #3
BarisW CreditAttribution: BarisW commentedHi Ezra,
sure, but do we want that? What if people want their Documents on the frontpage? A feature revert sets the default state back to non-promoted, but leaves current nodes untouched. Do you want me to write a script that updates existing document nodes?
Comment #4
ezra-g CreditAttribution: ezra-g commentedThe general practice in Commons is to revert all exportable components to their defaults if we make changes to those exportables in the Commons codebase.
The assumption is that any site-specific changes to those defaults are exported in code, meaning a features-revert won't wipe out the site-specific settings.
Comment #5
BarisW CreditAttribution: BarisW commentedValid assumption (on my side). Patch attached.
Comment #6
Devin Carlson CreditAttribution: Devin Carlson commentedThe patch in #5 applied cleanly and stopped Document nodes from being promoted to the front page by default.
Tested by installing commons, checking the publishing options for Documents, applying the patch and running the included update function and finally rechecking the publishing options for Documents.
Comment #7
Devin Carlson CreditAttribution: Devin Carlson commentedCommitted to 7.x-3.x.
http://drupalcode.org/project/commons.git/commit/562340f