Post by Best_of_1980 » Tue Aug 13, 2019 6:04 am

Hello everyone.

From beginning the error was when trying to use PP Standard Payments.
On front you could only see,
#Paypal is busy right now so please try later, with no other information#
Put it in sandbox and it gave me this error.

Warning: unlink(/home/int10507/public_html/rrrrr/wwwwwwww/system/storage170720191253s/cache/cache.catalog.language.1514990162): No such file or directory in /home/int10507/public_html/rrrrr/wwwwwwww/system/library/cache/file.php on line 68

Search and found: (do not know if it is same error)
viewtopic.php?t=200896

Oc version 3.0.2.0 with Journal theme if it can help.
Refreshed modifications and cleared vqcache.

Updated with this for admin and catalog: https://github.com/opencart/opencart/co ... 990171168e

Now I get this error directly on front and same in error log.

PHP Notice: Undefined index: fi-fi in /home/int10507/public_html/rrrrr/wwwwwwww/system/storage170720191253s/modification/catalog/controller/startup/startup.php on line 114

If I google this last error I get links to at least 10 sites having same error on front so I think there could be someone that recognize it?
How do you resolve it?

Newbie

Posts

Joined
Tue Aug 13, 2019 5:32 am

Post by OSWorX » Tue Aug 13, 2019 7:18 am

PHP Notice: Undefined index: fi-fi
Seems to me related to a language like Finish?

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by straightlight » Tue Aug 13, 2019 8:31 am

Warning: unlink(/home/int10507/public_html/rrrrr/wwwwwwww/system/storage170720191253s/cache/cache.catalog.language.1514990162): No such file or directory in /home/int10507/public_html/rrrrr/wwwwwwww/system/library/cache/file.php on line 68
FAQ: viewtopic.php?f=176&p=758315#p750077 . However, since you are using OC v3.0.2.0 release, that would be correct. It used to be a bug but on more recent OC versions, this issue has been rectified including on the master branch from Github.

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
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

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

Post by letxobnav » Tue Aug 13, 2019 9:19 am

Code: Select all

PHP Notice: Undefined index: fi-fi in /home/int10507/public_html/rrrrr/wwwwwwww/system/storage170720191253s/modification/catalog/controller/startup/startup.php on line 114
that is not an error but a notice from code for your language detection in startup where an array element is referenced with index fi-fi which is not set/defined.
But since you have a modification there, nobody can know where line 114 is but you.

“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.


Active Member
Online

Posts

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

Post by Best_of_1980 » Tue Aug 13, 2019 6:37 pm

OSWorX wrote:
Tue Aug 13, 2019 7:18 am
PHP Notice: Undefined index: fi-fi
Seems to me related to a language like Finish?
Thanks for your replay!
Do not really know what you mean?

Before I did not have any error in my log or on pages
If I used Banktransfer or Dibs Easy checkout or Invoice I have success transfer and no errors.
All of them I use with custom translation (language files)

All started when I wanted to use Paypal Standard.
Founf the (fix) for language.php files and change them both. After that I got this last error in startup.php.

For me it looks like Paypal maybe not working with custom languages.
Could it be like that?

Newbie

Posts

Joined
Tue Aug 13, 2019 5:32 am

Post by Best_of_1980 » Tue Aug 13, 2019 6:50 pm

straightlight wrote:
Tue Aug 13, 2019 8:31 am
Warning: unlink(/home/int10507/public_html/rrrrr/wwwwwwww/system/storage170720191253s/cache/cache.catalog.language.1514990162): No such file or directory in /home/int10507/public_html/rrrrr/wwwwwwww/system/library/cache/file.php on line 68
FAQ: viewtopic.php?f=176&p=758315#p750077 . However, since you are using OC v3.0.2.0 release, that would be correct. It used to be a bug but on more recent OC versions, this issue has been rectified including on the master branch from Github.
Thanks for your replay!

