Post by Meeker » Wed Sep 20, 2017 1:33 am

Hi there,

I am developing a new OC site and I am getting some weird errors whenever I try to add a new article. The article does add, but when I try to edit, I get the error below. I think there is some corruption in my MySQL DB. Can anyone help please? Thanks

Warning: mysqli::query(): (21000/1242): Subquery returns more than 1 row in /var/www/vhosts/test.com/httpdocs/dev/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 oc_url_alias WHERE query = 'information_id=8') AS keyword FROM oc_information WHERE information_id = '8'' in /var/www/vhosts/test.com/httpdocs/dev/system/library/db/mysqli.php:40 Stack trace: #0 /var/www/vhosts/test.com/httpdocs/dev/system/library/db.php(16): DB\MySQLi->query('SELECT DISTINCT...', Array) #1 /var/www/vhosts/test.com/httpdocs/dev/admin/model/catalog/information.php(78): DB->query('SELECT DISTINCT...') #2 [internal function]: ModelCatalogInformation->getInformation('8') #3 /var/www/vhosts/test.com/httpdocs/dev/system/storage/modification/system/engine/loader.php(178): call_user_func_array(Array, Array) #4 [internal function]: Loader->{closure}(Array, Array) #5 /var/www/vhosts/test.com/httpdocs/dev/system/engine/proxy.php(25): call_user_func_array(Object(Closure), Array) #6 /var/www/vhosts/test.com/httpdocs/ in /var/www/vhosts/test.com/httpdocs/dev/system/library/db/mysqli.php on line 40

User avatar
Active Member

Posts

Joined
Thu Sep 16, 2010 5:45 am

Post by yodapt » Wed Sep 20, 2017 1:39 am

Code: Select all

SELECT keyword FROM oc_url_alias WHERE query = 'information_id=8'
Run this on phpmyadmin, and delete the rows you dont need.

It should be a good idea to LIMIT 1 on the resultset, to avoid future problems, but if there is in fact more duplicated content on that table, you might run into problems later on anyway.

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by Meeker » Wed Sep 20, 2017 7:19 pm

Thanks for that, you were right. Checking in phpmyadmin, there were quite a few duplicates. Once they were deleted, the problem disappeared.

Much appreciated!

User avatar
Active Member

Posts

Joined
Thu Sep 16, 2010 5:45 am
Who is online

Users browsing this forum: No registered users and 75 guests