Rewrite / Replacement pattern not working for (date?) fields in revisions

Created on 18 February 2019, about 6 years ago
Updated 1 February 2024, about 1 year ago

Using Rewrite results > Override the output of this field with custom text > {{ field_testdate-revision_id }} for a field "testdate" in a revision results in 0 when it should not.

Steps to reproduce:
1. Add a date field "testdate" to a content type (I'll use article)
2. Create an article, fill in mandatory fields as well as a date in "testdate" & save.
3. Re-edit the article, creating a new revision, change "testdate" & save.
4. Create a view: Show "Content revisions" of type "Article".
5. Make it an unformatted list of fields.
6. Add field "Content (historical data): testdate"
7. Configure field: Content (historical data): testdate
8. Check Rewrite results > Override the output of this field with custom text.
9. Add "Test date: {{ field_testdate-revision_id }}" (as suggested in "Replacement patterns")
10. Check view preview to see "Test date: 0"
11. Uncheck "Rewrite results": The date gets correctly displayed.

If I am misunderstanding how to use it, please correct me.
However, it works as expected when choosing Show "Content" of type "Article" in step 4. (and not revisions), so I don't think it's a layer 8 problem :)

Thanks a lot for your ongoing work, Drupal (and views in particular) is a marvelous CMS!

πŸ› Bug report
Status

Fixed

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 18 hours ago

Created by

πŸ‡¦πŸ‡ΉAustria tgoeg

Live updates comments and jobs are added and updated live.
  • VDC

    Related to the Views in Drupal Core initiative.

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