Problem/Motivation
For random reasons, core works fine with both normalizers having the same priority and they happen to be in the right order.
When some other module adds more or alters normalizers, then that might not be the case anymore and the one from serialization is used for hal_json and everything breaks apart in very bad ways.
See https://travis-ci.org/md-systems/file_entity/jobs/78918953, normalisation is completely broken when file_entity is enabled.
Proposed resolution
Set the weight of the one in serialization to 5.
Remaining tasks
No idea if we can test this?
User interface changes
API changes
Data model changes
Comments
Comment #2
berdirPatch.
To test this we'd have to somehow reproduce the order that happens to result when file_entity is enabled, no idea if that's possible? I also hope I can eventually move some of that into core so I won't need it anymore ;)
Comment #3
damiankloip commentedPatch looks fine to me. I am not sure we can sanely test that in core. We could create a test module with a normalizer similar to file_entity and check that way, but when this patch goes in, that seems to become a bit of a wtf test anyway.
The whole priority stuff for normalizers (especially) and encoders is kind of horrible. That ship has sailed though I think...
Comment #4
berdirHere's the discussed @todo for @alexpott.
Comment #5
damiankloip commentedRTBC then.
Comment #6
damiankloip commentedComment #7
alexpottCommitted cc14599 and pushed to 8.0.x. Thanks!