Error undefined opencart

Solution for "error undefined" message in V2.2.0.0

Solution for «error undefined» message in V2.2.0.0


The ever so annoying «error undefined» message is really stating that you are attempting to do a cross-domain operation. All this really means is that you must force OpenCart to use either HTTP or HTTPS but not both. The real message should probably be «Cross-Origin Request Blocked»

If your browsers URL is HTTP the add to cart operation is HTTPS you will get this message and the reverse is true also.

This is a job for your .htaccess file and setting all your operations in OpenCart to the same protocol. You will need to do some coding changes to accomplish this task.

This will solve your issue. You will need to make some code changes

Fix: Force Admin to SSL — 20160306 — daniGo — v1.0.0

Fix: Force URL’s in store to be terminated properly with a trailing slash or any store without trailing slash will default to main store. Force HTTPS protocol to HTTPS if SSL is selected in store settings — v1.0.3

These as well as other fixes can be found here

Last edited by Randem on Mon Apr 04, 2016 7:15 am, edited 2 times in total.


NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
«Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?»
DO NOT EVER GIVE SOMEONE YOU DON»T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar


Re: Solution for «error undefined» message in V2.2.0.0


Post

by Randem » Sat Apr 02, 2016 4:13 pm

Sample .htaccess file to redirect to HTTPS

Code: Select all


Options +FollowSymlinks

# Prevent Directoy listing 
Options -Indexes

# Prevent Direct Access to files
<FilesMatch ".(tpl|ini|log)">
 Order deny,allow
 Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
#RewriteCond %{HTTPS} on
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

#SSL Port
RewriteCond %{SERVER_PORT} !=443

# Remove www. from any domain query
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1%{REQUEST_URI} [R=301,L]

# All broswer request get redirected to HTTPS
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ 

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]


NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
«Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?»
DO NOT EVER GIVE SOMEONE YOU DON»T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar


Re: Solution for «error undefined» message in V2.2.0.0


Post

by Randem » Sun Apr 03, 2016 4:29 am

This also means you can’t use a combination of different domain entries such as

https://www.yourdomain.com
https://yourdomain.com
http://www.yourdomain.com
http://yourdomain.com

A mix of these names will cause the error also. Every reference to your OpenCart site must be exactly the same. The names are not interchangeable. You can handle this in your .httaccess file by forcing one or the other but you also need to change the references in your store setting, orders etc… to match.


NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
«Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?»
DO NOT EVER GIVE SOMEONE YOU DON»T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar


Re: Solution for «error undefined» message in V2.2.0.0


Post

by Randem » Mon Apr 04, 2016 7:09 am

BTW: If you have orders from another store URL in the order table because you are transferring the data to a new domain you will need to change the URLs in the orders or you will get this error again if you attempt to edit them (Not a good idea anyway).


NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
«Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?»
DO NOT EVER GIVE SOMEONE YOU DON»T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar


Re: Solution for «error undefined» message in V2.2.0.0


Post

by makdykstra » Fri Apr 22, 2016 11:07 am

Randem … this is the first thread I’ve seen on this issue!! THANK YOU!! For a novice Opencart user like myself, could you explain in more detail what I should do?? If you don’t mind breaking it down as simply as you could. My cart was working perfectly and now all of the sudden the undefined error message is displaying and customers can’t add to their carts.

Thanks so much!! I’m at: www.mindyourmannersmonsters.org

Re: Solution for «error undefined» message in V2.2.0.0


Post

by inertia » Tue Apr 26, 2016 11:25 pm

I am using OC 2.1.0.1 and since I have just started to use SSL (a requirement for Amazon’s payment system) I an getting the Error Undefined and also I cannot edit any orders.

Will your suggestions fix both of my problems?

on a side note, I am not a programmer so excuse any stupid questions.

So, If I change my .htaccess file so that all of my pages are HTTPS will solve my 2 issues?

Re: Solution for «error undefined» message in V2.2.0.0


Post

by Randem » Wed Apr 27, 2016 2:23 am

No… you will need to the instructions and apply the fixes follow. You will need to learn how things work or you will need to get someone to apply them for you.

No Magic bullets…


NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
«Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?»
DO NOT EVER GIVE SOMEONE YOU DON»T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar


Re: Solution for «error undefined» message in V2.2.0.0


Post

by Kudzai » Thu Apr 28, 2016 7:01 am

I keep getting the «error undefined» message when I try to add something to the cart. I am using the default theme on an http server (not https) How can I fix that?

