Hi
There is no procedure I can think of. What's happening is not happening in sh404SEF, and there is nothing I can outline to do to prevent it.
Fixing things is a matter of selecting the correct non-sef URL, but preventing it requires that we know where those URLs with wrong Itemid are created, and that's not something I can do.
Here is how Joomla and sh404SEF work:
- when there is a link somewhere on a page, a non-sef link, created either by Joomla, by an extension or by you in an article, Joomla finds it and passes it to sh404SEF to be recorded and transformed into a SEF URL.
For instance, if you have a link:
index.php?option=com_content&Itemid=529&catid=105&id=522&lang=fr&view=article
on the home page, Joomla passes it to sh404SEF. sh404SEF searches in the database to know if we have seen this URL before.
If found, it returns the current associated SEF URL. If not already seen, it builds the SEF (for instance /example-page) and stores both URLs in the database.
Now if later on, another non-sef is found by Joomla:
index.php?option=com_content&Itemid=529&catid=96&id=522&lang=fr&view=article
sh404SEF does not find it in the database. So it builds the SEF, and the SEF is also /example-page. It means this is a duplicate, and it's also stored in the databases, but marked as #2 duplicate.
So in this case you can see the non-sef URL, with catid=105, was left over in the database from the time the articles where in that category.
Another consequence is that whatever non-sef URL is the
first one takes the
main spot. All others are considered duplicates.
And here, I don't have the right one URL.
blog/graphisme/un-projet-bd
index.php?option=com_content&Itemid=529&catid=97&id=529&lang=fr&view=article
index.php?option=com_content&id=529&lang=fr&view=article
You mean you don't have a link with the right category, the new one? was this an article that was changed category?
If so, it means until now Joomla never saw the correct link on any page that was displayed to a user. So just displaying a page with a link to that blog is enough for a URL to be created.
Again, I am not saying that you should try to display /blog/graphisme/un-projet-bd. You should (or a user should request) a page with a
link to /blog/graphisme/un-projet-bd
Rgds