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

{getImageDimensions image = $tmpImages[0]} error #1077

Closed
criocere opened this issue Nov 1, 2024 · 3 comments
Closed

{getImageDimensions image = $tmpImages[0]} error #1077

criocere opened this issue Nov 1, 2024 · 3 comments

Comments

@criocere
Copy link

criocere commented Nov 1, 2024

Still trying to migrate from v4 to v5...
I try also to use extensions for tags and modifiers

This line is ok in smarty v4
{getImageDimensions image = $tmpImages[0]}

But in smarty v5 I get
Got error 'PHP message: PHP Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:zzzzPage.tpl" on line 235 "{getImageDimensions image = $tmpImages[0]}" unknown tag 'getImageDimensions'

If I modify my line like this (adding a blank after the first bracket), it becomes ok
{ getImageDimensions image = $tmpImages[0]}

@elgarfo
Copy link

elgarfo commented Nov 6, 2024

does the code work for you when adding the space?

i have somewhat similar problem that a registered tag compiler is not executed. in my case, adding the space before the tagname prevents the error, but the code does not get executed and smarty just outputs the curly braces and its contents as string.

EDIT:
might be related to #907 and #910.
in my case it was a custom tag compiler that was registered as "CustomTag". i was unable to use it with "{CustomTag}" in a template. got it working again after changing the registerPlugin call to "customtag" instead.
FWIW: i am migrating a codebase from smarty 3.

@criocere
Copy link
Author

criocere commented Nov 6, 2024

Yes I think you are right. Because I have errors on all my plugins when I try to use the extension. I don't see the result.

I described my problem completely here
#1072

I am blocked in my migration in v5 to convert all my plugins and modifiers (more than 50) in an extension. I'm quite sure to follow the doc but that doesn't work. If I use registerPlugin, everything is ok but I don't like this solution, it seems not very performant as I have more than 50 call to registerPlugin!!

Any idea?

@wisskid
Copy link
Contributor

wisskid commented Nov 18, 2024

Answered in #1072.

@wisskid wisskid closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2024
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

3 participants