Post by pm-netti » Tue Jan 16, 2018 1:38 am

Hi
I am doing extension, json script do error in link.

Code: Select all

Fatal error: Uncaught Twig_Error_Syntax: Unexpected character "#" in "extension/shipping/new_extesion.twig"  at line 208. in C:\MAMP\htdocs\3020\system\library\template\Twig\Lexer.php:284 
This line 208 is:

Code: Select all

 <td class="text-left"><button type="button" onclick="$('#weight-value-row-{{ key }}-{{ weight_row }}').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
Problem is this:

Code: Select all

$('#weight-value-row
What is this issue?

Peku
Last edited by pm-netti on Tue Jan 16, 2018 5:30 am, edited 1 time in total.

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by pm-netti » Tue Jan 16, 2018 1:52 am

Ps. Regex Lexer.php in line 44:

Code: Select all

 const REGEX_STRING = '/"([^#"\\\\]*(?:\\\\.[^#"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As';
why this line 273

Code: Select all

 elseif (preg_match(self::REGEX_STRING, $this->code, $match, null, $this->cursor)) {
            $this->pushToken(Twig_Token::STRING_TYPE, stripcslashes(substr($match[0], 1, -1)));
            $this->moveCursor($match[0]);
 }
is not found character "#"?

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by straightlight » Tue Jan 16, 2018 6:17 am

Please post your new_extension.twig file as a ZIP attachment file.

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 pm-netti » Tue Jan 16, 2018 2:54 pm

straightlight wrote:
Tue Jan 16, 2018 6:17 am
Please post your new_extension.twig file as a ZIP attachment file.
Why?
Code from line 208 is this:

Code: Select all

<td class="text-left"><button type="button" onclick="$('#weight-value-row-{{ key }}-{{ weight_row }}').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
Upside down :)
banner_form.twig line 83, why this is work:

Code: Select all

 <td class="text-left"><button type="button" onclick="$('#image-row{{ image_row }}, .tooltip').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by pm-netti » Wed Jan 17, 2018 5:36 am

Solved ;D
Line 165 was error:

shipping[minimum_size].height was shipping[minimum_siz].height, missing character 'e'.

Strange. Twing find issue quite the wrong place :choke:

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland
Who is online

Users browsing this forum: No registered users and 154 guests