Warning: unlink(/home/int10507/public_html/rrrrr/wwwwwwww/system/storage170720191253s/cache/cache.catalog.language.1514990162): No such file or directory in /home/int10507/public_html/rrrrr/wwwwwwww/system/library/cache/file.php on line 68

Do not have above error if I use my other payments with original files. All started for me with Paypal.

Newbie

Posts

Joined
Tue Aug 13, 2019 5:32 am

Post by Best_of_1980 » Tue Aug 13, 2019 7:09 pm

letxobnav wrote:
Tue Aug 13, 2019 9:19 am

Code: Select all

PHP Notice: Undefined index: fi-fi in /home/int10507/public_html/rrrrr/wwwwwwww/system/storage170720191253s/modification/catalog/controller/startup/startup.php on line 114
that is not an error but a notice from code for your language detection in startup where an array element is referenced with index fi-fi which is not set/defined.
But since you have a modification there, nobody can know where line 114 is but you.
Thanks for your replay!
Could it help if I send a file to you? Which file you mean?
I know it can be an extension but other payments are working with original files or not make any notice.

Newbie

Posts

Joined
Tue Aug 13, 2019 5:32 am

Post by letxobnav » Tue Aug 13, 2019 10:16 pm

well, you could post like 114 of file

/home/int10507/public_html/rrrrr/wwwwwwww/system/storage170720191253s/modification/catalog/controller/startup/startup.php

“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.


Active Member
Online

Posts

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

Post by Best_of_1980 » Wed Aug 14, 2019 12:25 am

letxobnav wrote:
Tue Aug 13, 2019 10:16 pm
well, you could post like 114 of file

/home/int10507/public_html/rrrrr/wwwwwwww/system/storage170720191253s/modification/catalog/controller/startup/startup.php
Thanks for your replay!
Here comes little from file:
107 // Overwrite the default language object
108 $language = new Language($code);
109 $language->load($code);
110
111 $this->registry->set('language', $language);
112
113 // Set the config language_id
114 $this->config->set('config_language_id', $languages[$code]['language_id']);
115
116 // Customer
117 $customer = new Cart\Customer($this->registry);
118 $this->registry->set('customer', $customer);

Newbie

Posts

Joined
Tue Aug 13, 2019 5:32 am

Post by letxobnav » Wed Aug 14, 2019 11:41 am

put these lines just above line 114:

Code: Select all

		$this->log->write('code: '.$code);
		$this->log->write('languages: '.print_r($languages,true));
and see what it says in the OC error log.

“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.


Active Member
Online

Posts

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

Post by Best_of_1980 » Wed Aug 14, 2019 10:10 pm

Thanks for your replay!
Do not know why it looks so strange when paste.
Needed to set (o) in code.