Re: Solution for «error undefined» message in V2.2.0.0


Post

by integris » Fri Jun 24, 2016 12:30 am

This will solve your issue. You will need to make some code changes
Fix: Force URL’s in store to be terminated properly with a trailing slash or any store without trailing slash will default to main store. Force HTTPS protocol to HTTPS if SSL is selected in store settings — v1.0.3

These as well as other fixes can be found here

I wanted my site to be https/www for all pages. Installing the v2.2.changes.zip up above didn’t do it. I compiled all the steps into one answer on this stackexchange question:

http://stackoverflow.com/questions/3627 … 3#37996993

Re: Solution for «error undefined» message in V2.2.0.0


Post

by recseiuq » Tue Jun 28, 2016 4:28 pm

Hi Randem, could I ask a couple of questions?

1. I am running 2.2.0.0 with your 2.2.0.x fixes and I am getting the «Error Unknown» issue when trying to install the Acute Category Manager extension. My site is fully SSL as far as I can tell, so it doesn’t seem like it’s the result of mixing HTTP & HTTPS. I have left a comment on the extension’s homepage but have not had any response from the developer so far. Do you know any way to find out more about what’s causing the error? I’ve checked my webserver (NGINX) and PHP5-fpm logs but there’s no sign of what’s causing this.

2. Do you not recommend people use 2.2.0.0, even with your abovementioned fixes? Is there a discussion of the issues with that version somewhere?

Thanks in advance. And thanks for your excellent work.

Re: Solution for «error undefined» message in V2.2.0.0


Post

by Randem » Tue Jun 28, 2016 5:15 pm

Hi recseiuq,

Thank you and you are welcome!

1. If you only get this error when you attempt to install the Acute Category Manager package, it would seem that the package is attempting to do something strange or at least in a manner not working with version 2.2.0.0. Since the package is using OCMOD; I cannot help you with that part (not Verses in OCMOD Procedures); If it were VQMOD I could help you track it down better with VQMOD Manager. What is in the OCMOD log?

Have you attempted to install it in a clean OpenCart system with no MODS? Without SSL?

2. I would recommend using OpenCart Version 2.1.0.x for it is more stable with the fixes.


NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
«Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?»
DO NOT EVER GIVE SOMEONE YOU DON»T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar


Re: Solution for «error undefined» message in V2.2.0.0


Post

by straightlight » Tue Jun 28, 2016 7:42 pm

Take note that the errors can also be tracked from the admin — > systems — > tools — > error log page despite whether it comes from VQMod or OCMod.


Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester




Joined

Mon Nov 14, 2011 11:38 pm

Location —
Canada, ON

Re: Solution for «error undefined» message in V2.2.0.0


Post

by EvolveWebHosting » Wed Jun 29, 2016 1:38 am

A client of mine had this happen.

They had www included in the URLs within the config files so I added a 301 redirect in the .htaccess file to force every page to load with www in the URL and the issue was resolved.


Image
Opencart hosting w/ DirectAdmin — free transfers
$15.99 .com Domain Renewal (includes Whois privacy protection and Premium Anycast DNS)


User avatar



Joined

Fri Mar 27, 2015 11:13 pm

Who is online

