SMARTY template parser throwing error performing '{if}' on undefined index. #124
Labels
No labels
bug
confirmed
critical
discussion
documentation
Doing
enhancement
experiment
suggestion
support
Testing
To Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: hazaar/framework#124
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It is reported that the following error is generated:
for the following template:
If the supplied params look like:
changed the description
changed the description
changed the description
changed the description
changed title from SMARTY template parser throwing error performing '{if}' on {-missing-} index. to SMARTY template parser throwing error performing '{if}' on {+undefined+} index.
changed title from SMARTY template parser throwing error performing {-'{if}'-} on undefined index. to SMARTY template parser throwing error performing {+
{if}
+} on undefined index.changed title from SMARTY template parser throwing error performing {-
{if}
-} on undefined index. to SMARTY template parser throwing error performing {+'{if}'+} on undefined index.created branch
124-smarty-template-parser-throwing-error-performing-if-on-undefined-index
mentioned in merge request !37
Ok, I have simulated this in an application and I can not see the error. I think this could be because the template is being parsed inside a Warlock process and the error control is different there. I will see how I can replicate this.
Site note though. It appears that parameter tags that are adjacent to newlines is actually deleting the newline character(s). So in the above template, the output is:
Which is wrong. I'll look into this while I'm at it.
I have managed to replicate the issue by removing the '@' sign from the line:
Also, I have fixed the newline issue in
53741fb77a
Figured it out. Basically I removed the above '@' sign from the overall render call and moved it to the individual sections that product executable code. Fortunately there were only 4 of these:
That should be it. I have tested before the update and after and all code warnings are now gone so this should fix the issue in Warlock as well.
closed via merge request !37
closed via commit
50c29552f2
mentioned in commit
50c29552f2
changed milestone to %4