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

Berdir created an issue. See original summary.

berdir’s picture

Status: Active » Needs review
StatusFileSize
new772 bytes

Patch.

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 ;)

damiankloip’s picture

Patch 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...

berdir’s picture

Here's the discussed @todo for @alexpott.

damiankloip’s picture

RTBC then.

damiankloip’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed cc14599 and pushed to 8.0.x. Thanks!

  • alexpott committed cc14599 on 8.0.x
    Issue #2575741 by Berdir: Priority of serialialization...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.