Users browsing this forum: No registered users and 5 guests

  1. Здравствуйте! Такая беда:
    При редактировании или просмотре заказа выскакивает окно «error undefined’: (скрин прилагаю).
    Русская сборка OpenCart Version 2.1.0.2 (rs.1)
    Системные файлы не изменялись.
    В логе ошибок в админке хостинга обнаружилось следующее:

    [Fri Mar 03 16:11:17 2017] [error] [client x.x.x.46] PHP Fatal error:  Cannot redeclare class ModelSettingSetting in /var/www/............/admin/model/setting/setting.php on line 0, referer: https://site.ru/admin/index.php?route=extension/module&token=mP4G1y43Q6mIct1F9ZvJXr4GahkhLkZa
    [Fri Mar 03 16:11:39 2017] [error] [client x.x.x.46] PHP Fatal error:  Cannot redeclare class ModelSettingSetting in /var/www/............/admin/model/setting/setting.php on line 0, referer: https://site.ru/admin/index.php?route=extension/modification&token=mP4G1y43Q6mIct1F9ZvJXr4GahkhLkZa
    [Fri Mar 03 16:13:04 2017] [error] [client x.x.x.46] PHP Fatal error:  Cannot redeclare class ModelSettingSetting in /var/www/............/admin/model/setting/setting.php on line 0, referer: https://site.ru/admin/index.php?route=extension/modification&token=mP4G1y43Q6mIct1F9ZvJXr4GahkhLkZa&page=2
    [Fri Mar 03 16:14:02 2017] [error] [client x.x.x.46] PHP Fatal error:  Cannot redeclare class ModelSettingSetting in /var/www/............/admin/model/setting/setting.php on line 0, referer: https://site.ru/admin/index.php?route=extension/modification&token=mP4G1y43Q6mIct1F9ZvJXr4GahkhLkZa
    [Fri Mar 03 16:21:53 2017] [error] [client x.x.x.46] PHP Fatal error:  Cannot redeclare class ModelSettingSetting in /var/www/............/admin/model/setting/setting.php on line 0, referer: https://site.ru/admin/index.php?route=extension/modification&token=mP4G1y43Q6mIct1F9ZvJXr4GahkhLkZa&page=2
    [Fri Mar 03 16:29:43 2017] [error] [client x.x.x.46] PHP Fatal error:  Cannot redeclare class ModelSettingSetting in /var/www/............/admin/model/setting/setting.php on line 0, referer: https://site.ru/admin/index.php?route=sale/order/edit&token=mP4G1y43Q6mIct1F9ZvJXr4GahkhLkZa&order_id=62
    [Fri Mar 03 16:44:58 2017] [error] [client x.x.x.46] PHP Fatal error:  Cannot redeclare class ModelSettingSetting in /var/www/............/admin/model/setting/setting.php on line 0, referer: https://site.ru/admin/index.php?route=extension/modification&token=mP4G1y43Q6mIct1F9ZvJXr4GahkhLkZa
    [Fri Mar 03 16:50:47 2017] [error] [client x.x.x.46] PHP Fatal error:  Cannot redeclare class ModelSettingSetting in /var/www/............/admin/model/setting/setting.php on line 0, referer: https://site.ru/admin/index.php?route=extension/modification&token=mP4G1y43Q6mIct1F9ZvJXr4GahkhLkZa
    [Fri Mar 03 16:55:00 2017] [error] [client x.x.x.46] PHP Fatal error:  Call to a member function getTotalCustomerRewardsByOrderId() on a non-object in /var/www/............/system/storage/modification/admin/controller/sale/order.php on line 1516, referer: https://site.ru/admin/index.php?route=sale/order/info&token=mP4G1y43Q6mIct1F9ZvJXr4GahkhLkZa&order_id=59&filter_order_status=3,5
    [Fri Mar 03 16:56:27 2017] [error] [client x.x.x.46] PHP Fatal error:  Call to a member function getTotalCustomerRewardsByOrderId() on a non-object in /var/www/............/system/storage/modification/admin/controller/sale/order.php on line 1516, referer: https://site.ru/admin/index.php?route=sale/order/info&token=mP4G1y43Q6mIct1F9ZvJXr4GahkhLkZa&order_id=62&filter_order_status=2,1,12

    Возможно, именно эти ошибки напрямую не связаны с данной проблемой, но кто знает… Также, хоть и не уверена, но я подозреваю, что проблема возникла после перехода на https, хотя и не факт.

    Нда… а в консоли написано это:
    Заблокирована загрузка смешанного активного содержимого «http://site.ru/index.php?route=api/login»

    Кто-то из знатоков сможет помочь мне в решении проблемы? Буду признательна! Помогите, пожалуйста.

    Вложения:

    • 2017-03-03-(1).png


  2. Bkmz

    Bkmz
    Продвинутый пользователь

    Сообщения:
    440
    Симпатии:
    106

    эта беда разбиралась множество раз — и на форуме есть ответы... воспользуйтесь поиском..

  3. Конечно же, я делала запрос через поиск. Не найдя ответа, написала сюда. Помогите, пожалуйста. Или, если можно, дайте ссылку.

  4. Проблема решилась следующими манипуляциями:

    admin/controller/sale/order.php

    $data['store_url'] = $order_info['store_url'];

    заменила на

    $data['store_url'] = substr($order_info['store_url'], 1 + strpos($order_info['store_url'], ":"));

    Удалось зайти в «просмотр» заказа, но редактировать опять не получилось.
    Теперь появилась ошибка, указывающая на некий конфликт, связанный с модулем «Оповещение по SMS © opencart-russia.ru»

    SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    OK
    <b>Warning</b>: in_array() expects parameter 2 to be array, null given in <b>/var/www/.........../catalog/controller/module/sms_alert.php</b> on line <b>10</b>{"success":"u0417u0430u043au0430u0437 u043eu0431u043du043eu0432u043bu0435u043d"}

    Отключила модуль. Все равно не использую.
    И редактирование заказа стало возможным.
    Единственное, осталось непонятно, почему ругалось на этот модуль. Вдруг он мне в будущем понадобится, а лезет эта ошибка…

    Последнее редактирование: 4 мар 2017

  5. значит все же не до конца перевели на ssl. Ищите где не до конца перешли, не настроили, не поменяли в конфиге.
    Почитайте тему по настройке ssl

    И если заказы старые смотрите, т.е те которые до перехода на ssl, то это возможно.
    Нужно править или файл или в базе…


