2

First off, I apologize if this question has been asked before, (Though I was unable to find it, if it were).

My issue is that right now I have a sub menu item pointing to a article where the visitor is then redirected to the correct shop (According to his/her language).

The issue is that I have developed a new shop and would like to point my sub menu item to the new shop, if I however do this, it will break all the internal links I have In my articles / modules which point to this sub menu point.

To fully grasp what my issue is please see below:

**Current Main Menu (Visible)**

Purchase - Points to "Buy here" (Menu Item Alias)
  - Buy here -> Points to article (URL: /purchase/buy-here.html)
  - Other sub menu item

What I want to do but breaks / generates route errors is:

**Altered Main Menu (Visible)**

Purchase - Points to "/shop.html" (Menu Item Alias)
  - Buy here -> Points to "/shop.html" (Menu Item Alias)
  - Other sub menu item


**Shop menu (Hidden)**
shop - Main shop page (URL: /shop.html)
   - Shop related link
   - Shop related link

When I do this all the links that I have in my article that points to the "Buy here" breaks.

I can of course go through all my articles and modules and change the link accordingly before updating the main menu, but it's easy to miss a link.

Is there any way I can update / avoid breaking my internal links?

Errors:

Notice: Undefined index: view in /components/com_content/router.php on line 67

And if Gzip'ing is enabled in Joomla I get this error aswell

Error code: ERR_CONTENT_DECODING_FAILED

UPDATE:

I'm not looking for a temporary solution or a quick fix, so .htaccess will not solve the issue as the main link will still be there.

2 Answers 2

2

use a redirect in your .htaccess file

RewriteEngine on
Redirect 301 /purchase/buy-here.html /shop.html
4
  • While it would solve the redirect issue it self, I will still be left with the old links and at such cannot do. Besides it doesn't make much sense to keep a link no longer used.
    – Epodax
    Apr 14, 2015 at 20:50
  • well yeah but you can , from here on out use the new links, or also look at a joomla extension called re-replacer
    – keaner
    Apr 14, 2015 at 20:54
  • I'll look into the re-replacer extension first thing tomorow.
    – Epodax
    Apr 14, 2015 at 20:56
  • While the idea behind re-replacer is neat and smart, it is not permanent and would only be a temporary solution (I'm looking for a more permanent one). Although I appreciate your help :)
    – Epodax
    Apr 15, 2015 at 6:43
1

This is a strange problem. I wonder how you entered those links. Normally Joomla should update links automatically - if entered correctly. Anyway, 2 solutions come to my mind spontaneously:

  1. Replace wrong links with correct links in all articles in the database: http://extensions.joomla.org/extension/db-replacer (or directly with a DB tool, phpMyAdmin, HeidiSQL, etc.)
  2. Use sh404sef to create an alias. Seems like a bit of an overkill for a single link, but sh404sef can do other things that you might find useful.
3
  • The links have been created the "normal" way, nothing strange there, I don't know if it's because it's changing menu type, it's going from "Single article" to "Menu alias"
    – Epodax
    Apr 28, 2015 at 9:28
  • I set this up myself to see what happens and it became quite clear: When you turn a menu item into an alias, it effectively becomes the item of which it is an alias. The original item does not exist anymore. Same as if you deleted the original item. So the links to it must fail.
    – Ralf
    Apr 29, 2015 at 12:06
  • One solution: do not change the menu item to alias, but hide it (move to hidden menu). Then create new alias item. My other suggestions will work, too. Changing the links is straightforward, and I used sh404sef to fix it in my test: Create a new URL, where the new URL is a direct link to your article, and the non-sef URL is to original menu link.
    – Ralf
    Apr 29, 2015 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.