Closed jimblue closed 4 years ago
Same error happens when a fieldset has a checkbox field and none of the options are selected.
Even if you use code like this:
{{ collection:posts scope="post" }}
{{ post:title }}
{{ categories scope="category" }} <- this scope throw an exception
{{ category:title }}
{{ /categories }}
{{ /collection:posts }}
"Posts" is a collection that have related "Categories" entries through an "Entries" field type in the blueprint.
(I know that "scope" in this situation is not necessary but i think it shouldn't raise an exception if it is used).
Probably this happen even before the 3.0.5
Probably this happen even before the 3.0.5
It was perfectly working before 3.0.5
Probably introduced in 3.0.4, so stay on 3.0.3 for the moment. Will fix this soon.
I still get this error on 3.0.6. I've cleared all the caches, etc.
Likely this part of my template:
{{ posts scope="page"}}
{{ partial:blog-post truncation="true" comment_link="true" }}
{{ /posts }}
I get this issue with 3.0.6
{{ paginate }}
{{if total_items > items_limit}}
<div class="w-full ">
<div class="c-pagination">
<a class="c-button" href="{{ prev_page }}">{{ svg src="left"}}</a>
{{ current_page }} / {{ total_pages }}
<a class="c-button" href="{{ next_page }}">{{ svg src="right"}}</a>
</div>
</div>
{{ /if }}
{{ /paginate }}
It seems there are lots of different possible types for $values
here, not just Value
or Array
. I have a situation where with recursive navs where the {{ depth }}
tag results in an int
type.
@acurrieclark Could you share your template where the depth variable is being used and causing the error?
@jasonvarga Of course. Should have added it sooner, apologies
https://gist.github.com/acurrieclark/a3e43a1e268cc35a980dd526029b175f
Thanks @acurrieclark
Looks like the cause is this line: https://gist.github.com/acurrieclark/a3e43a1e268cc35a980dd526029b175f#file-statamic-menu-php-L35
{{ depth - 1 }}
is not something Antlers supports. Was this even doing what you expected before 3.0.4?
The way to do that in Antlers is to use the minus modifier. {{ depth | -:1 }}
@jasonvarga it was doing what I wanted, but clearly not as a result of my efforts! Just made that change and all is well in 3.0.6. Thanks for taking the time to look at it for me.
This is solved on my side with 3.0.6
🙏🏼
More fixes in 3.0.7
Bug Description
After updating to Statamic release 3.0.5 bard page with bard field return an error.
Extra Detail
Using bard field like suggested in the doc:
The error:
Environment