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

Twig incompatibility issues with other Nextcloud apps #198

Open
dave-kennedy opened this issue Mar 25, 2022 · 3 comments
Open

Twig incompatibility issues with other Nextcloud apps #198

dave-kennedy opened this issue Mar 25, 2022 · 3 comments

Comments

@dave-kennedy
Copy link

This code in my template causes the page to timeout:

{{ [page.author, page.date_formatted] | filter(v) | join(' | ') }}

This seems to work fine however:

{{ [page.author, page.date_formatted] | filter(v => v is not empty) | join(' | ') }}

The former works in my dev environment, which has nothing to do with Nextcloud, but not on my prod website, which is using the Nextcloud integration.

Nextcloud version: 23.0.3
Pico CMS for Nextcloud version: 1.0.18

I'd love to tell you which Twig version I have but not sure how.

@PhrozenByte
Copy link
Collaborator

It was about time that this also happens for Twig 🙈

This is the same issue as with #116 and #121: Another Nextcloud app ships a different Twig version than the one Pico uses. Also see https://github.com/nextcloud/cms_pico#app-incompatibilities. Unfortunately we can't do anything about this, this is how Nextcloud deals with dependencies. If there are multiple major versions in between, contents (Markdown, YAML, Twig) might require changes to work properly. AFAIK the only breaking incompatibility is with Parsedown, i.e. in your case you can solve it by editing your theme. To do so you should make sure that your dev setup matches your prod setup.

@PhrozenByte PhrozenByte changed the title Page load timeout when using Twig filter filter shortcut Twig incompatibility issues with other Nextcloud apps Mar 25, 2022
@szaimen
Copy link

szaimen commented May 2, 2022

Which app is it this time? I guess this app should be added to the incompatibility list then...

@PhrozenByte
Copy link
Collaborator

Since one can solve the issue by simply avoiding the Twig code in question, it rather is a soft incompatibility: It will cause issues at first, but you can solve these issues and get Pico CMS for Nextcloud working. Just like with #121. On the other hand, #116 is a hard incompatibility, because you can't use Pico CMS for Nextcloud - no matter what you do. We only list hard incompatibilities.

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

No branches or pull requests

3 participants