Module news item link is opening on homepage instead own page Topic is solved

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
User avatar
MediaFish
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 104
Joined: Wed Jun 15, 2011 1:33 pm
Contact:

Module news item link is opening on homepage instead own page

Post by MediaFish » Fri Apr 12, 2019 10:41 am

Hi,

On [https://www.endeavour-sailing.co.uk/]a site[/url] I manage I added a Joomla Articles - Newsflash module on the bottom of the site below Latest News.

Each of the articles inside the module have their own menu item.
Example (second article in module): OCEAN PASSAGE PLANNING - Menu item: TRAINING INFO/Navigation/Ocean Passage Planning

Now when I click on the Newsflash link of OCEAN PASSAGE PLANNING the news opens on the homepage instead of it's own page
Opens here: myhomepage/29-training-information/navigation/134-ocean-passage-planning
Should open here: myhomepage/training-information/navigation/ocean-passage-planning

Why is this happening - I thought if articles have a menu item they then open in the correct page and not on the page the newsflash module is.

Thanks

dragonrider
Joomla! Ace
Joomla! Ace
Posts: 1070
Joined: Mon Aug 22, 2005 7:53 pm
Location: Ilkley, West Yorkshire, UK
Contact:

Re: Module news item link is opening on homepage instead own page

Post by dragonrider » Fri Apr 12, 2019 2:35 pm

Depending on which Newsflash module you've used, you may need to set it to open in a new tab, can you share the name of the module you've used please?

User avatar
MediaFish
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 104
Joined: Wed Jun 15, 2011 1:33 pm
Contact:

Re: Module news item link is opening on homepage instead own page

Post by MediaFish » Sat Apr 13, 2019 6:07 am

Thanks - as I said: Newsflash Module - that's what the native newsflash module is called :-)

dragonrider
Joomla! Ace
Joomla! Ace
Posts: 1070
Joined: Mon Aug 22, 2005 7:53 pm
Location: Ilkley, West Yorkshire, UK
Contact:

Re: Module news item link is opening on homepage instead own page

Post by dragonrider » Sat Apr 13, 2019 6:56 am

MediaFish wrote:
Sat Apr 13, 2019 6:07 am
Thanks - as I said: Newsflash Module - that's what the native newsflash module is called :-)
Ah, sorry don't use that one myself.
From the documentation page, it doesn't seem to offer open in new tab option.

However, you might need (if it is possible) to ensure that your links start with http:// and the url in full, rather then just an internal link?

I'd suggest you have a look at the Newsflash extensions available to choose one that does what you want.
Last edited by dragonrider on Sat Apr 13, 2019 7:10 am, edited 1 time in total.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30819
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Module news item link is opening on homepage instead own page

Post by Per Yngve Berg » Sat Apr 13, 2019 7:06 am

Opens here: myhomepage/29-training-information/navigation/134-ocean-passage-planning

The problem is that this link does not contain Menu item. It's probably a category and article.
Have you tried to switch to Modern routing and set Remove ID numbers?

User avatar
MediaFish
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 104
Joined: Wed Jun 15, 2011 1:33 pm
Contact:

Re: Module news item link is opening on homepage instead own page

Post by MediaFish » Sat Apr 13, 2019 11:31 am

@dragonrider - thanks but no I do not want any third party module for that - the module does work on another site I manage - using the exact same module and overrides - but thanks.

@Per Yngve Berg

Yes it must be something with the routing as:

When I click the link in my menu to the article it points to (and that is what I also need for the Newsflash Module:
myweb/rya-sailing-courses/development-courses/ocean-milebuilding-passages

Explanation of URL:
rya-sailing-courses = main category & menu root
development-courses = sub category & sub menu
ocean-milebuilding-passages = menu item name

When I click in the Newsflash module the link goes to (of course with https//):
myweb/27-rya-sailing-courses/development-courses/135-ocean-milebuilding-passage-lanzarote-to-portugal

Explanation of URL:
27-rya-sailing-courses = ID & main category
development-courses = sucategory
135-ocean-milebuilding-passage-lanzarote-to-portugal = article name

So the main and sub category are correct (except for the ID) but then it creates the URL from the article alias and not menu alias.

I just tried the Modern routing and Remove ID: but that then creates URLs with only the article name but does not show the category name in the url such as:

myweb/ocean-milebuilding-passage-lanzarote-to-portugal


The URL in the Newsflash Module is created the following way:

Code: Select all

<?php echo $item->link; ?>
On the site it works the menu structure is:

In another website I use that same module with the same overrides and it does not eliminate the category when using Modern routing and Remove ID - any idea what setting could be the problem or I have wrong?

Thanks

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30819
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Module news item link is opening on homepage instead own page

Post by Per Yngve Berg » Sat Apr 13, 2019 1:58 pm

You have to turn off SEF to see what is really going on.

User avatar
MediaFish
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 104
Joined: Wed Jun 15, 2011 1:33 pm
Contact:

Re: Module news item link is opening on homepage instead own page

Post by MediaFish » Sat Apr 13, 2019 2:07 pm

Thanks,

When I click the link in the menu it goes to:
/index.php?option=com_content&view=article&id=135&Itemid=612

When I click the link in the module it goes to:
/index.php?option=com_content&view=article&id=135:ocean-milebuilding-passage-lanzarote-to-portugal&catid=27&Itemid=101

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30819
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Module news item link is opening on homepage instead own page

Post by Per Yngve Berg » Sat Apr 13, 2019 2:29 pm

Different Menu Item, 101 versus 612.

User avatar
MediaFish
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 104
Joined: Wed Jun 15, 2011 1:33 pm
Contact:

Re: Module news item link is opening on homepage instead own page

Post by MediaFish » Mon Apr 15, 2019 6:48 am

Hi

Thanks,

Yes 101 is menu item home and 612 is the menu item where the article is linked to. That is the whole problem the link opens in the home page as I described in the initial question - but why does it do that and not open in 612 where it is supposed to.

User avatar
MediaFish
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 104
Joined: Wed Jun 15, 2011 1:33 pm
Contact:

Re: Module news item link is opening on homepage instead own page

Post by MediaFish » Mon Apr 15, 2019 8:07 am

SOLVED:

My menu items were all set to language: English
I changed them to language: All

Now it works perfectly and the links of the menu item and Newsflash are them same.

So if you have one language installed always set language to all but never to the language installed - quite strange - but I tested it on a multi lingual site and there it does work when the menu items show the relevant language...

Thanks to all.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30819
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Module news item link is opening on homepage instead own page

Post by Per Yngve Berg » Mon Apr 15, 2019 4:42 pm

Check that the Language Filter Plugin is disabled.

User avatar
MediaFish
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 104
Joined: Wed Jun 15, 2011 1:33 pm
Contact:

Re: Module news item link is opening on homepage instead own page

Post by MediaFish » Mon Apr 15, 2019 5:11 pm

Hi,

I tested the following (A & B are not working the rest is working as they should):

A)
With Language Filter: Disabled
All Menu items are set to language: English (UK)
URL Routing: Legacy

->NewsFlash Module creates the weird URL's as mentioned above.

B)
With Language Filter: Disabled
All Menu items are set to language: English (UK)
URL Routing: Modern
Remove IDs from URLs: Yes

->NewsFlash Module creates URL using the article title and does not work

C)
With LanguageFilter: Disabled
All Menu items are set to language: All
URL Routing: Modern
Remove IDs from URLs: Yes (also works with articles that have no menu item)

->NewsFlash Module creates the correct URL's

D)
With LanguageFilter: Disabled
All Menu items are set to language: All
URL Routing: Legacy (leaves a number before articles without menu item)

->NewsFlash Module creates the correct URL's

E)
With Language Filter: Enabled
Remove URL Language Code: Yes (also works with No but then with the language code ending)
All Menu items are set to language: English (UK)
URL Routing: Modern
Remove IDs from URLs: Yes (also works with articles that have no menu item)

->NewsFlash Module creates the correct URL's

F)
With Language Filter: Enabled
Remove URL Language Code: Yes (also works with No but then with the language code ending)
All Menu items are set to language: English (UK)
URL Routing: Legacy (leaves a number before articles without menu item)

->NewsFlash Module creates the correct URL's


Locked

Return to “General Questions/New to Joomla! 3.x”