I was attempting to read the state of a cookie with
<mvt:if expr="g.request_cookies:mm5-procycle-last-product-page">
true
<mvt:else>
false
</mvt:if>
Which would return false regardless of the actual content of the variable.
Meanwhile on the very same page
&mvte:global:request_cookies:mm5-procycle-last-product-page;
correctly displayed the content of the variable as expected.
After extensive testing I have discovered that any token with a - in the name will always return 0 such as
l.settings:urls:product-add:rr
l.settings:urls:product-add:secure
The - is used extensively in my site's cookies. I don't know where the cookie name is generated so I don't know if it's custom or not.
I will likely find & change the cookies to use _ instead of - but I figured the devs would want to know of this bug so it can be fixed.
<mvt:if expr="g.request_cookies:mm5-procycle-last-product-page">
true
<mvt:else>
false
</mvt:if>
Which would return false regardless of the actual content of the variable.
Meanwhile on the very same page
&mvte:global:request_cookies:mm5-procycle-last-product-page;
correctly displayed the content of the variable as expected.
After extensive testing I have discovered that any token with a - in the name will always return 0 such as
l.settings:urls:product-add:rr
l.settings:urls:product-add:secure
The - is used extensively in my site's cookies. I don't know where the cookie name is generated so I don't know if it's custom or not.
I will likely find & change the cookies to use _ instead of - but I figured the devs would want to know of this bug so it can be fixed.
Comment