- Issue created by @fago
- Status changed to Needs review
4 months ago 5:24am 12 September 2024 - 🇦🇹Austria fago Vienna
While working on https://www.drupal.org/project/custom_elements/issues/3473677 🐛 JSON serialzation of markup only slots is broken Needs review I found out the real problem is not the missing element name, but the broken serialization of the markup format.
- 🇦🇹Austria fago Vienna
The main fix is MR 93: https://git.drupalcode.org/project/custom_elements/-/merge_requests/93
- 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
Per yesterday evening (before the MRs), I had trouble reproducing the screenshotted situation and doubts whether the arrows even represented slots. I don't understand this serialization code enough.
Current issue status from my perspective:
I'm guessing it was introduced by 📌 Drop simple and single+simple slot normalziation styles Active .
While I can't reproduce the above, I will try to verify by reproducing 🐛 JSON serialzation of markup only slots is broken Needs review (testing user login form).
This needs a test to make sure a bug like this does not sneak in again. After reproducing, I hope to be able to create a test and add it to https://git.drupalcode.org/project/custom_elements/-/merge_requests/93.
I'll also try to update our internal project to the latest custom_elements version, so I can run the associated tests, before committing this. (Per the README, this still needs us to create/check our own update path; I expect/hope that will be relatively quick.)
- 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
reproduce the above (serialization of the markup format)
This seems way easier than I thought; it's basically the most simple version of a setSlot() call, and then serializing that.
I'm just not experienced enough to know, yet. (Anything that is called '*Slot*()' is still magic to me.)
I'll change course and commit this now, do a new beta release so people can work with probably-non-broken code, and think about a test later.
TODO ON ME: check if tests for JSON serialization can be easily added to this module or if e.g. lupus_ce_renderer is a better place.
- Status changed to Fixed
4 months ago 4:52pm 12 September 2024 - 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
@fago
* MR 93 had a branch in the origin repo. After pushing the above commit (including a phpcs fix), I deleted the branch which closed the MR.
* Opened a followup issue for creating the test later. (Juggling priorities before RC1.)
Automatically closed - issue fixed for 2 weeks with no activity.