Post by svremeto » Fri Feb 16, 2018 1:50 am

Hello!

We are with Fastor template, opencart 2.3.0.2.

We have a problem when going to the first page of each category. When viewing the pages 1,2,3 and etc and then click to go to the first page we see this error:
http://prntscr.com/if7sda
I`ve checked the files and i see on line 174 this:
http://prntscr.com/if7toc

line 362 and 369:
http://prntscr.com/if7w3k
the continue of line 369:
http://prntscr.com/if7wqg

Do you have some idea what should be changed in this file to fix this error?

Warning: A non-numeric value encountered in /home/masonar1/public_html/system/storage/modification/catalog/controller/product/category.php on line 174Warning: A non-numeric value encountered in /home/masonar1/public_html/system/storage/modification/catalog/controller/product/category.php on line 362Warning: A non-numeric value encountered in /home/masonar1/public_html/system/storage/modification/catalog/controller/product/category.php on line 369Warning: A non-numeric value encountered in /home/masonar1/public_html/system/storage/modification/catalog/controller/product/category.php on line 369Warning: A non-numeric value encountered in /home/masonar1/public_html/system/storage/modification/catalog/controller/product/category.php on line 369

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by straightlight » Fri Feb 16, 2018 6:00 am

storage/modification errors originates by installed extensions. From your admin - > extensions - > modifications page, uninstall them one-by-one until the errors from the categories page vanishes. Also, switch back to the default theme and see if the same issue can be replicated.

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 svremeto » Sat Feb 17, 2018 2:05 am

Hm.. i`ve tried with disabling the extensions and i see the difference only on the accelerated mobile pages version. It happened when i disabled NitroPack. The difference was that the page loading (usually no loading) but showing the crash errors like on the desktop version. Desktop version - no difference.
I don't want to change the current fastor template because i am afraid that i will lose the changes in it. And actually will not be good because if I cant use the current look of the website no matter that I fixed this error.

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by svremeto » Tue Feb 20, 2018 1:12 am

I found this:
http://prntscr.com/igxsww
Is it this strange url?
When its on page 2 the end of the url is:
/rings?page=2
If i click to page one the end of the url is:
/rings?page={page}

Maybe i should edit this from some opecart file... Should i?

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by straightlight » Tue Feb 20, 2018 1:35 am

What is on line 175 of that file from your screenshot? More information is needed.

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 svremeto » Tue Feb 20, 2018 1:43 am


New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by straightlight » Tue Feb 20, 2018 1:56 am

Can you highlight the exact lines? It's not obvious what you are posting.

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 svremeto » Tue Feb 20, 2018 2:04 am

Sorry, yes.

http://prntscr.com/igynj9
http://prntscr.com/igyod9

the red lines are from the error

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by straightlight » Tue Feb 20, 2018 2:11 am

Switch back to the default theme and see if the same issue can be reproduced.

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 svremeto » Tue Feb 20, 2018 3:49 am

straightlight wrote:
Tue Feb 20, 2018 2:11 am
Switch back to the default theme and see if the same issue can be reproduced.
I`ve tried - same error...

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by straightlight » Tue Feb 20, 2018 4:35 am

Can you post the file as an attachment? Do NOT post the file as a whole content of your next post but as an attachment.

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 svremeto » Tue Feb 20, 2018 4:09 pm

I attached the file.

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by svremeto » Tue Feb 20, 2018 4:15 pm

And now i see different content on those lines. Maybe i made a mistake with the file.

line 175: http://prntscr.com/ih7lto
line 350, 358, 362: http://prntscr.com/ih7mk2

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by straightlight » Tue Feb 20, 2018 6:11 pm

There was a fix on the forum for this but can't seem to find it now. In your category.php file,

find all instances of:

Code: Select all

{page}
replace all with:

Code: Select all

' . (int)$page . '
or:

Code: Select all

' . (int)$page
if you see a comma right after.

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 svremeto » Tue Feb 20, 2018 8:22 pm

I am facing the same problem.

This is the only place where i found {page}:
http://prntscr.com/ihaqa2

So i edit it from:

Code: Select all

$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');
to

Code: Select all

$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page= . (int)$page . ');
But still not working. Maybe i didnt edit the code right?

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by svremeto » Thu Feb 22, 2018 8:32 pm

straightlight wrote:
Tue Feb 20, 2018 6:11 pm
There was a fix on the forum for this but can't seem to find it now. In your category.php file,

find all instances of:

Code: Select all

{page}
replace all with:

Code: Select all

' . (int)$page . '
or:

Code: Select all

' . (int)$page
if you see a comma right after.
Is this the right replacement? http://prntscr.com/ii9hib

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by straightlight » Fri Feb 23, 2018 8:23 pm

Two possibilities were provided on my previous reply. Your screenshot only provides one of them. The second one would be the right 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

Post by svremeto » Sun Feb 25, 2018 2:30 am

straightlight wrote:
Fri Feb 23, 2018 8:23 pm
Two possibilities were provided on my previous reply. Your screenshot only provides one of them. The second one would be the right one.
I`ve tried also with

Code: Select all

$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page=(int)$page . ');

Code: Select all

$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page= (int)$page . ');

Code: Select all

$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page= . (int)$page ');

Code: Select all

$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page= . (int)$page . ');

Code: Select all

$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page= (int)$page . ');
But it's not working. I meant the maybe i don't write the code correctly. What do you think?

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by straightlight » Sun Feb 25, 2018 2:37 am

But it's not working.
Although, none of my solution above did indicated to code the page query like this:

Code: Select all

&page= . (int)$page . '
but rather:

Code: Select all

&page=' . (int)$page . '
or:

Code: Select all

&page=' . (int)$page
As said on the top reply, it would be the second possibility (the last code portion) in this case.

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 svremeto » Sun Feb 25, 2018 6:24 pm

straightlight wrote:
Sun Feb 25, 2018 2:37 am
But it's not working.
Although, none of my solution above did indicated to code the page query like this:

Code: Select all

&page= . (int)$page . '
but rather:

Code: Select all

&page=' . (int)$page . '
or:

Code: Select all

&page=' . (int)$page
As said on the top reply, it would be the second possibility (the last code portion) in this case.
Still not working... The codes caused troubles in the website page switching.

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm
Who is online

Users browsing this forum: No registered users and 22 guests