If you haven't caught this yet, there is a problem with slugs (at least on the categories). It appears that the date is being tacked onto the slug on every store to database. Example:
1. Edit category "Music" with current slug "music"
2. Hit apply. Slug is now "music2011-12-01-23-29-553"
3. Hit apply again. Slug is now "music2011-12-01-23-29-5532011-12-01-23-30-306"
FYI, I'm using Joomla! 1.5 for this.
It appears the problem is that it's not checking whether this is a new category or an existing category. Here's how I fixed it:
Change (line 434 in vmtable.php):
$q = 'SELECT `'.$slugName.'` FROM `'.$this->_tbl.'` WHERE `'.$slugName.'` = "'.$this->$slugName.'" ';
to
$q = 'SELECT `'.$slugName.'` FROM `'.$this->_tbl.'` WHERE `'.$slugName.'` = "'.$this->$slugName.'" AND `virtuemart_category_id`!='.$this->virtuemart_category_id;
You guys might have a better way though.
A thanks. I think people wonder how that happened.
Due the multilanguage the slug is most time in the lang table now, I added a check, should work now.
The idea of stephenroberts does not work, because the query would return nothing, when the slug is used elsewhere.
Hmm, it seemed to work to me in both the case where you add a new category or edit an existing category. I'm interested to see how you decided to solve the problem. Thanks!
I see what you're talking about now. If you're editing a category and try to name it the same as an existing category then no, it won't add a suffix to the slug the way I did it. I'll try to think through all cases next time instead of the first thing that works for me. ;)
oh stephenroberts, you did a good job. Finally after some months I got the real problem we had all time with it. So dont excuse yourself for doing the right thing.