Quantcast
Viewing all articles
Browse latest Browse all 294878

Dates are always wrapped in a <time> HTML tag in a Views "REST Export" display

Problem/Motivation

I need to set a custom "Date format" for a field in a "REST export" display in a view.

Image may be NSFW.
Clik here to view.
Screenshot of /admin/structure/views

Image may be NSFW.
Clik here to view.
 Changed"

Steps to reproduce

  1. Create a view with a "REST export" display.
  2. Use "Show: Fields"
  3. Add a date field, like "Content: changed"
  4. Configure the field with "Date Format: Custom" and any "Custom date format"
  5. Preview the view. Observe that the custom date format is ignored. Observe that the custom date format is wrapped in an unwanted HTML time tag.
  6. Do the same with a "Page" display.
  7. Observe that the custom date format is not ignored on the page.

Or you can simply import the exported views config I have attached.

Proposed resolution

The "REST export" display should not wrap field values in HTML tags.

Also, when using the "U" date format, I would expect the output to be an integer rather than a string.

None yet.

Remaining tasks

TODO

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

TODO


Viewing all articles
Browse latest Browse all 294878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>