Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smartypants is applied before Antlers #11302

Open
efc opened this issue Dec 23, 2024 · 0 comments
Open

Smartypants is applied before Antlers #11302

efc opened this issue Dec 23, 2024 · 0 comments

Comments

@efc
Copy link

efc commented Dec 23, 2024

Bug description

When I check both Smartypants and Antlers on a field, Smartypants is applied before Antlers. This can cause Antlers to fail since it does not know how to deal with the curly quotes.

How to reproduce

  1. Make sure that content on your pages has both Smartypants and Antlers checked.
  2. Create a page that includes the following.
---
[other YAML omitted]
description: This cat video is the okayest thing ever.
---
Trying to replace...

{{ description | replace("cat", "dog") }}

With quotes...

{{ collection:pages as "pages" }}
    {{ pages }}
        {{ title }}
    {{ /pages }}
{{ /collection:pages }}

Without quotes...

{{ collection:pages }}
    {{ title }}
{{ /collection:pages }}

When rendering the page notice that the replacement does not happy, the first collection with an alias does not work. But the last collection does work.

Logs

No response

Environment

Environment
Application Name: Tensegrities
Laravel Version: 11.36.1
PHP Version: 8.3.14
Composer Version: 2.8.3
Environment: local
Debug Mode: ENABLED
URL: mary.test/web
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Statamic
Addons: 7
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.45.0 Solo

Statamic Addons
alt-design/alt-redirect: 1.3.3
heidkaemper/statamic-toolbar: 1.3.0
jacksleight/statamic-bonus-routes: 0.3.2
mitydigital/feedamic: 2.5.0
statamic/importer: 1.6.0
statamic/ssg: 3.1.0
trendyminds/statamic-palette: 1.2.1

Installation

Fresh statamic/statamic site via CLI

Additional details

Also related, when Antlers is checked on a field, many other modifiers stop working altogether. It is as though a field with Antlers processing does not pass along a value at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant