Post by wig1176 » Mon Jul 26, 2021 9:35 pm

hi all.
This is really stumping me here. When you use the "search" function on my site you get a fatal error
Version 3.0.1.1

Code: Select all

Fatal error: Uncaught Twig_Error_Syntax: Expected name or number in "default/template/product/search.twig" at line 135 in /hermes/bosnacweb06/bosnacweb06aw/b2547/nf.thebasspalacecom/public_html/system/library/template/Twig/ExpressionParser.php:382 Stack trace: #0 /hermes/bosnacweb06/bosnacweb06aw/b2547/nf.thebasspalacecom/public_html/system/library/template/Twig/ExpressionParser.php(300): Twig_ExpressionParser->parseSubscriptExpression(Object(Twig_Node_Expression_Constant)) #1 /hermes/bosnacweb06/bosnacweb06aw/b2547/nf.thebasspalacecom/public_html/system/library/template/Twig/ExpressionParser.php(194): Twig_ExpressionParser->parsePostfixExpression(Object(Twig_Node_Expression_Constant)) #2 /hermes/bosnacweb06/bosnacweb06aw/b2547/nf.thebasspalacecom/public_html/system/library/template/Twig/ExpressionParser.php(84): Twig_ExpressionParser->parsePrimaryExpression() #3 /hermes/bosnacweb06/bosnacweb06aw/b2547/nf.thebasspalacecom/public_html/system/library/template/Twig/ExpressionParser.php(41): Twig_ExpressionParser->getPrimary( in /hermes/bosnacweb06/bosnacweb06aw/b2547/nf.thebasspalacecom/public_html/system/library/template/Twig/ExpressionParser.php on line 382
any help would be greatly appreciated. Thanks

Newbie

Posts

Joined
Wed Jun 18, 2014 9:41 pm

Post by Gergely » Mon Jul 26, 2021 10:20 pm

Hey there!

Have you modified the original template files / are you using a custom theme?
In any case, could you share the actual code that's introducing the error?
(From line 135 in "default/template/product/search.twig")

Active Member

Posts

Joined
Wed Sep 30, 2020 7:58 pm

Post by wig1176 » Mon Jul 26, 2021 10:22 pm

Code: Select all

  {% for i in 1..5 %}

Newbie

Posts

Joined
Wed Jun 18, 2014 9:41 pm

Post by straightlight » Tue Jul 27, 2021 12:06 am

wig1176 wrote:
Mon Jul 26, 2021 10:22 pm

Code: Select all

  {% for i in 1..5 %}
Uninstall each extensions if you are not sure which one originally causes this issue. Then, clear all OC caches and see if that rectifies the issue.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by wig1176 » Tue Jul 27, 2021 8:45 pm

Thanks. I did that and still have the issue.

Newbie

Posts

Joined
Wed Jun 18, 2014 9:41 pm

Post by straightlight » Tue Jul 27, 2021 9:02 pm

wig1176 wrote:
Tue Jul 27, 2021 8:45 pm
Thanks. I did that and still have the issue.
See in your modification folder if you have the product.twig in the specified folder location from your first post. If you can't see the file or the line you described on the above cannot be found on line 135, then the core template product TWIG file has been modified or you are experiencing cache issues and, that if, you did cleared the OC caches properly.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Wed Jul 28, 2021 12:37 am

OP user solved the issue from this post: viewtopic.php?f=202&t=205805&p=825804#p825804 . Issue resolved.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by paulfeakins » Fri Jul 30, 2021 8:08 pm

straightlight wrote:
Wed Jul 28, 2021 12:37 am
OP user solved the issue from this post: viewtopic.php?f=202&t=205805&p=825804#p825804 . Issue resolved.
They should add [SOLVED] to the start of the post title then.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by straightlight » Sat Jul 31, 2021 3:49 am

paulfeakins wrote:
Fri Jul 30, 2021 8:08 pm
straightlight wrote:
Wed Jul 28, 2021 12:37 am
OP user solved the issue from this post: viewtopic.php?f=202&t=205805&p=825804#p825804 . Issue resolved.
They should add [SOLVED] to the start of the post title then.
Wrong quote. User created a new topic as well as posted to an existing one.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 97 guests