Problem/Motivation
For legacy reasons we enable bulk form on base and field data entity tables. This is very confusing from the UX perspective as they both appear in the UI.
Proposed resolution
Remove the one that is added to the base table since the other table is used by default. Provide update hook for existing installations that are using removed field.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | 2770137_19.patch | 11.83 KB | samuel.mortenson |
| #19 | interdiff-2770137-16-19.txt | 1.15 KB | samuel.mortenson |
| #4 | interdiff-2770137-2-4.txt | 2.28 KB | samuel.mortenson |
Comments
Comment #2
slashrsm commentedThis still needs an update hook.
Comment #3
samuel.mortensonI'll work on the update hook.
Comment #4
samuel.mortensonOK, I added an update hook for this and also changed the logic in entity_browser_views_data_alter() to check for the data table instead of the base table before adding the "entity_browser_select" field.
Comment #7
samuel.mortensonAdded a check to prevent the notices from the last test run.
Comment #10
samuel.mortensonAh - this is going to be hard or impossible to implement as some Entities, like File, have no Data Table:
Does the patch need to be re-written to remove the duplicate using the data table instead of the duplicate using the base table?
Comment #11
slashrsm commentedI guess. I checked how core adds bulk form to entities and it seems that it is always added to the base table. Safe to assume that we can do the same?
Comment #12
samuel.mortensonOK - I'll work on a re-roll to remove/migrate the data table field, and look into test coverage.
Comment #13
samuel.mortensonHere's a re-roll with a test (which I can't get running locally, strangely enough).
Comment #16
samuel.mortensonfile_get_contents was using a relative dir, should be fixed.
Comment #19
samuel.mortensonHopefully fixed some minor bugs in the tests.
Comment #20
slashrsm commentedLooks OK to me. Also tested it manually and can confirm that the view is updated.
Comment #21
slashrsm commentedAlso asked @berdir to look at this. He mentioned that it might be more performant to use data table for entities that have them (to avoid unnecessary join). However, we tested this and it turns out that the base table is never joined as a result of the bluk form field.
Should be good to go.
Comment #25
slashrsm commentedCommitted. Thanks!