Keyword

Joomla menu item changes k2 blog post link?

  • Steve Genco
  • Steve Genco's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #122364 by Steve Genco
Joomla menu item changes k2 blog post link? was created by Steve Genco
This is going to be hard to explain.

I'm using Joomla 3.2.0 and K2 2.6.7.

I have a K2 blog inside my Joomla site. I add a post. Let's call it Great New Idea, and it auto-generates an alias for the item, great-new-idea. All works fine. The new item appears correctly in the category view and in my recent posts module and it has a link something like domain.com/blog/item/27-great-new-idea.

Now I create a new Joomla menu called "What's New" and I want to create a menu item to point to my new blog item. So I add the menu item and name it New Blog Post, and it creates an alias new-blog-post.

I make the item type for the menu item k2 > Item and in the dialog select my post "Great New Idea".

I place the "What's New" menu on my Home page. Now, when I click on the "New Blog Post" menu item, it goes to my k2 post, but the link for the post is now domain.com/new-blog-post.

This is where it gets weird. I go back to my blog Category page or to my k2 Recent Posts module, and now the link for the k2 item has been changed to domain.com/new-blog-post. This is within k2.

If I manually type in the URL domain.com/blog/item/27-great-new-idea my original k2 item displays correctly, but just for this item, my k2 links are now reassigned to domain.com/new-blog-post.

Any ideas on how I can undo this mess? Or how it happened in the first place? How can I get k2 to link back properly to domain.com/blog/item/27-great-new-idea?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122365 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Joomla menu item changes k2 blog post link?
This is standard Joomla! behaviour.

Menu items will get their own URLs whether items will inherit their URL based on their parent menu item and component.

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

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

  • Steve Genco
  • Steve Genco's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #122366 by Steve Genco
Replied by Steve Genco on topic Re: Joomla menu item changes k2 blog post link?
I understand that the menu item gets its own URL. That is what I would expect. The problem is that this URL replaces the URL assigned to the item inside k2.

If I unpublish the menu item, k2 tries to find the k2 item using the menu item URL, and produces a 404 error. The original URL assigned to the blog post by k2 when I saved it is gone.

This is very different from when a menu item links to a Joomla article. In that case the menu item creates its own URL, like you say, but the article can still be accessed in other ways by its original URL.

For example, if I access the article from the Main Menu, if I access it again from the What's New menu, there are 2 URLs to the same article and they are independent.

For this k2 blog post, after accessing it from this What's New menu, there is only one URL, and the URL originally created by k2 for display in k2 component and modules is gone.

I don't know how to recover from this, other than to delete and recreate the blog post as a new post, with a new item number, and not access it separately from a Joomla menu. Doesn't seem right.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122367 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Joomla menu item changes k2 blog post link?
Unfortunately this is how Joomla! works.

This is not a K2 blog post actually it is a Forum component.

To minimize the impact on your workflow you have two options.

a) Create a hidden menu and move the menu item there when you do not need in your main menu anymore.
b) Use an SEO/SEF extension which provides URL s like domain.com/alias for items.

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