Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
On drupal 8.1.5 the data selector is showing nothing.
There ia a place to get all the tokens I can use?
Do I need to install dependency module? (e.g. tokens...)
Thanks.
Comment | File | Size | Author |
---|
Comments
Comment #2
ntigh52 CreditAttribution: ntigh52 commentedComment #3
ntigh52 CreditAttribution: ntigh52 commentedComment #4
treasury CreditAttribution: treasury commented+1
Drupal 8.1.8, PHP 7
Comment #5
saranya ashokkumar CreditAttribution: saranya ashokkumar at UniMity Solutions Pvt Limited commentedHi,
Me too facing the same issue. Data Selector Not Working in rules module. I tried to create new entity after saving new entity by rules which is also not working in drupal 8. Is there any solution to solve this issue??
Comment #6
rakesh.nimje84@gmail.com CreditAttribution: rakesh.nimje84@gmail.com commentedI am also facing the same issue. I have tested it on drupal 8.2.6 & with drupal 8.3.0-alpha1, but no success.
Comment #7
robotjox CreditAttribution: robotjox commentedError still exists on 8.3.2 - anyone have any luck?
Comment #8
norwegian.blue CreditAttribution: norwegian.blue commented+1
PHP 7
D8.4.0
Rules 8.x-3.0-alpha3+27-dev
DataSelector shows some top level items but can't drill down like in D7, (and top level items don't make sense to me).
Doco on what to enter in DirectInput mode would help !
Comment #9
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedHi all, the above comments seem to cover a variety of problems. Does "not working" mean that nothing is shown when you put the cursor into the field? Regarding what the top-level items mean and what lower-level items you get, here is an example of how the data-selector autocomplete looks for me, at various stages, when selecting an item for the 'data compare' condition.
At each point after making a selection a new set of choices are displayed. You can see the text in the field and the resulting values in the autocomplete. In this example to get the title text the final result is 'node.title.value' so you could have switched to direct input and typed this in.
Some of this might have been improved in the 16 months since the original issue was started. If anyone has specific problems with the current code then do report them here.
Comment #10
docans CreditAttribution: docans commentedI tried this again this morning, It is only step 1 that shows up. After typing "node" for step 2 no further suggestions were provided by the data selector.
Comment #11
dasjoHi there,
The options list provided by the data selector is based on what context is available and which element type the field expects.
When describing your problem, please also state which event/condition/action combination you are using to debug.
Best, Josef / dasjo
Comment #12
docans CreditAttribution: docans commentedThanks Josef
Event:
I was creating a rules component so i can use views bulk operation to create group content from existing node
Steps I took in rules:
I went to the rules component page at /admin/config/workflow/rules/components and created a component by clicking on "Add rule"
I entered the "label" as "create article group content type" and then hit save
Then i clicked on "add condition" , under "condition" i selected
I selected "Node is of type" and then i hit "continue"
on the next page, under node, i clicked on "Switch to Data Selection"
i wanted to select Node=>Type=>article
typing in "node" it doesnt give me futher suggestion to select type
Same issue for the Value section for content types
Comment #13
TR CreditAttribution: TR commentedMy experience:
The data selector works, but not as expected. This is indeed a problem. User input is not handled properly, and unless you perform the exact actions that the code wants, you won't see the correct results. I've tried this in both Chrome and Firefox, with the same results. It doesn't depend on what Rules Event you use or what entity is in the data selector, it mis-behaves the same with everything. Specifically, referring to the pictures in #9 here:
I see image 1) when I CLICK in the data selector textfield. That's OK.
But now I have my hand on the mouse, and I'm using the UI not the keyboard, so when the autocomplete selections pop up I naturally move my mouse down over the "node" option, which is then highlighted, and which I then click.
So here's the first problem - I expected to see BOTH "node" and "node..." initially in 1), if those were both options (or even *just* "node...") - that is the way a normal UI works (try the "File" menu on your browser for instance - items in that "File" menu have "..." appended if there is something additional to select). So the first problem is that I have no way of knowing that there will be additional "node..." options if I continue on from this point.
The second, bigger problem is that I DON'T see image 2) after I've clicked on "node". What I have to do is first click outside of the dataselector textfield in order to lose focus on that textfield, then click inside the textfield again - THEN the options shown in 2) will show up. This is really counterintuitive - most people won't do that so they won't see these additional options.
After I've done the click outside/click inside thing, I do see 2). Then if I select an option with a trailing "..." as shown in 3) the selector works as expected and I immediately see more options. But if I select an option without the "..." I have to do the click outside/click inside thing again to see additional options. This appears to be the same issue as in the previous paragraph, just at a different depth level in the autocomplete.
I believe what's happening here is that a selection of an item without "..." at the end causes the JavaScript to believe the selection is complete and that there are no more options that need selection - That is, absence of "..." indicates a terminal node in the menu tree, with nothing further that needs to be loaded. The only way to circumvent this is to click outside/click inside to start up the JavaScript again to re-parse the tree.
My suggestion:
If there are additional levels to the selection, ALWAYS show "node" AND "node...". Then I think no changes to the JavaScript will be required. Selection of the first will terminate the selection process as expected, selection of the second will automatically present further choices as expected. Showing just "node" indicates there are no further choices and because selecting "node" also terminates the selection process it's only by accident that you will discover there really are additional choices.
Comment #14
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedAn alternative way to get the futher selections is just type a '.' after selecting 'node' then the additional values do get shown. This is easier that clicking away & clicking back, because focus does not need to leave the text field. But also I agree that if 'node' is shown in the autocomplete, then 'node...' should also be shown. I have not yet looked at how the autocomplete code it done, so I have no idea yet if this is a simple or hard problem to fix.
Comment #15
TR CreditAttribution: TR commentedTrue, your alternative way also works, but it's just as non-intuitive as my click outside/click inside work-around. It doesn't solve the problem.
Comment #16
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedAltered the title to reflect the latest discussion. The earlier posts about "not working" do not seem to be relevent anymore, and there has been no feedback from those first posters. Hence assuming it was a usability problem as outlined by TR in #13
Comment #17
dasjoCool, thanks for these insights! How about we create a separate ticket specifically to make the autocomplete also show node... Options when you type in node and keep this ticket to discuss if there are any other improvements needed/desired?
Comment #18
norwegian.blue CreditAttribution: norwegian.blue commentedThanks TR. You're comments in #13 are v helpful.
It was in my case a usability issue.