- Issue created by @nadavoid
- πΊπΈUnited States apmsooner
Thanks for the notice. I think I really went about this wrong by saving the processed value rather than the raw value and thats why you are seeing what you're seeing. I did this with the intent to output intended html value in jsonapi and I really just need to create a computed property for processed instead and leave the saved value as raw. I'll work on a fix for this but in the meantime, this part is the problem: https://git.drupalcode.org/project/custom_field/-/blob/2.0.x/src/Plugin/.... If you need an immediate fix, you can patch this locally by returning $value['value']. The field formatter already takes care of the rendering in proper format.
- πΊπΈUnited States nadavoid
@apmsooner Thanks for the explanation and the suggestion. I'll give that a try soon.
- πΊπΈUnited States nadavoid
I tried that change and it works great for my case. I'm posting the patch here for others who may run into the same issue and are not concerned with out these fields output in jsonapi.
It sounds like this change may affect jsonapi output, so I'll leave that to you & others to work out the more complete solution that doesn't hurt jsonapi output.
-
apmsooner β
committed 82607a69 on 2.0.x
Issue #3410926 by apmsooner, nadavoid: Media embeds in text fields do...
-
apmsooner β
committed 82607a69 on 2.0.x
- Status changed to Fixed
12 months ago 5:19pm 30 December 2023 - πΊπΈUnited States apmsooner
Modified massageFormValue() to save original vs. formatted value. Jsonapi support for formatted output will be addressed in https://www.drupal.org/project/custom_field/issues/3411443 β¨ Create a custom data type and normalizer for string_long Active .
-
apmsooner β
committed 82607a69 on 3.0.x
Issue #3410926 by apmsooner, nadavoid: Media embeds in text fields do...
-
apmsooner β
committed 82607a69 on 3.0.x
- Status changed to Fixed
11 months ago 9:57am 11 January 2024