- Issue created by @Anybody
Blocked by Drupal core issue: 🐛 Custom Core Twig Filter "format_date" conflicts with twig/intl-extra Active
Until we ran into this Drupal core issue:
🐛
Custom Core Twig Filter "format_date" conflicts with twig/intl-extra
Active
which will presumably not be solved within years, we were able to use the twig_intl methods for date/currency/number formatting. Sadly this conflicts with Drupal core's |format_date()
filter:
🐛
Twig\Error\RuntimeError: The date format "html_date" does not exist
Active
So we needed to remove the simple twig_intl filters and had to do all the formatting ourselves in HOOK_preprocess and for dates using this workaround |date('u')|format_date('short')
as Billwerk uses this date format: "2023-12-06T23:00:00.0000000Z"
Related commits:
https://git.drupalcode.org/project/billwerk_subscriptions/-/commit/450fb...
https://git.drupalcode.org/project/billwerk_subscriptions/-/commit/a1487...
https://git.drupalcode.org/project/billwerk_subscriptions/-/commit/011cc...
https://git.drupalcode.org/project/billwerk_subscriptions/-/commit/1f4ce...
So if one day the core issue will be solved, we can simply all this by using the twig filters again, like before.
But as written above, we might be dead until that happens... so this is mainly for documentation of this ugly workaround.
Postponed
1.0
Code