OpenCart Russia Форум

Содержание

  1. Error undefined when editing order
  2. Error undefined when editing order
  3. Re: Error undefined when editing order
  4. Re: Error undefined when editing order
  5. Re: Error undefined when editing order
  6. Re: Error undefined when editing order
  7. Re: Error undefined when editing order
  8. Re: Error undefined when editing order
  9. Re: Error undefined when editing order
  10. Re: Error undefined when editing order
  11. Re: Error undefined when editing order
  12. error undefined
  13. error undefined
  14. Re: error undefined
  15. Re: error undefined
  16. Re: error undefined
  17. Re: error undefined
  18. Re: error undefined
  19. Re: error undefined
  20. Re: error undefined
  21. Re: error undefined
  22. Re: error undefined
  23. Re: error undefined
  24. Re: error undefined
  25. Re: error undefined
  26. error undefined
  27. error undefined
  28. Re: error undefined
  29. Re: error undefined
  30. Re: error undefined
  31. Re: error undefined
  32. Re: error undefined
  33. Re: error undefined
  34. Re: error undefined
  35. Re: error undefined
  36. Re: error undefined
  37. Re: error undefined
  38. Re: error undefined
  39. error undefined
  40. error undefined
  41. Re: error undefined
  42. Re: error undefined
  43. Re: error undefined

Error undefined when editing order

Error undefined when editing order

Post by Garret H » Sat Aug 04, 2018 3:56 pm

I just installed OC 3.0 and migrated all my orders and info over from 1.5.6.4 using Excelport. I initially installed the site in its own folder and everything worked great. I moved it over to the root and now I’m getting «error undefined» when trying to edit or delete an order.

I searched the issue and it appears to be an SSL problem but I couldn’t find any legitimate solves. Help!

Re: Error undefined when editing order

Post by straightlight » Sat Aug 04, 2018 8:24 pm

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester

Re: Error undefined when editing order

Post by Garret H » Sun Aug 05, 2018 12:18 am

Re: Error undefined when editing order

Post by straightlight » Sun Aug 05, 2018 4:14 am

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester

Re: Error undefined when editing order

Post by Garret H » Sun Aug 05, 2018 5:21 am

Re: Error undefined when editing order

Post by straightlight » Sun Aug 05, 2018 5:42 am

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester

Re: Error undefined when editing order

Post by Garret H » Sun Aug 05, 2018 5:56 am

It just says «Error undefined»

What’s strange is the website functions just fine in the subfolder but I get these errors when I move it to the root. The other option is I can just leave it in the subfolder if there’s a way to make it so the www.mysite.com points to www.mysite.com/oc3

Thanks for your assistance

Re: Error undefined when editing order

Post by straightlight » Sun Aug 05, 2018 9:04 pm

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester

Re: Error undefined when editing order

Post by MrPhil » Sun Aug 05, 2018 9:31 pm

It also forces SSL usage (https), and the use of www. in the domain name. Most sites want to do it that way. The rewrite to /oc3 is invisible until some other link is clicked, when /oc3 will start showing up. Your internal links in your store (defined in the configure.php files) should still contain /oc3.

The advantage to doing it this way is that if you later add a «landing page» /index.html (for instance) to welcome visitors and direct them to various parts of the site (blog, gallery, etc.), all you have to do is remove the rewrite to /oc3 and all the existing bookmarks and search engine entries will still be valid.

Re: Error undefined when editing order

Post by Garret H » Fri Aug 17, 2018 4:58 am

Thank you both for your help.

