Post by mnmitov » Sun Sep 27, 2020 5:28 pm

Hi everybody.

I have issues with checkout, which is working fine, but sometimes it returns me the following errors in the OC error log:
2020-09-27 8:55:03 - PHP Notice: Undefined index: country_id in /home/digiboar/storage/modification/catalog/controller/startup/startup.php on line 168
2020-09-27 8:55:03 - PHP Notice: Undefined index: zone_id in /home/digiboar/storage/modification/catalog/controller/startup/startup.php on line 168
2020-09-27 8:55:04 - PHP Notice: Undefined index: country_id in /home/digiboar/storage/modification/catalog/controller/startup/startup.php on line 168
2020-09-27 8:55:04 - PHP Notice: Undefined index: zone_id in /home/digiboar/storage/modification/catalog/controller/startup/startup.php on line 168
2020-09-27 8:55:17 - PHP Notice: Undefined index: country_id in /home/digiboar/storage/modification/catalog/controller/startup/startup.php on line 168
2020-09-27 8:55:17 - PHP Notice: Undefined index: zone_id in /home/digiboar/storage/modification/catalog/controller/startup/startup.php on line 168
2020-09-27 8:55:17 - PHP Notice: Undefined index: country_id in /home/digiboar/storage/modification/catalog/controller/startup/startup.php on line 168
2020-09-27 8:55:17 - PHP Notice: Undefined index: zone_id in /home/digiboar/storage/modification/catalog/controller/startup/startup.php on line 168
Soon I tried to remove all countries which I don't need from DB.
Later I got another problems and then I get all countries back.

How can I solve this?
In the checkout I'm using only three plugins - shipping extension, social login plugin and hide checkout steps.

But the problem shows up when I log with google login or facebook.

I attach four screens.

Attachments

screen3.png

screen3.png (113.39 KiB) Viewed 502 times

screen2.png

screen2.png (117.3 KiB) Viewed 502 times

screen1.png

screen1.png (122.29 KiB) Viewed 502 times


Newbie

Posts

Joined
Sat Jul 18, 2020 4:03 am

Post by letxobnav » Sun Sep 27, 2020 6:56 pm

php version?

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
Expert Member

Posts

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

Post by straightlight » Sun Sep 27, 2020 10:08 pm


The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member
Online

Posts

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

Post by mnmitov » Mon Sep 28, 2020 1:20 am

I saw this post, I saw the github about compatibility for country / zone - catalog/controller/startup/startup.php file. But mu PHP version is 7.2.

Do you think it's going to help?

What's the reason this OC message is showing me up?

Newbie

Posts

Joined
Sat Jul 18, 2020 4:03 am

Post by straightlight » Mon Sep 28, 2020 1:37 am

mnmitov wrote:
Mon Sep 28, 2020 1:20 am
I saw this post, I saw the github about compatibility for country / zone - catalog/controller/startup/startup.php file. But mu PHP version is 7.2.

Do you think it's going to help?

What's the reason this OC message is showing me up?
The reason why these errors are showing are due to the fact that the country_id and zone_id are child keys to a super global variable where more recent versions of PHP requires these validations to be made as well prior of their use. The best would be to upgrade your PHP version below 7.4 and above or equal PHP v7.3.1 as per the master branch's recent requirements.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member
Online

Posts

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

Post by mnmitov » Mon Sep 28, 2020 1:58 am

So, my version now is 7.2, my hosting allows me to change it to 7.3.

And if I change it, should I make any changes on OC itself?

Newbie

Posts

Joined
Sat Jul 18, 2020 4:03 am

Post by IP_CAM » Mon Sep 28, 2020 2:46 am

Ask your Hoster, if they allow you to use something like this:

Code: Select all

# AddHandler application/x-httpd-php72 .php
AddHandler application/x-httpd-php73 .php
# AddHandler application/x-httpd-php74 .php
It enables Tester, to change the PHP Sub-Version efficiently, by
adding those lines above on the very top of an .htaccess File,
and then 'enable' the one to be used.
Ernie

Please don't send me OC Forum Personal Messages, just contact: jti@jacob.ch
---
OC 1.5.6.5 LIGHT Test Site: http://www.bigmax.ch/shop/
OC 1.5.6.5 V-PRO Test Site: http://www.openshop.li/shop/
My Github OC Site: https://github.com/IP-CAM
2'600+ FREE OC Extensions on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by letxobnav » Mon Sep 28, 2020 8:52 am

If you are on 7.2 (better double check) then you should not have this issue.

Probably some bug where the $this->session->data['shipping_address'] is set (or not unset) without a country and zone entry.
That fix for 7.4 actually also fixes that for any other version (not the possible bug but the notices) as it does the more thorough/better check.

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
Expert Member

Posts

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

Users browsing this forum: No registered users and 27 guests