Follow-up from #2114563: Remove TwigReference with the help of 'without' filter replacing 'show'/'hide' functions..

Seems that |raw is still not working right after the TwigReference removal. This must have been when I was playing with the priority because now if I move the priority to a normal positive number (above the escaper). |raw works with autoescaping on.

@dawener also mentioned macros seemed to work better when this was at a higher priority.

Files: 
CommentFileSizeAuthor
#10 interdiff.txt490 bytesCottser
#10 2221535-10.patch2.97 KBCottser
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,413 pass(es). View
#7 interdiff.txt855 bytesCottser
#6 2221535-6.patch2.93 KBCottser
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,344 pass(es). View
#6 2221535-6-fail.patch2.39 KBCottser
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,385 pass(es), 3 fail(s), and 0 exception(s). View

Comments

joelpittet’s picture

Status: Active » Needs review
Issue tags: +Quick fix
Related issues: +#1825952: Turn on twig autoescape by default
FileSize
495 bytes
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,339 pass(es). View

Throwing this patch up to see if testbot has issues but likely needs some review to see if this will cause other issues. Fairly confident it should be fine. Let's have a look shall we?

Also, may need tests of some sort but can't think of how/what but something to show the raw and macros are working as expected.

Status: Needs review » Needs work

The last submitted patch, 1: 2221535-TwigNodeVisitor-priority-1.patch, failed testing.

Cottser’s picture

Status: Needs work » Needs review
Cottser’s picture

Test passes locally, testbot log says:

Segmentation fault
FATAL Drupal\views\Tests\Handler\AreaTest: test runner returned a non-zero error code (139).

Sent for re-test.

Cottser’s picture

FileSize
2.47 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Setup environment: Test cancelled by admin prior to completion. View
3.01 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Setup environment: Test cancelled by admin prior to completion. View

Here we go, this should fail/pass appropriately. Left the interdiff off because the previous patch is one line :)

I stole the drupalSetContent() trick from the twig namespace tests. Makes me want to refactor some of our theme test coverage to remove page callbacks knowing that's possible!

Cottser’s picture

FileSize
2.39 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,385 pass(es), 3 fail(s), and 0 exception(s). View
2.93 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,344 pass(es). View

Fixed up a bit, will cancel the #5 patches.

Cottser’s picture

FileSize
855 bytes

Forgot the interdiff. /me goes to bed

The last submitted patch, 5: 2221535-5.patch, failed testing.

The last submitted patch, 5: 2221535-5-fail.patch, failed testing.

Cottser’s picture

FileSize
2.97 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,413 pass(es). View
490 bytes

However might as well fix the docblock while we are here because this will conflict a bit with #2212309: Drupal\Core\Template and twig.engine docs, coding standards, and unused code cleanup anyway.

The last submitted patch, 6: 2221535-6-fail.patch, failed testing.

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

Awesome, #6 says it all. I'm cool with the conflict reroll in #2212309.

dawehner’s picture

<3

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Great catch, and with tests too! :)

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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