- 🇦🇷Argentina anairamzap Buenos Aires
Hey, thanks for adding the computed field to expose the Read Time in JsonAPI :)
I've found a tiny bug in the MR: When setting the computed value, is not clearing the `words` property so the words are adding up!We've found this issue when using jsonapi/node endpoint to list a bunch of nodes with their node_read_time field.
Example url:{domain}/jsonapi/node/{content_type}?filter[status]=1&fields[node--{content_type}]=node_read_time
on a site using Varnish cache, so the wrong (added up minutes) values were being cached by Varnish showing crazy amount of minutes for anonymous users, while logged-in users (ie: non varnish cached) were getting the 'correct' times.I'm adding a commit with the clear words line that should hopefully fix this.
- 🇵🇹Portugal joao.ramos.costa
I came here to propose add a computed field to allow using a field formatter, for instance.
So +1 !Thank you.
- @joaoramos opened merge request.
- 🇵🇹Portugal joao.ramos.costa
Just opened MR9. The main difference from the previous one is the display configurable option and the field_name definition (hence the new branch, to avoid breaking some project that relies on the current MR.).
Regards! - Status changed to Fixed
almost 2 years ago 12:56pm 2 March 2023 Automatically closed - issue fixed for 2 weeks with no activity.