Problem/Motivation
First off, great module you've build.
I do have some concerns about the module, that I hope I can discuss with you.
- Why use the "key_value" table / State API for storing data?
Documentation of the State API - https://www.drupal.org/docs/develop/drupal-apis/state-api/state-api-over... - says among other things "It is not meant to be exported.", but it would be very nice to able to export the view_mode values.
In Drupal 10.3.0 the state cache has been added and since Drupal 11 it is permanently active - https://www.drupal.org/node/3177901.
The state cache is only effective if the entry/row count in the key_value table is below 100. This module would surely make the key_value table exceed that amount.
Did you consider, or plan to, using/use a dedicated table or content entity base field for storing values?
- When a content entity is deleted the matching value in the "key_value" table is not, and the table is quickly filled up which stale values.
- Same goes when uninstalling the module. Related values in the "key_value" is not purged.
- If a view mode, which is used by this module, is deleted, the module does not revert to the "view mode" configured in the widget, but tries to use "master" / "default". It should use the widget's configured view mode.
Issue fork ervms-3633767
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mighty_webberflemming.fridthjof, thank you for this insight. We will look into this. We will update here when it is ready for other reviews and testing.
Comment #4
mighty_webber@flemming.fridthjof, We have run this against 2 different installations and it appears to properly migrate and works the same as before with new storage + uninstall logic. It would be great if you could review this and provide any feedback from your end before merging.
Users who are already using this won't lose any data.
Thank you in advance.
Comment #5
mighty_webberMoving to Needs Review.