I’ve used 1.5.6.4 for almost 7 years now. I upgraded to 3.0 because my site was constantly getting hacked. I was hoping 3.0 would be better than 1 .5.6.4 which had a ton of glitches and required numerous mods to fix. Sadly, I see it is no different. Simple things such as the contact us page didn’t work properly. Opencart has some serious development issues and sadly, I don’t have the time and money to spend fixing it like I did with 1.5.6.4. I’ve made the migration over to Shopify. The $26 a month is nothing compared to the thousands I’ve spent trying to keep OC working right over the years. It’s refreshing to use a cart system that actually works properly out of the box.

Источник

error undefined

error undefined

Post by evilfx » Tue Mar 15, 2016 8:42 pm

If i access my stores admin url, or click on add to cart on the frontpage i get a popup with:

This happens ONLY if i access my websites without the www.

My websites are:

Do you know how i can fix this?

Best regards,
evilfx

Re: error undefined

Post by OSWorX » Tue Mar 15, 2016 10:19 pm

To be serious, you should avoid the calling with AND without www
The error you have is based on this:

Quellübergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf http://www.beleza21.com/catalog/view/ja . f2?v=4.4.0. (Grund: CORS-Kopfzeile ‘Access-Control-Allow-Origin’ fehlt).

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.

Re: error undefined

Post by evilfx » Wed Mar 16, 2016 1:33 am

Hi Osworx, thanks for your reply.
Sometimes my browser auto-completes without the «www.». And then i get that error. I’m afraid my customers might see this error as well.

From your reply i didn’t quite get it how i can fix it? Could you be more accurate as to what the fix is?

Is this something that happens to everybody?

Re: error undefined

Post by MariOiraM » Wed Mar 16, 2016 3:46 am

Re: error undefined

Post by OSWorX » Wed Mar 16, 2016 3:55 am

evilfx wrote: Hi Osworx, thanks for your reply.
Sometimes my browser auto-completes without the «www.». And then i get that error. I’m afraid my customers might see this error as well.

From your reply i didn’t quite get it how i can fix it? Could you be more accurate as to what the fix is?

Is this something that happens to everybody?

Fixing that can be done via 2 methods:

1. if you are using Plesk, simply define that there that you want URLs with / or without www (do not know if that can be done with other server panels like cPanel etc.)
2. simply add 2 lines to your .htaccess (either with or without www)

With both methods you are fine.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.

Re: error undefined

Post by evilfx » Wed Mar 16, 2016 7:12 pm

2. simply add 2 lines to your .htaccess (either with or without www)

how do i do this Osworx?

Sorry for all the trouble but i’m new at this.

Re: error undefined

Post by OSWorX » Wed Mar 16, 2016 7:24 pm

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.

Re: error undefined

Post by evilfx » Wed Mar 16, 2016 8:50 pm

if i do that, i get the error all the time because it is without www. that i get the error.

i changed it to:

and now it is always www.beleza21.com and it works.

Re: error undefined

Post by OSWorX » Wed Mar 16, 2016 10:35 pm

Important that it works.

While a ‘www’ is not really needed, it is just a subdomain technically.
So there is something else wrong.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.

Re: error undefined

Post by princerocky » Fri Apr 29, 2016 1:11 pm

I m also getting same error for my new developed site ..
If i access my store and click on add to cart on the front page i get a pop up with:

This happens ONLY if i access my websites without the www. on mobile

My websites are:

Do you know how i can fix this?
Pls help

Re: error undefined

Post by zezjulin » Mon May 09, 2016 7:00 pm

Re: error undefined

Post by dragonfly-ie » Mon May 30, 2016 7:50 am

That’s it in a nutshell. Cheers.

Re: error undefined

Post by himanshug.com » Wed Jul 13, 2016 10:23 pm

Hello,
Thanks for your conversation and observations but seriously I got solution from here, as I read that this is going because of www and someone said that www. is a sub-domain and that strikes in mind that yes, a sub-domain can be a issue as in some CMS the file paths are used according to the installation directory and its URL and thus, creates an issue with most common sub-domain i.e. www.

Well, making a permanents re-direct without using www helps a lot in case site is installed on without www directory and vice-versa in case of if site is installed in with www directory.

Источник

error undefined

error undefined

Post by Rubenboks » Wed Feb 26, 2020 4:20 pm

I want to change orders but always get
errorundefined

Re: error undefined

Post by thekrotek » Wed Feb 26, 2020 4:32 pm

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com

Re: error undefined

