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.
Problem/Motivation
Fieldblocks won't be displayed when viewing a revision of a entity or during preview mode when viewing a node entity.
Proposed resolution
Refactor \Drupal\fieldblock\Plugin\Block\FieldBlock so it also takes entity revision/preview routes into account.
Remaining tasks
None
User interface changes
Fieldblocks will be displayed on entity revision/preview routes.
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#8 | fieldblock_display_revision_2605874_8.patch | 4.07 KB | nkoporec |
#6 | interdiff-2605874-2-6.txt | 709 bytes | dpacassi |
#6 | fieldblocks_on_entity_revisions-2605874-6.patch | 3.76 KB | dpacassi |
#2 | 2605874.patch | 3.68 KB | casey |
Comments
Comment #2
casey CreditAttribution: casey commentedComment #3
casey CreditAttribution: casey commentedComment #4
casey CreditAttribution: casey commentedComment #5
dpacassiThanks for the patch, still works with fieldblock 2.0 alpha1 and Drupal 8.4.2.
Comment #6
dpacassiI've had to adapt the patch slightly as it didn't work for "node/nid/latest" urls.
Attached is an updated patch (also updated to work with the dev branch) as well as the interdiff.
Comment #7
Sutharsan CreditAttribution: Sutharsan at LimoenGroen commentedNeeds reroll, Patch does not apply.
This should also be entity type independent.
Comment #8
nkoporecCreated a patch re-roll with fixed issue that @Sutharsan raised.
Comment #9
keshavv CreditAttribution: keshavv as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedI tested the patch, #8 will fix the problem. thanks
Comment #10
Sutharsan CreditAttribution: Sutharsan at LimoenGroen commented@nkoporec, thanks for the re-roll. Next time please make a separate patch for re-roll and for the change. That way you can provide an interdiff of only the changes which makes it easier to check what you have done. And gives me more confidence that the re-roll does not contain changes.
Comment #11
Sutharsan CreditAttribution: Sutharsan at LimoenGroen commentedComment #13
Sutharsan CreditAttribution: Sutharsan at LimoenGroen commented