Undefined index error in error log
Hi there, I am getting the following errors on my opencart 2.3.0.2 with default theme:
2019-11-28 9:28:43 — PHP Notice: Undefined index: order_id in /home//mywebsite/public_html/system/storage/modification/catalog/controller/account/return.php on line 564
2019-11-28 9:28:43 — PHP Notice: Undefined index: firstname in /home//mywebsite/public_html/system/storage/modification/catalog/controller/account/return.php on line 568
2019-11-28 9:28:43 — PHP Notice: Undefined index: lastname in /home//mywebsite/public_html/system/storage/modification/catalog/controller/account/return.php on line 572
2019-11-28 9:28:43 — PHP Notice: Undefined index: email in /home//mywebsite/public_html/system/storage/modification/catalog/controller/account/return.php on line 576
2019-11-28 9:28:43 — PHP Notice: Undefined index: email in /home//mywebsite/public_html/system/storage/modification/catalog/controller/account/return.php on line 576
2019-11-28 9:28:43 — PHP Notice: Undefined index: telephone in /home//mywebsite/public_html/system/storage/modification/catalog/controller/account/return.php on line 580
2019-11-28 9:28:43 — PHP Notice: Undefined index: product in /home//mywebsite/public_html/system/storage/modification/catalog/controller/account/return.php on line 584
2019-11-28 9:28:43 — PHP Notice: Undefined index: model in /home//mywebsite/public_html/system/storage/modification/catalog/controller/account/return.php on line 588
2019-11-28 9:28:43 — PHP Notice: Undefined index: g-recaptcha-response in /home//mywebsite/public_html/catalog/controller/extension/captcha/google_captcha.php on line 27
Can anyone point me to a solution? I think the google captcha error is a different issue.
Thanks a lot.
Re: Undefined index error in error log
Post
by OSWorX » Thu Nov 28, 2019 5:20 pm
Jansuh wrote: ↑
Thu Nov 28, 2019 4:54 pm
../system/storage/modification/catalog/controller/account/return.php on line 564
It seems that you have installed an extension which modifies that controller.
Disable this extension, refresh the modification cache and check if errors are gone.
If not, come back and tell us what you have installed extra.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Joined
Mon Jan 11, 2010 10:52 pm
Re: Undefined index error in error log
Post
by Jansuh » Thu Nov 28, 2019 5:48 pm
I have a lot of extensions installed, will try and figure out wich one modifies return.php am afraid that i won’t be able to find it.
Re: Undefined index error in error log
Post
by OSWorX » Thu Nov 28, 2019 10:23 pm
Jansuh wrote: ↑
Thu Nov 28, 2019 5:48 pm
I have a lot of extensions installed, will try and figure out wich one modifies return.php am afraid that i won’t be able to find it.
But as the shopowner or being responsible for the shop, you should know what you are doing — or not?
So, having many extensions installed is one, but what for do you have them installed .. ?
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Joined
Mon Jan 11, 2010 10:52 pm
Re: Undefined index error in error log
Post
by Jansuh » Fri Nov 29, 2019 7:07 pm
I don’t claim to be an expert on opencart but i am not unexperienceed either. I am sure all of the extensions that are installed serve a purpose. Wether that is SEO, Payment, Shipping it’s all important to have a better site then my competitors.
I am just currently trying to clean up my error logfile.
I also have these errors that seem related but don’t come from an extension since it is not in system/storage/modification
2019-11-29 11:51:15 — PHP Notice: Undefined index: email in xxx/public_html/catalog/controller/account/login.php on line 187
2019-11-29 11:51:15 — PHP Notice: Undefined index: email in xxx/public_html/catalog/controller/account/login.php on line 194
2019-11-29 11:51:15 — PHP Notice: Undefined index: email in xxx/public_html/catalog/controller/account/login.php on line 201
2019-11-29 11:51:15 — PHP Notice: Undefined index: password in xxx/public_html/catalog/controller/account/login.php on line 201
2019-11-29 11:51:15 — PHP Notice: Undefined index: email inxxx /public_html/catalog/controller/account/login.php on line 204
Re: Undefined index error in error log
Post
by OSWorX » Fri Nov 29, 2019 7:50 pm
Jansuh wrote: ↑
Fri Nov 29, 2019 7:07 pm
I don’t claim to be an expert on opencart but i am not unexperienceed either. I am sure all of the extensions that are installed serve a purpose. Wether that is SEO, Payment, Shipping it’s all important to have a better site then my competitors.I am just currently trying to clean up my error logfile.
I also have these errors that seem related but don’t come from an extension since it is not in system/storage/modification
2019-11-29 11:51:15 — PHP Notice: Undefined index: email in xxx/public_html/catalog/controller/account/login.php on line 187
2019-11-29 11:51:15 — PHP Notice: Undefined index: email in xxx/public_html/catalog/controller/account/login.php on line 194
2019-11-29 11:51:15 — PHP Notice: Undefined index: email in xxx/public_html/catalog/controller/account/login.php on line 201
2019-11-29 11:51:15 — PHP Notice: Undefined index: password in xxx/public_html/catalog/controller/account/login.php on line 201
2019-11-29 11:51:15 — PHP Notice: Undefined index: email inxxx /public_html/catalog/controller/account/login.php on line 204
Expert or not, you have the responsibility to have a secure Webshop!
Secure means not having countless functions, extensions and so on.
Sure, almost everybody wants to be better than the competitors — not really new.
Secure means also, to know what you are doing, know what is installed, know what the extension is doing ..
Nevertheless, the last post shows a different message, has nothing to do with your first post.
And with an unmodified OpenCart installtion, this error (notice) never would be happen.
As it seems, someone has modified directly the controller.
Compare the exisisting file with an untouched original.
So, either open up a new posting, or hire a trusted and experienced OpenCart Developer: viewforum.php?f=88
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Joined
Mon Jan 11, 2010 10:52 pm
Re: Undefined index error in error log
Post
by Jansuh » Fri Nov 29, 2019 8:48 pm
Was hoping on some help in stead of a lecture on how to run my business. Will compare the file against an original and try to firgure out what is wrong myself.
Re: Undefined index error in error log
Post
by OSWorX » Fri Nov 29, 2019 9:28 pm
Jansuh wrote: ↑
Fri Nov 29, 2019 8:48 pm
Was hoping on some help in stead of a lecture on how to run my business. Will compare the file against an original and try to firgure out what is wrong myself.
A good start.
What do you expect from us?
Doing your job?
With nothing?
And knowing what is going on, having a secure website — is no business, that are «basics».
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Joined
Mon Jan 11, 2010 10:52 pm
Re: Undefined index error in error log
Post
by Jansuh » Fri Nov 29, 2019 9:38 pm
I don’t expect anything but some help. «Can anyone point me to a solution?» was my question.
Most of the times errors are not unique and solved quickly. If i haven’t given enough information just let me know.
I really can’t do anything with reading between the lines how stupid i (apparently) am. I am doing the best i can with the knowledge that i have and google and this forum.
Have a nice weekend
Re: Undefined index error in error log
Post
by IP_CAM » Sat Nov 30, 2019 4:26 am
— in /home//mywebsite/ —
would not work, if you really have a double forward slash in such a line.
But if you publish handmade Paths here, it’s hard to guess, if you have such in
your Code, or then only published it here the wrong way.
As easier one makes it for others, the better the chance, to succeed.
Ernie
My Github OC Site: https://github.com/IP-CAM
5’000 + FREE OC Extensions, on the World’s largest Github OC Repository Archive Site.
Re: Undefined index error in error log
Post
by ADD Creative » Sat Nov 30, 2019 4:38 am
All the errors are in form validation. Most likely caused by a bot doing a POST without any fields. Looking in your web access logs at the time of the errors may confirm this.
www.add-creative.co.uk
Re: Undefined index error in error log
Joined
Tue Jul 17, 2012 10:35 pm
Re: Undefined index error in error log
Post
by Jansuh » Sat Nov 30, 2019 7:24 pm
xxvirusxx wrote: ↑
Sat Nov 30, 2019 6:18 pm
Go to Extensions->Modifcations, Log tab then press CTR+F, and search return.phpOr Files tab..
That is great help, was able to find the extension that modifies return.php. Thank you so much
Who is online
Users browsing this forum: No registered users and 27 guests
Важная информация
На нашем сайте используются файлы cookie и происходит обработка некоторых персональных данных пользователей, чтобы улучшить пользовательский интерфейс. Чтобы узнать для чего и какие персональные данные мы обрабатываем перейдите по ссылке. Если Вы нажмете «Я даю согласие», это означает, что Вы понимаете и принимаете все условия, указанные в этом Уведомлении о Конфиденциальности.
-
Всем доброго дня,
при установке русского языка на англоязычный шаблон появляется ошибка «Notice: Undefined index: ru-ru»
и ссылка на строку : $data[‘title’] = $setting[‘title’][$lang_code][‘title’];кусок кода:
$lang_code = $this->session->data[‘language’];if(isset($setting[‘title’]) && $setting[‘title’]) {
$data[‘title’] = $setting[‘title’][$lang_code][‘title’];
} else {
$data[‘title’] = $this->language->get(‘heading_title’);
}ставил на рус. версию Opencart — все то же, добавлял другие языки — ошибка повторяется,
добавлял в cataloglanguageru-ruextensionmodule недостающие файлы — ошибка повторяется.
Подскажите, где искать?
с php не знаком, html — более-менее -
Зайдите в модуль и пропишите данные для русского языка
-
не совсем понял, куда?
в админке русский прописан, в русской версии сайта часть текста русифицировалась ( что осталось на англ. — думаю можно руками исправить),
чуть подробнее пожалуйста -
Это ошибка модуля, шаблона
$data[‘title’] = $setting[‘title’][$lang_code][‘title’];
Ищите в настройках шаблона, модулей
-
В общем так — еще пробовал переустановить по всякому — без изменений.
при установке рус. версию Opencart — ошибка, при установке на англ. версию в языках доступно только en-gb и fr,
если, например, на fr скопировать папку из ru-ru (это из варианта с русификацией), то все как бы ОК, ошибок нет, все, что должно было перевестись на русский — перевелось,
но это же не правильно, в языках осталось en-gb и fr, как бы я их не называл, админка на англ. (что в принципе не большая проблема), добавить другие языки (больше 2-х) никак? где косяк?
-
Косяк в том что вы должны скопировать папки ru-ru из из локализации
И установить язык в систему. Изучайте систему. -
Все, разобрался
в админке: Расширения > Модули-расширения > Модули — для модулей прописать недостающие заголовки,
после добавления нового языка там просто добавляются пустые поля, которые надо заполнить.Например:Notice: Undefined index: ru-ru in …catalogcontrollerextensionmoduleocblog.php on line 20 —
Расширения > Модули-расширения > Модули > OC Blog > Blog — добавляем недостающий русский Title.может для кого-то это элементарно просто, я не сразу дошел
-
какой то бред написал ты. парень первоначально сказал что все это сделал! читай внимательней
-
Молочага этот вопрос поднимался не однократно и так называемые специалисты такой бред несли типа (Косяк в том что вы должны скопировать папки ru-ru из из локализации
И установить язык в систему. Изучайте систему.)
а ты допер как и что! -
karpov
Продвинутый пользователь- Сообщения:
- 1.459
- Симпатии:
- 236
ну ну
написали, просто нужно читать внимательно
-
Бред пишешь ты, потому что ТС получил пинка в нужную сторону с другого сайта, от молодчаги под этим же ником.
I am using OpenCart 1.4.9 and I have been dealing with Undefined index Errors in product.php recently, I suspect it happens every time the user is creating/input a new product on the dashboard.
How to fix these errors because it makes the server resource overload, my site resource usage peaked at 91% sometimes 100% on the cPanel?
Here is the model file.
Here is the controller file.
Here are the errors I am getting:
PHP Notice: Undefined index: model in /home/xxx/public_html/admin/controller/catalog/product.php on line 651
PHP Notice: Undefined index: sku in /home/xxx/public_html/admin/controller/catalog/product.php on line 659
PHP Notice: Undefined index: location in /home/xxx/public_html/admin/controller/catalog/product.php on line 667
PHP Notice: Undefined index: keyword in /home/xxx/public_html/admin/controller/catalog/product.php on line 687
PHP Notice: Undefined index: image in /home/xxx/public_html/admin/controller/catalog/product.php on line 703
PHP Notice: Undefined index: image in /home/xxx/public_html/admin/controller/catalog/product.php on line 710
PHP Notice: Undefined index: manufacturer_id in /home/xxx/public_html/admin/controller/catalog/product.php on line 723
PHP Notice: Undefined index: shipping in /home/xxx/public_html/admin/controller/catalog/product.php on line 731
PHP Notice: Undefined index: date_available in /home/xxx/public_html/admin/controller/catalog/product.php on line 739
PHP Notice: Undefined index: quantity in /home/xxx/public_html/admin/controller/catalog/product.php on line 747
PHP Notice: Undefined index: minimum in /home/xxx/public_html/admin/controller/catalog/product.php on line 755
PHP Notice: Undefined index: subtract in /home/xxx/public_html/admin/controller/catalog/product.php on line 763
PHP Notice: Undefined index: sort_order in /home/xxx/public_html/admin/controller/catalog/product.php on line 771
PHP Notice: Undefined index: stock_status_id in /home/xxx/public_html/admin/controller/catalog/product.php on line 783
PHP Notice: Undefined index: price in /home/xxx/public_html/admin/controller/catalog/product.php on line 791
PHP Notice: Undefined index: cost in /home/xxx/public_html/admin/controller/catalog/product.php on line 799
PHP Notice: Undefined index: status in /home/xxx/public_html/admin/controller/catalog/product.php on line 807
PHP Notice: Undefined index: tax_class_id in /home/xxx/public_html/admin/controller/catalog/product.php on line 819
PHP Notice: Undefined index: weight in /home/xxx/public_html/admin/controller/catalog/product.php on line 827
PHP Notice: Undefined index: weight_class_id in /home/xxx/public_html/admin/controller/catalog/product.php on line 841
PHP Notice: Undefined index: length in /home/xxx/public_html/admin/controller/catalog/product.php on line 851
PHP Notice: Undefined index: width in /home/xxx/public_html/admin/controller/catalog/product.php on line 859
PHP Notice: Undefined index: height in /home/xxx/public_html/admin/controller/catalog/product.php on line 867
PHP Notice: Undefined index: length_class_id in /home/xxx/public_html/admin/controller/catalog/product.php on line 881
double-beep
4,97617 gold badges32 silver badges41 bronze badges
asked Feb 3, 2014 at 2:56
The following are some possibilities:
-
The fields (listed in your errors) don’t exist in your database.
-
There might be some problem with your product_form.tpl template file.
-
Check whether the values are getting inserted correctly to the product tables while adding a product.
Comparing the admin product files with a fresh unedited OpenCart 1.4.9 admin product files will help you to find out the issue.
double-beep
4,97617 gold badges32 silver badges41 bronze badges
answered Feb 3, 2014 at 5:36
These simply occur when $product_info['variable mentioned in error is not specified']
, a simple, and complete fix is to edit the query like below:
elseif (isset($product_info)) {
$this->data['location'] = $product_info['location'];
}
Into:
elseif (isset($product_info['location'])) {
$this->data['location'] = $product_info['location'];
}
And do so for each of the cases, furthermore you can do this for all $product_info[]
data to avoid future errors like that.
double-beep
4,97617 gold badges32 silver badges41 bronze badges
answered Feb 4, 2014 at 21:54
Jonid BendoJonid Bendo
8502 gold badges9 silver badges16 bronze badges
In case of when just some of the indexes undefined, the reason for it may be very simple: if the properties are not set in the admin panel (like in my case for Length, Weight and in stock).
double-beep
4,97617 gold badges32 silver badges41 bronze badges
answered May 6, 2018 at 5:08
I have two sites on Opencart 3.0.3.1
Installed this extension on both sites. That doesn’t add tracking numbers to order.
I have this errors in logs:
First site:
2019-08-15 18:12:58 — PHP Notice: Undefined index: tracking_number in /oc3_storage/modification/admin/controller/sale/order.php on line 1544
2019-08-15 18:12:58 — PHP Notice: Undefined index: name in /oc3_storage/modification/admin/controller/sale/order.php on line 1555
2019-08-15 18:12:58 — PHP Notice: Undefined index: web_url in /oc3_storage/modification/admin/controller/sale/order.php on line 1558
Second:
2019-08-15 18:46:19 — PHP Notice: Undefined index: courier_slug in /oc3_storage_b/modification/catalog/controller/api/order.php on line 802
2019-08-15 18:46:19 — PHP Notice: Undefined index: tracking_number in /oc3_storage_b/modification/catalog/controller/api/order.php on line 802