Post by Rubenboks » Wed Feb 26, 2020 4:39 pm

there is no error. note of this problem in the log

only a other problem.

Re: error undefined

Post by paulfeakins » Wed Feb 26, 2020 6:46 pm

Re: error undefined

Post by thekrotek » Wed Feb 26, 2020 7:21 pm

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com

Re: error undefined

Post by Rubenboks » Wed Feb 26, 2020 9:43 pm

system error log
there is only one log

the problem is when I want to change status of an order

Re: error undefined

Post by straightlight » Wed Feb 26, 2020 11:32 pm

system error log
there is only one log

the problem is when I want to change status of an order

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester

Re: error undefined

Post by paulfeakins » Thu Feb 27, 2020 12:35 am

Re: error undefined

Post by Rubenboks » Thu Feb 27, 2020 12:52 am

Re: error undefined

Post by thekrotek » Thu Feb 27, 2020 2:34 am

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com

Re: error undefined

Post by Rubenboks » Thu Feb 27, 2020 5:49 am

Re: error undefined

Post by letxobnav » Thu Feb 27, 2020 10:06 am

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

Источник

error undefined

error undefined

Post by bert56 » Wed Oct 21, 2015 4:08 pm

Tried for a couple of hours to resolve the following issue:

I installed the latest OC Version 2.1.0.1
If I login to the admin and click View more. at TOTAL ORDERS and TOTAL SALES the page (Orders) will be opened but I get a popup telling me error undefined

It is on the orders page also not possible to delete an order.

If I switch the admin to the Dutch language I get blank pages.

Hope someone can give me some suggestions,
Bert

Re: error undefined

Post by bert56 » Fri Oct 23, 2015 1:13 am

Blank pages in dutch language is resolved.
Mistakes in admin/language/dutch/sale/order.php One ; missing and on one line twice ;;

Have now only the error undefined problem on a server running PHP 5.5.25

On another server running PHP 5.3.3-7+squeeze22 I have no error undefined issues.

Re: error undefined

Post by vnhauk » Thu Feb 04, 2016 6:41 am

Re: error undefined

Post by Randem » Fri Feb 05, 2016 2:03 pm

The solution may be several fold.

Create an API for your store.
If you are running SSL, change all your references to HTTP t HTTPS in the config files (root & admin)
If a multi-store, make sure all your URL’s resolve to the same IP address

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
«Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?»
DO NOT EVER GIVE SOMEONE YOU DON»T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart

Источник

Рекомендованные сообщения

danonik

Newbie

Нажимаю на редактирование заказа выдает сообщение error
undefined, так же если попытаться сохранить изменения в заказе и статус.

если изменять статус не заходя в заказ то меняет.

  • Цитата

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

danonik

Newbie

Ошибка PHP Notice:  Uninitialized string offset: 1 in …/admin/view/template/extension/module/neoseo_order_manager.tpl on line 285

  • Цитата

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

NeoSeo Team

Enthusiast

1 час назад, danonik сказал:

Нажимаю на редактирование заказа выдает сообщение error
undefined, так же если попытаться сохранить изменения в заказе и статус.

если изменять статус не заходя в заказ то меняет.

Добрый день.

Уточните, пожалуйста, какая у Вас версия опенкарт?

  • Цитата

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

danonik

Newbie

ocStore © 2009-2020 Все права защищены.
Версия ocStore 2.3.0.2.3

  • Цитата

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

NeoSeo Team

Enthusiast

2 часа назад, danonik сказал:

ocStore © 2009-2020 Все права защищены.
Версия ocStore 2.3.0.2.3

Проверили работу модуля на версии OpenCart 2.3, таких ошибок не обнаружили: http://joxi.ru/52aLzNJtkqN0Qm

Пришлите нам в личные сообщения доступы к админ. панели, посмотрим на Вашем сайте, в чем проблема.

  • Цитата

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

danonik

Newbie

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

NeoSeo Team

Enthusiast

12 минут назад, danonik сказал:

отправил

Доступы получили.

  • Цитата

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

danonik

Newbie

Прошло 18 часов, тишина..

  • Цитата

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

NeoSeo Team

Enthusiast

1 час назад, danonik сказал:

Прошло 18 часов, тишина..

Добрый день.

Отписали Вам в личные сообщения.

  • Цитата

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

danonik

Newbie

