URL's in search results page are wrong and not the URL of the article assigned menu item

36 Views Asked by At

I have Joomla 3.9.21 which has SEF URL's enabled.

All works perfectly, but search results page.

For example, this is the SEO link to an article (which is assigned a menu option whose root option is called "proyectos"):

https://www.example.com/proyectos/thearticle.html

So far, so good. However, when I do a search where that article is on the results, the link of the article is this:

https://www.example.com/component/content/article/thearticle.html?catid=13&Itemid=101

How can I get rid of component/content/article part and replace it by the menu option the article is assigned to? In this case, root menu option is called "proyectos".

If I disable SEF, I realized that this URL is for the menu option that is assigned to the article:

https://www.example.com/index.php?option=com_content&view=article&id=15&Itemid=160

And when searching, this is the actual URL for that article in results page:

https://www.example.com/index.php?option=com_content&view=article&id=15:thearticle&catid=13&Itemid=101

Maybe the catid=13&Itemid=101 part is interfering. The catid is the category the article was assigned to and Itemid 101 is the home menu item. This ID is strange. For some reason, com_search module is not finding the Itemid associated to the article, 160 in this case.

Regards

Jaime

0

There are 0 best solutions below