Add Drupal 10 compatibility

Created on 22 March 2023, over 1 year ago

Problem/Motivation

In Other Words is not currently compatible with Drupal 10. When viewing a node that is displaying a field using the In Other Words formatter, the The website encountered an unexpected error. Please try again later. error appears.

The true error is,

Twig\Error\SyntaxError: Unknown "spaceless" tag. in Twig\Parser->subparse() (line 21 of /app/modules/inotherwords/templates/inotherwords-series-wrapped.html.twig).

Steps to reproduce

  1. Set up a vanilla Drupal 10 site.
  2. Install In Other Words module with the merge request in πŸ› Deprecated function being called Fixed
  3. Create a vocabulary with terms.
  4. Add a term reference field to a content type.
  5. Configure the term reference field to display its value using the In Other Words field formatter.
  6. Create and save a node with values in the term reference field.
  7. Visit the node's page.

Proposed resolution

  • ❌ Create a merge request that fixes the undefined function error
  • ❌ Test
  • ❌ Get maintainer review and approval
πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mlncn
  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA
    • mlncn β†’ committed 2a51d9c7 on 2.0.x
      Issue #3349529: Indicate Drupal 10 compatibility for 2.0.x branch
      
  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States cedewey Denver, CO

    To properly test this, it's necessary to bring in the bug fix for πŸ› Deprecated function being called Fixed . When I did that, I get this error when I visit a node that has a field displaying using the In Other Words formatter.

    Error: Call to undefined function Agaric\OxfordComma\oxford_comma_list() in Drupal\inotherwords\Plugin\Field\FieldFormatter\InotherwordsListFormatter->viewElements() (line 110 of /app/modules/inotherwords/src/Plugin/Field/FieldFormatter/InotherwordsListFormatter.php).

    I've also created the 🌱 Roadmap Active to plan a stable release.

  • πŸ‡ΊπŸ‡ΈUnited States cedewey Denver, CO

    The earlier error Call to undefined function Agaric\OxfordComma was because my test site didn't have the Oxford Comma and Number to Words php libraries installed. These are installed when installing In Other Words via composer, but doesn't happen with a git clone.

    Now with those libraries installed, I get the error,

    Twig\Error\SyntaxError: Unknown "spaceless" tag. in Twig\Parser->subparse() (line 21 of /app/modules/inotherwords/templates/inotherwords-series-wrapped.html.twig).

    when viewing a node using an In Other Words field formatter.

  • Status changed to Needs work over 1 year ago
    • mlncn β†’ committed 8dd75072 on 2.0.x
      Update to 'apply' usage of spaceless for Twic 2.7+
      
      Issue #3349529 by...
  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States cedewey Denver, CO

    Confirmed this was fixed directly on the 2.0.x branch.

  • πŸ‡ΊπŸ‡ΈUnited States cedewey Denver, CO
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024