-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing validation for SEO keywords #1632
Comments
does not crash with me |
It will crash under the right circumstances - the subquery The problem is not the query however, but the fact that you're allowed to create conflicting entries because the input isn't being validated. Even if this query could execute properly with corrupted/invalid data allowed into the database, e.g. if you were to add a How would I even know as an administrator if I've created a duplicate? Manually page through 400 products and look at every SEO keyword and memorize them? :-) |
Why was this closed without any solution? I have one OC install where this exact error happens. If I try to edit a product or category all I get is a blank page with the error text, with product it is: Warning: mysql_query(): Unable to save result set in /var/www/clients/xxx/yyy/web/system/database/mysql.php on line 22Notice: Error: Subquery returns more than 1 row It's a webshop with two languages.I think this was working few weeks ago but after I removed Opencart SEO Pack VQMod files (because those were making trouble elsewhere) I can't get to edit product or category. I found some fixes for this but none of them worked. Some fix suggested that I should remove the duplicate values from database but doesn't that mean I'll loose the links for the other language? |
houston, we have the same problem (without any extension!) |
@trueliarx How did you input your product information? Did you use the product edit forms, or an product importer? When editing a product via the OC interface, the SEO URL entry is removed from the table
If you're using a 3rd party product importer, you will need to contact the extension developer to ensure the same process is used to prevent duplicate entries. |
This shall only delete for that product id. But the duplicate keyword should be checked if it exists. As main thing is preventing duplicate keywords in url_alias table. As on front end the checking can only be done with keyword coming from url. So adding a check while adding products is a good idea. |
The system looks for duplicate keywords when you attempt to save the product form. If the keyword already exists the user is given the error message
|
look at my implementation of url alias model. |
Neither categories nor products have any sort of validation for SEO keywords, which means you're allowed to create duplicates - on the product admin page, if a duplicate keyword if used in the product's category path, the admin page will crash:
The text was updated successfully, but these errors were encountered: