Back to Shopaholic Theme with PAGE BUILDER - Agora Support

novilya19957327
novilya19957327

Hi, after installing the theme, I get an error (Unexpected token "name" of value "if" ("end of statement block" expected).) All pages https://i2.paste.pics/2e40b376cd811524ab366ff3359ea5d8.png

Twig\Error\SyntaxError: Unexpected token "name" of value "if" ("end of statement block" expected) in "C:\OpenServer\domains\salis\themes/ketikidis-agora-child/partials/blocks/categories.htm" at line 16. in C:\OpenServer\domains\salis\vendor\twig\twig\src\TokenStream.php:76

October cms 3 GrofGraf.ContactMe 1.1.2 Yes Lovata.Toolbox 1.34.1 Yes Martin.SSButtons 1.3.1 Yes October.Demo 1.0.1 Yes RainLab.Blog 1.5.4 Yes RainLab.MailChimp 1.0.4 Yes RainLab.Pages 1.5.0 Yes RainLab.User 1.6.2 Yes Simplicitylab.BlogFeaturedVideo 1.1.0 Yes Lovata.Shopaholic 1.30.5 Yes PolloZen.MostVisited 1.0.2 Yes Rahman.BlogTags 1.0.11 Yes Lovata.OrdersShopaholic 1.31.2 Yes

Last updated

Charis
Charis

novilya19957327 said:

Hi, after installing the theme, I get an error (Unexpected token "name" of value "if" ("end of statement block" expected).) All pages https://i2.paste.pics/2e40b376cd811524ab366ff3359ea5d8.png

Twig\Error\SyntaxError: Unexpected token "name" of value "if" ("end of statement block" expected) in "C:\OpenServer\domains\salis\themes/ketikidis-agora-child/partials/blocks/categories.htm" at line 16. in C:\OpenServer\domains\salis\vendor\twig\twig\src\TokenStream.php:76

October cms 3 GrofGraf.ContactMe 1.1.2 Yes Lovata.Toolbox 1.34.1 Yes Martin.SSButtons 1.3.1 Yes October.Demo 1.0.1 Yes RainLab.Blog 1.5.4 Yes RainLab.MailChimp 1.0.4 Yes RainLab.Pages 1.5.0 Yes RainLab.User 1.6.2 Yes Simplicitylab.BlogFeaturedVideo 1.1.0 Yes Lovata.Shopaholic 1.30.5 Yes PolloZen.MostVisited 1.0.2 Yes Rahman.BlogTags 1.0.11 Yes Lovata.OrdersShopaholic 1.31.2 Yes

Hello!
You are using Octobercms v3, this version is on beta stage.

The problem has to do with twig v.3 that Octobercms 3.0 uses. As you can see on Octobercms documentation "Breaking Change Overview", twig v3 * removed the "if" condition support on the "for" tag. This means the syntax used in previous versions that allows and "if" statement to occur alongside a "for" statement is no longer possible.
This is a general problem for all octobercms plugins that now has to fix this issue. For example, even rainlab statick pages plugin has this issue in component code:
"/plugins/rainlab/pages/components/staticmenu/items.htm line 1"

Charis
Charis

novilya19957327 said:

Hi, after installing the theme, I get an error (Unexpected token "name" of value "if" ("end of statement block" expected).) All pages https://i2.paste.pics/2e40b376cd811524ab366ff3359ea5d8.png

Twig\Error\SyntaxError: Unexpected token "name" of value "if" ("end of statement block" expected) in "C:\OpenServer\domains\salis\themes/ketikidis-agora-child/partials/blocks/categories.htm" at line 16. in C:\OpenServer\domains\salis\vendor\twig\twig\src\TokenStream.php:76

October cms 3 GrofGraf.ContactMe 1.1.2 Yes Lovata.Toolbox 1.34.1 Yes Martin.SSButtons 1.3.1 Yes October.Demo 1.0.1 Yes RainLab.Blog 1.5.4 Yes RainLab.MailChimp 1.0.4 Yes RainLab.Pages 1.5.0 Yes RainLab.User 1.6.2 Yes Simplicitylab.BlogFeaturedVideo 1.1.0 Yes Lovata.Shopaholic 1.30.5 Yes PolloZen.MostVisited 1.0.2 Yes Rahman.BlogTags 1.0.11 Yes Lovata.OrdersShopaholic 1.31.2 Yes

Hello!
I updated theme to fix this issue on Octobercms v3. Please update to latest version 1.1.8. But for plugins you have to make changes on your own, like for example "rainlab plugin static pages plugin".

novilya19957327
RempadDesign
RempadDesign

Hi all. The October cms documentation says something else: https://snipboard.io/19IbWK.jpg

But indeed, the if statement in a for loop is not working :( All the best.

1-5 of 5