обновленный модуль не помог((

  • Цитата

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

danonik

Newbie

вообщем забейте, ничего не решили, удаляю модуль и покупаю другой

  • Цитата

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

NeoSeo Team

Enthusiast

1 час назад, danonik сказал:

обновленный модуль не помог((

Напишите актуальные доступы к админ. панели сайта, посмотрим в чем дело.

  • Цитата

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Присоединяйтесь к обсуждению

Вы можете опубликовать сообщение сейчас, а зарегистрироваться позже.

Если у вас есть аккаунт, войдите в него для написания от своего имени.

This Opencart tutorial collects the most common errors that we face while developing and provides solutions for errors, try them and hope you could solve the issues

Cannot delete the admin folder in Opencart 4

https://forum.opencart.com/viewtopic.php?t=228495&p=843586 This solution looks working, for now, change the following lines of code at admin/controller/common/security.php

foreach (glob(trim($next, '/') . '/{*,.[!.]*,..?*}', GLOB_BRACE) as $file) {

to following

foreach (glob($next . '/{*,.[!.]*,..?*}', GLOB_MARK|GLOB_BRACE) as $file) {

2. Blank White Pages or 500 Internal Server Error

Blank white pages are a PHP error that for some reason the error messages don’t show because your server is not set up to display the errors.

  1. Go to the admin>> System >> Setting >> Edit store >> Server tab and at the end where you see the Error handling choose Yes to “Display Errors “.
  2. If you still don’t see the error, open php.ini and add code below: display_errors = 1; error_reporting = E_ALL; log_errors = 1;
  3. If you still don’t see the error then open index.php and add code below at the top (line 2): ini_set(‘display_errors’, 1); ini_set(‘log_errors’, 1); error_reporting(E_ALL);
  4. Still seeing the error then, set your “Output Compression Level” to 0 in the System > Settings > Server tab.
  5. If you still see the error, solve the issues but if you did not see the errors then most probably it will be a Server error.
  6. You can see error logs in the file also if you had enabled it.
    Blank screen issues in Opencart

Above mostly it gets solved and the 500 Internal Server Error can be solved with a similar approach.

2. Undefined Index / Variable

An undefined variable in the source code of a computer program is a variable that is accessed in the code but has not been previously declared by that code. So for that using “isset()” to check if the variable has been set will solve the issue.

Error variant:

Notice: Undefined index: filter in /Applications/XAMPP/xamppfiles/htdocs/opencart303/catalog/controller/product/category.php on lin

Solution
//$filter = $this->request->get['filter'];

if (isset($this->request->get['filter'])) {
    $filter = $this->request->get['filter'];
} else {
    $filter = '';
}
  • Commenting $filter = $this->request->get[‘filter’]; and checking with isset is one way to solve it.
  • If you get the issue while installing the modules or extensions then you need to check the code or solve the issues or contacting the developer can be also another solution.

3. Undefined Function / Method

Undefined function/method errors are seen when you call those functions or methods that are not defined and not found. IE_ERROR: A fatal error that causes script termination “Fatal error: Call to undefined function” or “Fatal error: Call to undefined method”. It happens if files are not found or the extensions are not compatible with your OpenCart version. Solutions can be below:

Error variant:

Related to OpenCart core files

  • Fatal error: Uncaught Error: Call to undefined method DBMySQLi::query()
  • Fatal error: Uncaught Error: Call to undefined method CartCart::getProducts() 
  • Fatal error: Uncaught Error: Call to undefined method ControllerAccountLogin::validate() in …/catalog/controller/account/login.php:54 

Go to the file and check whether the function or methods are defined there.

4. Headers Already Sent

Error variant:
  • Warning: Cannot modify header information – headers already sent by (output started at /public_html/config.php:31) in /path/public_html/index.php online.
Solution:

Remove spaces at the beginning and end of the file mentioned. Like in the above error check with the config.php

5. Session Issue

  1. The product on the cart is self-cleared.
  2. The product on the cart is cleared after the user logged in.
  3. No items stored at product compares.
  4. OpenCart admin always asking to login and get message “Invalid token session. Please log in again”.
Error variant:
  • Warning: session_start () [function.session-start]: open (/tmp/…, O_RDWR) failed: No such file or directory (2) in /path/public_html/system /library /session.php on line
Solution:

No such file or directory issue

  1. Open php.ini and add code below:session.save_path = /tmp;
  2. If the solution above does not work, contact your host and ask them how to set session.save_path.

6. Allowed Memory Size Exhausted

This error happens because your memory is not enough to execute the PHP code (uploading large images, deleting a lot of products, sending mass emails, etc). Increasing the memory allocated for PHP will solve the issue.

Error variant:
  • Fatal error: the Allowed memory size of 1111 bytes exhausted (tried to allocate 1111 bytes) in /path/public_html/system/library/image.php on line
Solution:
  1. Edit php.ini and set memory_limit = 128M;
  2. Or put code below to .htaccess php_value memory_limit 128M
  3. If the above does not works then contacting the hosting providers is only the solution where they can increase the number.

Warning: Use of undefined constant DIR_STORAGE – assumed ‘DIR_STORAGE’ (this will throw an Error in a future version of PHP) in …/config.php on line

Some other errors that you can face are below:

Error: Calls to magic methods are not allowed!

// Stop any magical methods being called
if (substr($this->method, 0, 2) == '__') {
return new Exception('Error: Calls to magic methods are not allowed!');
}

Error: Could not call product/category

// Initialize the class
		if (is_file($file)) {
			include_once($file);
		
			$controller = new $class($registry);
		} else {
			return new Exception('Error: Could not call ' . $this->route . '/' . $this->method . '!');
		}

Error: Could not load model

if (!$this->registry->has('model_' . str_replace('/', '_', $route))) {
    $file = DIR_APPLICATION . 'model/' . $route . '.php';
    $class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', $route);

    if (is_file($file)) {
        include_once($file);
        $proxy = new Proxy();
	// Overriding models is a little harder so we have to use 
        //  PHP's magic methods
	// In future version we can use runkit
        foreach (get_class_methods($class) as $method) {
            $proxy->{$method} = $this->callback($this->registry, $route . '/' . $method);
        }

        $this->registry->set('model_' . str_replace('/', '_', (string)$route), $proxy);
    } else {
        throw new Exception('Error: Could not load model ' . $route . '!');
    }
}

Error: Could not load library

Error: Could not load helper

Error: Could not load cache adaptor Memcache/Redis/APC cache!

$class = 'Cache\' . $adaptor;
if (class_exists($class)) {
    $this->adaptor = new $class($expire);
} else {
    throw new Exception('Error: Could not load cache adaptor ' . $adaptor . ' cache!');
}

Error: Could not load database adaptor mpdo/mssql/mysql/mysqli/postgre !

$class = 'DB\' . $adaptor;
if (class_exists($class)) {
    $this->adaptor = new $class($hostname, $username, $password, $database, $port);
} else {
    throw new Exception('Error: Could not load database adaptor ' . $adaptor . '!');
}

Error: Could not make a database connection using this username and password

Error: Could not connect to database opencart

Error: PHP GD is not installed!

if (!extension_loaded('gd')) {
    exit('Error: PHP GD is not installed!');
}

Error: Could not load image filename!

Error: Invalid session ID!

Warning: Install folder still exists and should be deleted for security reasons!

Installed bad extension, pressed refresh in the modification, and both admin panel and site are down

Remove it from the database, then open config.php and find what is the value defined for storage. Go to that storage/ folder, then go to modification and remove folders, similarly go to upload/ folder and see if there are folders if you have, remove it also. With this, it will remove the cached files and folder. Then, you can access your admin again.

Fatal error uncaught exception

Fatal error: Uncaught Exception: Error: Table ‘….oc_session’ doesn’t exist in engine<br />Error No: 1932<br />SELECT `data` FROM `oc_session` WHERE session_id = ‘….’ AND expire > 1548638620 in …/system/library/db/mysqli.php:40 Stack trace: #0 …/system/library/db.php(45): DBMySQLi->query(‘SELECT `data` F…’) #1 

For these errors to solve creating a database table will solve most of the issues

Fatal error: Uncaught Exception: Error: Could not load database adaptor DB_DRIVER!

Check in the system/library/DB folder whether the required driver file is there.

Opencart Cache details – remove while developing theme or module developer tips

Hope you solve the problems, if you find them please let us know, then we try to provide the solutions.

Opencart error, Opencart blank white page, Opencart headers already sent, opencart undefined index, opencart undefined variable, opencart restriction in effect, opencart memory size exhausted, opencart undefined method, opencart undefined function, opencart invalid token session, opencart internal server error, Vqmod, opencart out of memory

Понравилась статья? Поделить с друзьями:
  • Error undefined offending command sign stack degree
  • Error undefined offending command set stack empty
  • Error undefined ocstore
  • Error unable to reach the zimbra license activation server
  • Error undefined mixin