Keyword

K2 url problem

More
7 years 10 months ago #158932 by eran
K2 url problem was created by eran
I've changed my site template and all the relatives url are broken broken even tough the sites (the one before template change and the one after) are identical.
examples:
if I could reach specific article with simple url like:
www.dsharon.org.il/index.php?option=com_k2&view=item&id=425
in the old site, nowi get error message 'Fatal error: Call to a member function get() on null in /home/dsharono/public_html/templates/zozostar/index.php on line 182' and to reach the same article I need more complex url like :
www.dsharon.org.il/index.php?option=com_k2&view=item&id=425:department-of-social-services&Itemid=1195
Not only that it changed, I can't really understand why this suffix was added to the url (the article is in k2 category that called 'department-of-social-services' but the article id 1195 is not in this category).
The same goes with k2 category. if i could reach k2 category with this url:
dsharon.org.il/index.php?option=com_k2&view=itemlist&task=category&id=384
now I need this url: dsharon.org.il/index.php?option=com_k2&view=itemlist&layout=category&task=category&id=393&Itemid=611
(and also with no apparent explanation since article 611 is unpublished and not in the same category).
all the links are working in my local server (old site) but do not work in the new.

It is real pain since I have a lot of urls embedded in the text.

What did I do wrong and Is there a way to fix it (without the need to fix hundreds of links) ?

THX

eran

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 10 months ago #158941 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 url problem
The www.dsharon.org.il/index.php?option=com_k2&view=item&id=425:department-of-social-services&Itemid=1195 is the correct URL the Itemid=1195 being the menu item's ID.

In order to get proper URLs you need to map each K2 category into a separate menu item in order to have a consistent URL pattern.
Furthermore I strongly encourage to enable SEF urls

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

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


Powered by Kunena Forum