Needs work
Project:
Rules
Version:
8.x-3.x-dev
Component:
Rules Core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Oct 2016 at 09:57 UTC
Updated:
22 Aug 2018 at 04:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
swim commentedPlease see, https://github.com/fago/rules/pull/487; as a potential solution.
Comment #3
swim commentedComment #4
tr commentedI can confirm that following the above steps leads to a WSOD.
Moving to "Active" status as there is no patch to review yet.
Comment #5
tr commentedI closed #2862768: [comment:edit-url] : Undefined Variable, which was reporting the same error with the invalid (D7-style tokens) [site:mail], [comment:body], and [comment:edit-url]
Comment #6
swim commentedSorry I thought all dev work was happening on github :S, please find attached.
Comment #7
fagoTest seems to fail? Anyway, I think we should add a test case to proof this works now even with invalid tokens.
Comment #8
tr commentedThese are real test failures - that is, the patch changed the message Rules outputs when there is an invalid token, and the test is still looking for the 'old' message.
Personally, I think the 'old' message, which is
Data selector <em class="placeholder">list_item</em> for context <em class="placeholder">Text to concatenate</em> is invalid. Unable to get variable list_item, it is not defined.is a LOT more descriptive and useful than the new message after the patch, which isUndefined index: list_item.Regardless, the module output has to match what the string is testing for. The test failure happens in
Drupal\Tests\rules\Unit\Integration\Engine\LoopTest::testOutOfScopeVariableExecution()