Suppose I'm working with a data table already, I messed around with its View a bit (to list records) which somehow saved a copy of that view in the database. Maybe I made a small change to the view.
If after this I define the table as an entity type (admin/structure/data/edit/TABLENAME/entity-type), my view's records will still not have "edit" links. (Or add/delete links, which are going to be added in #2326857: Add/Create records form for entities.) Only the default view will get these added. But I don't see any clue of this / I cannot see the default view.
What the code should probably do, is add those links to the live view and re-save it, on the submit of above form that just made the table an entity type. There's example code for the 'add' link (in the view header) in the .install file in the patch in #2326857: Add/Create records form for entities.
Aside from that, the submit function should also views_invalidate_cache() - because the default view will automatically change, but noone sees that as long as the old default views are still cached.
(I'm not providing a patch - just noting this in an issue for now; maybe it will lessen some confusion and/or some other mysterious open issues can be crosslinked to this.)
Comments
Comment #2
roderikAfter #2744843: Remove Entity ID field requirement gets applied, this may or may not be true anymore.
More precisely, it probably should be rephrased to "Enabling data_ui module should add edit/add/delete links to the view". And the bug described here, could still occur... if the view gets modified / a copy of the view gets saved to the database, before data_ui is enabled.
That feels to me like it's much likely to happen, though - so I'm going to ignore it / not make code for it.
What might still be true is the reverse: if you have a view with edit links that you modify / gets saved to the database... and then disable data_ui - does the view then completely break?