Post by ripper » Sun Nov 04, 2018 7:42 pm

hi,
Oc 2.3.0.2
in admin when I want to edit some product I get this error. It happen only on some products. What I can see that there are more than 1 row for that product id, but when I make SQL query I get only one. Anyone can help?

Code: Select all

Warning: mysqli::query(): (21000/1242): Subquery returns more than 1 row in /data/web/virtuals/104382/virtual/www/system/library/db/mysqli.php on line 18
Fatal error: Uncaught exception 'Exception' with message 'Error: Subquery returns more than 1 row<br />Error No: 1242<br />SELECT DISTINCT *, (SELECT keyword FROM url_alias WHERE query = 'product_id=1754') AS keyword FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '1754' AND pd.language_id = '2'' in /data/web/virtuals/104382/virtual/www/system/library/db/mysqli.php:40 Stack trace: #0 /data/web/virtuals/104382/virtual/www/system/library/db.php(16): DB\MySQLi->query('SELECT DISTINCT...', Array) #1 /data/web/virtuals/104382/virtual/www/system/storage/modification/admin/model/catalog/product.php(366): DB->query('SELECT DISTINCT...') #2 [internal function]: ModelCatalogProduct->getProduct('1754') #3 /data/web/virtuals/104382/virtual/www/vqmod/vqcache/vq2-system_storage_modification_system_engine_loader.php(189): call_user_func_array(Array, Array) #4 [internal function]: Loader->{closure}(Array, Array) #5 /data/web/virtuals/104382/virtual/www/system/engine/proxy.php(25): ca in /data/web/virtuals/104382/virtual/www/system/library/db/mysqli.php on line 40

Attachments

sql_error.jpg

sql_error.jpg (107.19 KiB) Viewed 238 times

Last edited by ripper on Sun Nov 04, 2018 9:40 pm, edited 1 time in total.

New member

Posts

Joined
Wed Jul 06, 2011 4:37 am

Post by straightlight » Sun Nov 04, 2018 8:58 pm

No OC version posted. More information is needed on knowing if extensions are involved with the admin products page or not. Forum rules.

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

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

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

Post by ripper » Sun Nov 04, 2018 9:39 pm

Sorry... oc 2.3.0.2

New member

Posts

Joined
Wed Jul 06, 2011 4:37 am

Post by thekrotek » Sun Nov 04, 2018 9:42 pm

One of your extensions modified the core files and most likely did it improperly. You need to open the files mentioned in your log text and trace the code back to. If you can't do this yourself, you can always ask for commercial support.

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


User avatar
Active Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by ripper » Mon Nov 05, 2018 3:54 am

I tried to disable all extensions and it didn't help. What is weird that in URL I see product_id 1532, but in error message is 1754. ???

Image

New member

Posts

Joined
Wed Jul 06, 2011 4:37 am

Post by straightlight » Mon Nov 05, 2018 4:33 am

Either the product database table is corrupted or contains duplicated data.

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

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

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

Post by ripper » Thu Nov 08, 2018 9:55 pm

straightlight wrote:
Mon Nov 05, 2018 4:33 am
Either the product database table is corrupted or contains duplicated data.
Is there any way how to fix it? Sometimes helps to duplicate the product and delete the old one, but it helps in 50%. Sometimes I need to create the product manually again. There is weird binding between diferent products. :(

New member

Posts

Joined
Wed Jul 06, 2011 4:37 am
Who is online

Users browsing this forum: No registered users and 30 guests