2019-08-14 7:38:10 - code: fi-fi
2019-08-14 7:38:10 - languages: Array
(
[fi-fi] => Array
(
[language_id] => 2
[name] => Suomi
[c(o)de] => fi-fi
[locale] => fi_FI.UTF-8,fi_FI,fi-FI,finnish
[image] => fi-fi.png
[directory] => finnish
[sort_order] => 1
[status] => 1

2019-08-14 7:40:07 - code: fi-fi
2019-08-14 7:40:07 - languages: Array
(
[fi-fi] => Array
(
[language_id] => 2
[name] => Suomi
[c(o)de] => fi-fi
[locale] => fi_FI.UTF-8,fi_FI,fi-FI,finnish
[image] => fi-fi.png
[directory] => finnish
[sort_order] => 1
[status] => 1
)

)

Newbie

Posts

Joined
Tue Aug 13, 2019 5:32 am

Post by Best_of_1980 » Sat Aug 17, 2019 10:35 pm

I found this fantastic thread from Straightlight in all my searches:
viewtopic.php?t=200601

A guy with same problem but with another payment.
And that works if I use "lowercase" for all text inputs fields at checkout.

Could it be that?
How do I make changes in: /catalog/controller/extension/payment/pp_standard.php
So it only send "lowercase"

Newbie

Posts

Joined
Tue Aug 13, 2019 5:32 am

Post by Best_of_1980 » Sun Aug 18, 2019 2:30 am

Will this help?
In ocmod log I see:

MOD: Paypal str to lower

FILE: catalog/controller/extension/payment/pp_standard.php
CODE: $this->session->data['order_id'] . ' - ' . html_entity_decode($order_info['payment_firstname'], ENT_QUOTES, 'UTF-8') . ' ' . html_entity_decode($order_info['payment_lastname'], ENT_QUOTES, 'UTF-8');
LINE: 84

Newbie

Posts

Joined
Tue Aug 13, 2019 5:32 am

Post by straightlight » Sun Aug 18, 2019 9:51 am

Not a bug since the strtolower enforcement relies on specific country and zone where other regions are not being affected by this change.

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
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

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

Post by letxobnav » Sun Aug 18, 2019 9:58 am

Do not know why it looks so strange when paste.
Needed to set (o) in code.
that is because the forum uses that tag to specify code display.
2019-08-14 7:38:10 - code: fi-fi
2019-08-14 7:38:10 - languages: Array
(
[fi-fi] => Array
(
[language_id] => 2
[name] => Suomi
[c(o)de] => fi-fi
[locale] => fi_FI.UTF-8,fi_FI,fi-FI,finnish
[image] => fi-fi.png
[directory] => finnish
[sort_order] => 1
[status] => 1

2019-08-14 7:40:07 - code: fi-fi
2019-08-14 7:40:07 - languages: Array
(
[fi-fi] => Array
(
[language_id] => 2
[name] => Suomi
[c(o)de] => fi-fi
[locale] => fi_FI.UTF-8,fi_FI,fi-FI,finnish
[image] => fi-fi.png
[directory] => finnish
[sort_order] => 1
[status] => 1
)

)
did the log still issue the notice when it displayed the above info?

Code: Select all

$this->config->set('config_language_id', $languages[$code]['language_id']);
basically sets your language_id in config to the one referenced in $language[$code]['language_id']
the code is set to fi-fi and that would make the $language[$code]['language_id'] produce "2" in your case.
the notice simply states that there is no $language['fi-fi']['language_id'] which in the above output is wrong as it is clearly there.

upper or lower case has no bearing on this.

therefore my question:
did the log still issue the notice when it displayed the above info?
or does it issue that notice sometimes?

“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.


Active Member
Online

Posts

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

Post by letxobnav » Sun Aug 18, 2019 12:26 pm

if the answers to the questions above is, no it did not log the notice and yes, it only happens sometimes then:

you can change this line in startup.php

Code: Select all

		// Set the config language_id
		$this->config->set('config_language_id', $languages[$code]['language_id']);	


into

Code: Select all

		if (isset($languages[$code]['language_id'])) {
			$this->config->set('config_language_id', $languages[$code]['language_id']);	
		} else {
			$this->log->write('Startup notice: Cannot set config language id');
			$this->log->write('Startup notice: Variable $languages['.$code.'][language_id] is not set');
			$this->log->write('Startup notice: Request GET: '.print_r($this->request->get,true));
			$this->log->write('Startup notice: Defined languages: '.print_r($languages,true));
		}

It will check if the code exists in the $languages array before assigning its language id to the config thus removing the notice if it is not defined.
If it is not set, it will insert the above notices in the OC log with the language code not found, the get variables of the request and your defined languages.

So if it it happens again, you can see when and why, in the log, not on the screen (turn display errors of anyway).

“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.


Active Member
Online

Posts

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

Post by Best_of_1980 » Mon Aug 19, 2019 5:55 am

straightlight wrote:
Sun Aug 18, 2019 9:51 am
Not a bug since the strtolower enforcement relies on specific country and zone where other regions are not being affected by this change.
Thanks for your replay!
It is a bug.
I just paid xxxusd to get it fixed and it is in Paypal files he did change.
Now it is working.

Take care!

Newbie

Posts

Joined
Tue Aug 13, 2019 5:32 am
Who is online

Users browsing this forum: No registered users and 8 guests