Post by dogschoiceuk » Sun Apr 21, 2019 8:15 am

Fatal error: Uncaught Twig_Error_Syntax: Unexpected "endif" tag (expecting closing tag for the "for" tag defined near line 129) in "default/template/product/category.twig" at line 139. in /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/Parser.php:172 Stack trace: #0 /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/TokenParser/For.php(40): Twig_Parser->subparse(Array) #1 /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/Parser.php(187): Twig_TokenParser_For->parse(Object(Twig_Token)) #2 /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/TokenParser/If.php(34): Twig_Parser->subparse(Array) #3 /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/Parser.php(187): Twig_TokenParser_If->parse(Object(Twig_Token)) #4 /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/Parser.php(100): Twig_Parser->subparse(NULL, false) #5 /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/Environment.php(619): Twig_Parser->parse(Object(Twig_TokenStream)) #6 /home3/eagf in /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/Parser.php on line 172

Newbie

Posts

Joined
Tue Jun 26, 2018 4:00 am

Post by xxvirusxx » Sun Apr 21, 2019 2:30 pm

dogschoiceuk wrote:
Sun Apr 21, 2019 8:15 am
Unexpected "endif" tag (expecting closing tag for the "for" tag defined near line 129) in "default/template/product/category.twig" at line 139.

Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - RO

Post by dogschoiceuk » Sun Apr 21, 2019 4:22 pm

if i find this error will it fix it :)

Newbie

Posts

Joined
Tue Jun 26, 2018 4:00 am

Post by dogschoiceuk » Sun Apr 21, 2019 4:30 pm

this is driving me crazy i dont even know where to start with it :@

The website main page and products work on direct link but this is for category pages

Fatal error: Uncaught Twig_Error_Syntax: Unexpected "endif" tag (expecting closing tag for the "for" tag defined near line 129) in "__string_template__96cfc4fb5e2efc6739afd8f5709ad8d6e1400a78dd81314775c9f35f1f781725" at line 134. in /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/Parser.php:172 Stack trace: #0 /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/TokenParser/For.php(40): Twig_Parser->subparse(Array) #1 /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/Parser.php(187): Twig_TokenParser_For->parse(Object(Twig_Token)) #2 /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/TokenParser/If.php(34): Twig_Parser->subparse(Array) #3 /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/Parser.php(187): Twig_TokenParser_If->parse(Object(Twig_Token)) #4 /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/Parser.php(100): Twig_Parser->subparse(NULL, false) #5 /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/Environment.php(619): Twig_Parser->p in /home3/eagf5l5y/dogschoiceuk.com/system/library/template/Twig/Parser.php on line 172

Newbie

Posts

Joined
Tue Jun 26, 2018 4:00 am

Post by dogschoiceuk » Sun Apr 21, 2019 4:37 pm

after all that, i replaced the below in category.twig and it fixed it

<h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
<p>{{ product.description }}</p>
{% if product.price %}
<p class="price"> {% if not product.special %}
{{ product.price }}
{% else %} <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span> {% endif %}
{% if product.tax %} <span class="price-tax">{{ text_tax }} {{ product.tax }}</span> {% endif %} </p>
{% endif %}
{% if product.rating %}
<div class="rating"> {% for i in 1..5 %}
{% if product.rating < i %} <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> {% else %} <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>{% endif %}
{% endfor %} </div>
{% endif %} </div>

Newbie

Posts

Joined
Tue Jun 26, 2018 4:00 am

Post by xxvirusxx » Sun Apr 21, 2019 4:53 pm

dogschoiceuk wrote:
Sun Apr 21, 2019 4:30 pm
this is driving me crazy i dont even know where to start with it :@
default/template/product/category.twig" at line 139

Pay attention when you change files...

Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - RO

Post by dogschoiceuk » Sun Apr 21, 2019 4:56 pm

Parse error: syntax error, unexpected 'ModelDesignBanner' (T_STRING) in /home3/eagf5l5y/dogschoiceuk.com/admin/model/design/banner.php on line 1

thanks for the heads up the only fault i seem to have now is the banner not letting me open the link in admin

Newbie

Posts

Joined
Tue Jun 26, 2018 4:00 am

Post by xxvirusxx » Sun Apr 21, 2019 5:03 pm

What version?...

Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - RO

Post by dogschoiceuk » Sun Apr 21, 2019 5:06 pm

3.0.2.0 every time i load anything to do with banner it comes up with the above slidshow etc carasol the lot

Newbie

Posts

Joined
Tue Jun 26, 2018 4:00 am

Post by rale » Wed Sep 04, 2019 7:35 am

Hello! I found this topic on google when search for fix. Problem is like dogschoiceuk with parser.php on line 172 and Environment.php (619) but about informations pages. Any from information - route=information/information&information_id= not work . This is from enviroment line 619

Code: Select all

 return $this->getParser()->parse($stream);
and this is from parser line 172

Code: Select all

   $e = new Twig_Error_Syntax(sprintf('Unexpected "%s" tag', $token->getValue()), $token->getLine(), $this->getFilename());
I saw this part - Unexpected "%s"- but i dont know is that problem or something else.

this is all from info about error

Code: Select all


<body><br>
<b>Fatal error</b>:  Uncaught Twig_Error_Syntax: Unexpected "endfor" tag (expecting closing tag for the "if" tag defined near line 19) in "default/template/information/information.twig" at line 33. in /home/mls/public_html/system/library/template/Twig/Parser.php:172
Stack trace:
#0 /home/ml/public_html/system/library/template/Twig/TokenParser/If.php(34): Twig_Parser-&gt;subparse(Array)
#1 /home/ml/public_html/system/library/template/Twig/Parser.php(187): Twig_TokenParser_If-&gt;parse(Object(Twig_Token))
#2 /home/ml/public_html/system/library/template/Twig/TokenParser/For.php(40): Twig_Parser-&gt;subparse(Array)
#3 /home/ml/public_html/system/library/template/Twig/Parser.php(187): Twig_TokenParser_For-&gt;parse(Object(Twig_Token))
#4 /home/mls/public_html/system/library/template/Twig/Parser.php(100): Twig_Parser-&gt;subparse(NULL, false)
#5 /home/mls/public_html/system/library/template/Twig/Environment.php(619): Twig_Parser-&gt;parse(Object(Twig_TokenStream))
#6 /home/mls/public_html/system/library/template/Twig/ in <b>/home/mls/public_html/system/library/template/Twig/Parser.php</b> on line <b>172</b><br>
</body>
I use version 3.0.2.0

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am

Post by letxobnav » Wed Sep 04, 2019 10:10 am

instead of trying to discover how the twig framework generates error messages, why not focus on the actual error message:

Code: Select all

Twig_Error_Syntax: Unexpected "endfor" tag (expecting closing tag for the "if" tag defined near line 19) in "default/template/information/information.twig" at line 33

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Active Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by rale » Wed Sep 04, 2019 8:41 pm

letxobnav wrote:
Wed Sep 04, 2019 10:10 am
instead of trying to discover how the twig framework generates error messages, why not focus on the actual error message:

Code: Select all

Twig_Error_Syntax: Unexpected "endfor" tag (expecting closing tag for the "if" tag defined near line 19) in "default/template/information/information.twig" at line 33
Thank you for suggestion, i dont know how i not see that. :D

User avatar
New member

Posts

Joined
Sun Apr 17, 2016 1:44 am
Who is online

Users browsing this forum: No registered users and 34 guests