Entity files in incorrect type directory causing strange problems

Created on 14 December 2018, over 5 years ago
Updated 26 October 2023, 8 months ago

Currently, nothing in the module prevents you from placing an entity file in a directory that does not correspond to its entity type. This leads to strange problems. For example, the way I came across this issue was errors about duplicate keys in the database. Although I haven't debugged in detail, the entity type ID is stored fairly early in the import derived from the directory and it isn't actually checked whether that matches with the entity type in the serialized entity itself. I'll see if I can create a quick patch.

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands eelkeblok Netherlands πŸ‡³πŸ‡±

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands eelkeblok Netherlands πŸ‡³πŸ‡±

    Also, looks like the link manager is no longer injected in alpha2, so this needs more work to come up with an alternative solution.

Production build 0.69.0 2024