Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
entity_reference.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Apr 2015 at 14:05 UTC
Updated:
23 May 2015 at 11:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
xjmThanks @bircher, good find and very clear steps to reproduce.
Agreed that this is major per: https://www.drupal.org/core/issue-priority#major-bugs It's a significant bug (and a regression), but ER and Views are still usable overall, and we would not block release on it.
Comment #2
geertvd commentedThis fixes that. Working on test coverage.
Comment #3
geertvd commentedAdded test.
Comment #6
bircherasserting the right text does make the test green.
But the issue is also that the created view doesn't show up.
Comment #7
bircherjust for the test bot to verify.
The manual test doesn't show the view, and we should also add a test that asserts that the view is shown when it exists.
Comment #9
geertvd commentedOk, I overlooked that the view should have actually been there and just fixed the fatal error.
In this one the eligible views are found correctly, I also added some more tests to demonstrate this.
Comment #10
geertvd commentedComment #12
nickdickinsonwildehttps://www.drupal.org/node/2454481 is an *older* bug report that this fully fixes (since this has a test case and identical fixes) as well as fixing further problems.
Comment #13
dawehnerThank you for finding the old issue, I totally forgot about that. Marked that one as duplicate of this issue.
Its not that always. I'd vote for
if (in_array($view->storage->get('base_table'), [$entity_type->getBaseTable(), $entity_type->getDataTable()], given that there might be entity types without a data tableComment #14
jibranNW for #13
Comment #15
geertvd commentedFixed feedback in #13
Comment #16
geertvd commentedComment #17
geertvd commentedComment #18
jibranThank you @geertvd for updating the patch.
@dawehner do you think we should add tests for this change because this seems to me a very important piece of the puzzle.
Comment #19
dawehnerYeah we absolutely should! So once for an entity type with just a base table and one with also a data table.
Comment #20
geertvd commentedExtended the test a bit, we are also testing this with entity_test now so we should have test coverage in case we just use base table also.
Comment #24
geertvd commentedComment #25
berdirThanks, test coverage looks good now I think.
People who are interested in this might also be interested in two other ViewsSelection bugs:
#2482625: Views entity reference selection with autocomplete widget broken and #2482705: ViewsSelection::validateAutocompleteInput is not implemented
Comment #26
alexpottCommitted f7c357e and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.