0

I've copied the exact menus and menu structured over from a J3 website to a J4 website but the resulting URL tree is generating differently on the J4 site.

For example the old J3 URL is: https://old.lymington.com/**lymington-life**/arts-in-lymington

The exact same menu structure J4 generates: https://dev.lymington.com/lymington-life/arts-in-lymington

At this point they are the same, if you then click on an article,

J3 gives the URL:https://old.lymington.com/**lymington-life**/**leisure-sport**/131-leisure/1673-lymington-lido-mark-hugh-may20

J4 gives the URL:https://dev.lymington.com/**lymington**/131-leisure/1673-lymington-lido-mark-hugh-may20

In j4 the lymington is generated from a hidden menu item (article category view) created to show the category in the URL rather than a query string. This works fine in J3 but in J4 it is being added to the URL instead of the parent url/category.

I know I'm not really explaining this too well.

Any help or if I can provide any extra information, please do ask. This has been frying my brain.

After a bit more thinking, I think the easiest way would be to rewrite all URLs from this structure: https://old.lymington.com/**lymington-life**/**leisure-sport**/131-leisure/1673-lymington-lido-mark-hugh-may20

To remove/redirect the leisure-sport/ part of the URL so the resulting redirect would point to: lymington.com/lymington-life/131-leisure/1673-lymington-lido-mark-hugh-may20

Kind Regards Donna

2
  • 1
    Yes, the joomla site router has changed in version 4. I think if your article category matches the category of a menuitem which is a category blog or list, then it will build your URL using the alias of that menuitem. If it can't find a matching menuitem then it will pick a menuitem relating to a category blog/list (of some other category) and use that alias, but then suffix it with your article's category. Commented Jul 7, 2023 at 10:46
  • I thought so, thank you for the confirmation. What a pain when migrating a large site. I was trying to avoid having to redirect potential hundreds of pages. I've tried allsorts of alias naming combinations and the Direct Alias plugin but it looks like I'll be exporting the sitemap from the old site and manually creating redirects to upload. Yikes. Lol.
    – Dtorr1981
    Commented Jul 7, 2023 at 16:48

1 Answer 1

1

How was the migration done? It seems to have been manual. Joomla 3 will not create proper links if the category menu items were not manually created - this means that you the menu items that you had in Joomla 3 no longer exist in Joomla 4, meaning that those weren't ported. I believe the proper solution to this problem is to either remigrate the website automatically, or recreate all the menu items in Joomla 4.

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.