Problem/Motivation

The arguments token suggestion no longer shows the available fields (RC4).

Proposed resolution

Update the code to use the new twig style token input.

Remaining tasks

Update the code, add some tests to make sure the tokens are showing up.

User interface changes

Fixes missing available token list.

API changes

none

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jaesin created an issue. See original summary.

jibran’s picture

Title: Views token handling is like totally "Old School" T_T. » Update the views token handling to new twig style token

Yeah was going to open the ticket. Thanks for pointing that out an opening the issue.

PS: No need to be over dramatic about it. :P

Jaesin’s picture

Status: Active » Needs review
FileSize
6.91 KB

lolol

Rough draft. I know this leaves some tests a bit out of date.

Status: Needs review » Needs work

The last submitted patch, 3: 2616870_3.patch, failed testing.

The last submitted patch, 3: 2616870_3.patch, failed testing.

jibran’s picture

That was fast. <3 that we have a tests for that.

+++ b/src/Plugin/views/field/View.php
@@ -446,11 +384,10 @@ class View extends FieldPluginBase {
-    }
-    else {
+    } else {

We need to revert this.

Jaesin’s picture

+++ b/src/Plugin/views/field/View.php
@@ -393,50 +349,32 @@ class View extends FieldPluginBase {
+    $this->documentSelfTokens($options[$optgroup_fields]);

I guess this wouldn't do anything.

dawehner’s picture

Worked on that indepenent ... @jaesin Do you wanna check whether beta2 fixes things for you and works as expected

dawehner’s picture

Status: Needs work » Needs review

.

Status: Needs review » Needs work

The last submitted patch, 3: 2616870_3.patch, failed testing.

The last submitted patch, 3: 2616870_3.patch, failed testing.

dawehner’s picture

Status: Needs work » Fixed

Fixed another bug: the regex didn't supported ... field_name_1 ...

Status: Fixed » Closed (fixed)

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

saru1683’s picture

Status: Closed (fixed) » Active

I have applied patch manually, It's work on beta2, But there is a notice on dblog.
Notice: Undefined variable: values in Drupal\views_field_view\Plugin\views\field\View->getTokenArguments() line 348.

Thank you.

dawehner’s picture

@saru1683
Do you mind checking out the dev version? Beta versions IMHO are pointless, the DEV version will always have less bugs.

saru1683’s picture

Okay Thnx, I will check with Dev.

jibran’s picture

Status: Active » Fixed

Marking as fixed as per #8.

Status: Fixed » Closed (fixed)

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