Problem/Motivation

The website encountered an unexpected error. Please try again later.

Twig\Error\SyntaxError: Unexpected token "name" of value "if" ("end of statement block" expected). in Twig\TokenStream->expect() (line 135 of modules/contrib/varbase_bootstrap_paragraphs/templates/paragraph--bp-columns-two-uneven.html.twig).

  @javascript @local @development @staging @production
  Scenario: Check if a user with a permission to manage Landing page (Paragraphs) content type can add paragraphs of type Columns Two Uneven
    Given I am a logged in user with the "Site admin" user
    When I go to "/node/add/landing_page"
    And I wait
    And I fill in "Test Landing page Columns (Two Uneven)" for "Title"
    And I fill in "Test Landing page description Columns (Two Uneven)" for "Page description"
    And I wait for AJAX to finish
    And I wait for 1 second
    And I press "Add Component"
    And I wait for AJAX to finish
    And I wait for 1 second
    And I select the "bp_columns_two_uneven" paragraph component
    And I wait for AJAX to finish
    And I select "published" from "edit-moderation-state-0-state"
    And I press the "Save" button
    And I wait
    Then I should see "Landing page (Paragraphs) Test Landing page Columns (Two Uneven) has been created"
      The text "Landing page (Paragraphs) Test Landing page Columns (Two Uneven) has been created" was not found anywhere in the text of the current page. (Behat\Mink\Exception\ResponseTextException)

Proposed resolution

Change the Twig code to work with TWIG ~3.0
Use the following in loops

            {% if key|first != '#' %}
            
            {% endif %}

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-10.0.0-alpha1, varbase_bootstrap_paragraphs-10.0.0-alpha1, varbase-9.0.16, varbase_bootstrap_paragraphs-9.0.15

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3345517: Fixed Drupal ~10.0 and TWIG ~3.0 Unexpected token name of value if (end of statement block expected)

Comments

Rajab Natshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

  • Rajab Natshah committed 52fc5dec on 10.0.x
    Issue #3345517: Fix Drupal ~10.0 and TWIG ~3.0 Unexpected token name of...
rajab natshah’s picture

Assigned: rajab natshah » mohammed j. razem
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-10.0.0-alpha1, +varbase_bootstrap_paragraphs-10.0.0-alpha1
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

rajab natshah’s picture

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-9.0.16