Problem/Motivation

Now that we have a generic 'entity_autocomplete' form element, we can use it in the Views wizard for the 'tagged_with' field.

Proposed resolution

Do it.

Remaining tasks

None.

User interface changes

Nope.

API changes

Nope.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Prioritized changes Follow-up for a critical issue #1959806: Provide a generic 'entity_autocomplete' Form API element.

Comments

amateescu’s picture

Status: Active » Needs review
StatusFileSize
new5.09 KB

This should do it.

Status: Needs review » Needs work

The last submitted patch, 1: 2428941.patch, failed testing.

amateescu’s picture

Status: Needs work » Needs review
StatusFileSize
new5.13 KB
new800 bytes

Ahem.

jibran’s picture

Issue tags: +VDC

This patch is ready just a very minor nit.

+++ b/core/modules/node/src/Plugin/views/wizard/Node.php
@@ -113,14 +114,19 @@ protected function defaultDisplayOptions() {
+        'vid' => $form['displays']['show']['tagged_with']['#selection_settings']['target_bundles'][0],

@@ -249,18 +255,13 @@ protected function buildFilters(&$form, FormStateInterface $form_state) {
+        '#selection_settings' => ['target_bundles' => [FieldStorageConfig::loadByName('node', $tag_field_name)->getSetting('allowed_values')[0]['vocabulary']]],

Please can we store this in local variables instead of doing this long thing. :)
Like $vid = $form['displays']['show']['tagged_with']['#selection_settings']['target_bundles'][0];
and $taget_bundles =....

amateescu’s picture

StatusFileSize
new5.24 KB
new1.72 KB

You mean like this? I dunno, I think I prefer #3 but I'll let others decide :)

jibran’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the fix. This is ready.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 653712e and pushed to 8.0.x. Thanks!

Thanks for adding the beta evaluation to the issue summary.

  • alexpott committed 653712e on 8.0.x
    Issue #2428941 by amateescu: Update the Node views wizard to use '...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.