Post by Swissy » Fri Nov 09, 2012 9:19 pm

Hi Everyone

I hope someone can help me

I have the problem that after upgrading from 1.5.1 to latest version i cant edit some of my categories and products

The error i get is:

Warning: mysql_query() [function.mysql-query.php]: Unable to save result set in /home/xxx/www/shop.xxxxx.xx/system/database/mysql.php on line 21Notice: Error: Subquery returns more than 1 row
Error No: 1242
SELECT DISTINCT *, (SELECT keyword FROM url_alias WHERE query = 'product_id=341') AS keyword FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '341' AND pd.language_id = '1' in /home/xxxxx/www/shop.xxxx/system/database/mysql.php on line 49

Similar erros on other products and categories

Everything else works fine no erros on front or so

I just cant edit any more cats and products


I really would like to get some help or advice

I think this is the first ever major error i got since I use OC from earlest versions

Newbie

Posts

Joined
Fri Apr 01, 2011 2:43 am

Post by Swissy » Sat Nov 10, 2012 12:34 am

I just saw i have this on several other parts of the website as well

SELECT DISTINCT *, (SELECT keyword FROM url_alias WHERE query = 'information_id=7') AS keyword FROM information WHERE information_id = '7


Im really stuck, i have no clue how to fix it

Newbie

Posts

Joined
Fri Apr 01, 2011 2:43 am

Post by Swissy » Sat Nov 10, 2012 2:58 am

fixed ... ;-)

url_alias is where to look :crazy:

Newbie

Posts

Joined
Fri Apr 01, 2011 2:43 am

Post by evastears » Mon Apr 08, 2013 7:20 pm

Swissy wrote:fixed ... ;-)

url_alias is where to look :crazy:
Can you please be clear also for us ? :) What to do there?

I am also having the same error.... And little bit too much amateur i am :crazy:

Thanks

Newbie

Posts

Joined
Sun Mar 10, 2013 1:56 am

Post by arbex5 » Tue Oct 22, 2013 2:02 am

To fix:
- open PhpMyAdmin
- Open table url_alias
- Click at search
- In Query, change the operator to

Code: Select all

=
(equal)
- In Value input the name of the product_id that is displaying in the error, in my case product_id=337
- It will find two or more rows. Remove the one with the bigger url_alias_id.
- DONE.

Newbie

Posts

Joined
Fri Dec 14, 2012 8:42 pm

Post by zaidladha » Sun Jun 04, 2017 1:45 pm

worked for me. 1 category had 2 lines in url_alias ....... its wierd that it happened to be the exact one I was looking at though, I wonder how it got there and if more will mysteriously pop up now.

Active Member

Posts

Joined
Wed Jun 05, 2013 3:07 pm

Post by dront » Wed Sep 13, 2017 11:07 pm

arbex5 wrote:
Tue Oct 22, 2013 2:02 am
To fix:
- It will find two or more rows. Remove the one with the bigger url_alias_id.
Is it solution?
I need my categories to be called in lot of ways!
Sometimes category should be site.com/best-boods-in-universe/, sometimes it should be opened by site.com/super, sometimes it should be very short url for advertisment as "Input site.com/s to get exclusive discount!"
If there a way other then asign lot of keywords to the same querry?

Temporary fixed problem by adding HAVING count(*) = 1 to this line at /model/catalog/category.php
AS path, (SELECT DISTINCT keyword FROM " . DB_PREFIX . "url_alias WHERE query = 'category_id=" . (int)$category_id . "' HAVING count(*) = 1)

Newbie

Posts

Joined
Wed Sep 13, 2017 10:40 pm
Who is online

Users browsing this forum: Google [Bot] and 26 guests