Keyword

K2 item URL route problem in search results - Joomla v.3.9.13 - k2 v.2.10.02

  • Kostas G
  • Kostas G's Avatar Topic Author
  • Offline
  • New Member
More
4 years 4 months ago #174049 by Kostas G
I noticed a problem in url route when searching k2 items (joomla smart search).
Instead of producing the appropriate menu link, the url of the item has the /component/k2/.. in the item's url in search results which doesnt work.
That problem existed before (joomla version 3.9.12 and K2 v. 2.09) but after the update to 2.10.00 the problem solved.
Now, after the joomla update to 3.9.13 and K2 to 2.10.02 the problem appeared again.

Any suggestions how to fix this so the results in search to have the correct urls (menu alias) and not the /component/k2.. "?

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #174056 by JoomlaWorks
I think I know what it may be. Can you share some URLs please?

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Kostas G
  • Kostas G's Avatar Topic Author
  • Offline
  • New Member
More
4 years 4 months ago - 4 years 4 months ago #174062 by Kostas G
Hi
thanks for the response

check the url of the results..
www.epant.gr/anazitisi.html?q=%CE%B1%CF%80%CE%BF%CF%86%CE%AC%CF%83%CE%B5%CE%B9%CF%82
They are all under the äpofaseis-gnomodotiseis" menu alias but as search results, those and all the urls for the K2 content dont work. Joomla content works ok.
Last edit: 4 years 4 months ago by Kostas G.

Please Log in or Create an account to join the conversation.

  • Kostas G
  • Kostas G's Avatar Topic Author
  • Offline
  • New Member
More
4 years 4 months ago - 4 years 4 months ago #174064 by Kostas G
Hi
thanks for the response

check the url of the results..
www.epant.gr/anazitisi.html?q=%CE%B1%CF%80%CE%BF%CF%86%CE%AC%CF%83%CE%B5%CE%B9%CF%82
They are all under the äpofaseis-gnomodotiseis" menu alias but as search results, those and all the urls for the K2 content dont work. Joomla content works ok.
Last edit: 4 years 4 months ago by Kostas G.

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #174066 by JoomlaWorks
Try this. Edit the file /plugins/finder/k2.php and at line 116 (BEFORE the comment "// Initialize the item parameters.") place the following line:
require_once(JPATH_SITE.'/components/com_k2/helpers/route.php');

This will call the K2 URL router so can get the actual URLs, as linked by your menu system.

Of course to see these changes, you should re-index your site (or at least purge some new entries to re-index them and check the results).

Let me know.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Kostas G
  • Kostas G's Avatar Topic Author
  • Offline
  • New Member
More
4 years 4 months ago - 4 years 4 months ago #174068 by Kostas G
I did it,
cleared the index and rebuilt it after the change but the problem still exists.
Attachments:
Last edit: 4 years 4 months ago by Kostas G.

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #174074 by JoomlaWorks
I can't verify this as an issue on my end, even without the line added (I assume the system plugin loads it either way). Can you double check it's not a server-side caching issue or some other internal Joomla caching layer issue?

For the record, I tested all possible SEF and non-SEF combinations with smart search.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Kostas G
  • Kostas G's Avatar Topic Author
  • Offline
  • New Member
More
4 years 4 months ago #174103 by Kostas G
Well, after many tries, reindexing etc, I could not make it work. The problem is only with K2 and smart search, other components that we use, like dpcalendar, work fine with Smart Search.
I find out that the problem persists only in the greek version of our site - we have a multilingual site of 2 languages (greek and english), with greek as default.
You can check it out by yourself by searching for K2 articles in the greek version and in the english one:
Greek smart search: www.epant.gr/anazitisi.html?q=αποφάσεις
English smart search: www.epant.gr/en/search.html?q=press
You will see that the url route in the english version works fine and in the greek is not working, even though all the menu aliases have english characters in both versions.
So I think the problem has to do with the multilingual support of the second language.
For the moment, I replaced smart search modules in the greek version with the k2 tool modules (search box mode) which work fine even though the search is limited only in k2 content - which is a problem for us - and waiting for a fix, if any.

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #174107 by JoomlaWorks
Which language is set as the default for the site? English or Greek? Additionally, do you do language auto-switch based on the user's browser language?

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Kostas G
  • Kostas G's Avatar Topic Author
  • Offline
  • New Member
More
4 years 4 months ago #174123 by Kostas G
Greek is the default and Yes, language auto-switch based on browser

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum