bobdonkey Posted June 28, 2015 Share Posted June 28, 2015 Hi allI am importing all my products into the database, and because I don't specify the SOE path, it is set automatically (which is fine) but as a result the error is showing the whole time, even to normal users (and google):The following errors were detected:The SEO path specified is already in use with another item. A unique one has been specified for you. Please check and amend if necessary.I do not want normal users seeing this error. How can I disable it completely?Thanks Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 28, 2015 Share Posted June 28, 2015 Please try this. In /classes/seo.class.php, near line 642:Was: // Force unique path is it's already taken $unique_id = substr($type, 0, 1).$item_id; $GLOBALS['db']->insert('CubeCart_seo_urls', array('type' => $type, 'item_id' => $item_id, 'path' => $path.'-'.$unique_id, 'custom' => $custom)); $GLOBALS['gui']->setError($GLOBALS['language']->settings['seo_path_taken']); Now: // Force unique path is it's already taken $unique_id = substr($type, 0, 1).$item_id; $GLOBALS['db']->insert('CubeCart_seo_urls', array('type' => $type, 'item_id' => $item_id, 'path' => $path.'-'.$unique_id, 'custom' => $custom)); if($show_error && CC_IN_ADMIN) $GLOBALS['gui']->setError($GLOBALS['language']->settings['seo_path_taken']); The edit in the last line above will show the error only if not specifically prohibiting it, and then only if this SEO function is called from an administrative action. Quote Link to comment Share on other sites More sharing options...
bobdonkey Posted June 28, 2015 Author Share Posted June 28, 2015 Seems to be working OK, thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.