Updated: Comment #0

Problem/Motivation

It turned out in #2226517: Migrate view modes to D7 that entity information is not stored persistently anywhere. Entity info is parsed from hooks and temporary cached. It's true — we have also the field_bundle_settings_ENTITYTYPE__BUNDLENAME variables (see https://drupal.org/node/1569594). But those are only inserted/changed via UI and for this reason we cannot rely on them. It is impossible to upgrade to Drupal 8 using the new "migration in core" system because at least view modes are not stored anywhere in the database and migration doesn't run D7 code, it reads the database.

Proposed resolution

Create a module which stores information in the database in preparation for migration. Currently that's mostly view modes but it's better to actually store everything in entity_info just in case. It is easy to see this module will need to copy Views export into Views database tables as well. And who knows what else -- definitely needs to be contrib expandable.

Remaining tasks

Do we add this to core? I don't think so or at least not solely because it'd force people to upgrade to latest before migration and that's unnecessary complexity for people -- first suffer the costs of a minor upgrade (not so minor if you are on a 1yr+ odl release). Also, if we put Views in there, does it belong to core? If it's a contrib then core depends on contrib? Who maintains this module? Who is responsible for this?

User interface changes

Currently we have added a page where the storing happens.

API changes

New system variable, storing the whole entity info array. Presumedly a new hook will be necessary,

Comments

chx’s picture

Issue summary: View changes