Direct link to a Article in Joomla 4.4.3 Topic is solved

Need help with the Administration of your Joomla! 4.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
Posmatrac
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 23, 2016 5:51 pm

Direct link to a Article in Joomla 4.4.3

Post by Posmatrac » Sat Feb 24, 2024 7:22 pm

Hello Community,

i have a Problem with Articles. I need a Direct Link to a Articel in Joomla 4.4.3

For Example in Joomla 3.10.12 the Link to a Article was:

Code: Select all

https://www.mydomain.com/index.php?option=com_content&view=article&id=XXX
On Joomla 3.10.12 this work, but when i try the Link under Joomla 4.4.3 always opens the start page.

Is there a solution for Joomla 4.4.3? I have read that i can create a menu and make it invisible, but unfortunately this is not a solution for me, because I need the direct link.

Kind regards
Posmatrac

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9732
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Direct link to a Article in Joomla 4.4.3

Post by AMurray » Sat Feb 24, 2024 9:21 pm

You would need to create a menu item link. Why won't a hidden menu item work for you?

Try this, to obtain the 'raw' URL.

Create the menu item. Fill in all the details, and save.

In the Menu Item (Details) screen you will see the partial URL in the "link" field something like "index.php?option=com_something&view=XX". Copy and paste that, and append it to the site's domain name like

Code: Select all

www.yoursite.com/index.php?option=com_something&view=something.
That, as fas as I know is as direct a link as you can get. You would see the same style of URL if you turned off SEF URLS in global configuration.

Without further explanation as to why, this is the only solution I can give you.
Regards - A Murray
General Support Moderator

Posmatrac
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 23, 2016 5:51 pm

Re: Direct link to a Article in Joomla 4.4.3

Post by Posmatrac » Sat Feb 24, 2024 10:26 pm

Because I need this link to use it elsewhere on the site. Since the article is always changing, the link is also always changing.

And I would always have to do this via the menu, which makes things a bit more complicated. Under Joomla 3.10 it also worked without a menu.

But I will try out what you said.

zzz412
I've been banned!
Posts: 10
Joined: Wed Feb 21, 2024 5:03 pm

Re: Direct link to a Article in Joomla 4.4.3

Post by zzz412 » Sat Feb 24, 2024 10:47 pm

Code: Select all

https://www.mydomain.com/index.php?option=com_content&view=article&id=XXX
works for me in Joomla 4 without a hidden menu item. I do not know why this opens the start page and not the article on your website.

Posmatrac
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 23, 2016 5:51 pm

Re: Direct link to a Article in Joomla 4.4.3

Post by Posmatrac » Sat Feb 24, 2024 10:54 pm

Well, I tried it via the menu. And the same link comes up.

index.php?option=com_content&view=article&id=XXX

and if I put my domain in front of it, it throws me back to the start page ...

Posmatrac
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 23, 2016 5:51 pm

Re: Direct link to a Article in Joomla 4.4.3

Post by Posmatrac » Sat Feb 24, 2024 10:56 pm

it does not work for me @zzz412

zzz412
I've been banned!
Posts: 10
Joined: Wed Feb 21, 2024 5:03 pm

Re: Direct link to a Article in Joomla 4.4.3

Post by zzz412 » Sat Feb 24, 2024 11:26 pm

Check the file configuration.php: the line that says

Code: Select all

$live_site = ...
What do you have on that line?

Posmatrac
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 23, 2016 5:51 pm

Re: Direct link to a Article in Joomla 4.4.3

Post by Posmatrac » Sat Feb 24, 2024 11:46 pm

Nothing. The Line is empty

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17435
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Direct link to a Article in Joomla 4.4.3

Post by toivo » Sun Feb 25, 2024 3:09 am

Posmatrac wrote:
Sat Feb 24, 2024 11:46 pm
Nothing. The Line is empty
That is the correct setting. There is no need to change that.

Does this website have some security software that could interfer or redirect the perfectly legitimate link to the home page? Do those articles have Public permissions, rather than Registered or above?
Toivo Talikka, Global Moderator

Posmatrac
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 23, 2016 5:51 pm

Re: Direct link to a Article in Joomla 4.4.3

Post by Posmatrac » Sun Feb 25, 2024 8:18 am

I only use a total of 3 components on my website.

Akeeba Backup
Admin Tools
BreezingForms

I think it can only be Admin Tools that is causing problems.

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2673
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Direct link to a Article in Joomla 4.4.3

Post by ceford » Sun Feb 25, 2024 9:26 am

What happens if you use the CMS Content / Article button in the Tiny MCE editor to select an article? For me the code in the source article comes out like this:

Code: Select all

<a href="index.php?option=com_content&amp;view=article&amp;id=80&amp;catid=2">No Menu for Me</a>
And the link in the article does take me to the article which has no menu item. I have SEF urls so in the front end the link comes out as this:

Code: Select all

<a href="/joomla-cms5/testing-home-1/no-menu-for-me.html">No Menu for Me</a>
Oops - that is Joomla 5. But it works for Joomla 4 too. Here is a sample input and rendered output (multi-lingual):

Code: Select all

<a href="index.php?option=com_content&amp;view=article&amp;id=7&amp;catid=2">No Menu for Me</a>
<a href="/j44/en/allcategories-en-gb/uncategorised/no-menu-for-me.html">No Menu for Me</a>

Posmatrac
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 23, 2016 5:51 pm

Re: Direct link to a Article in Joomla 4.4.3

Post by Posmatrac » Sun Feb 25, 2024 10:33 am

@ceford

It happens exactly the same as yours. But I just need this link here:

Code: Select all

index.php?option=com_content&amp;view=article&amp;id=XX&amp;catid=X
When I try to access it, I am thrown to the start page. If I do it like you, then it also works for me, i.e. create a menu item.

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2673
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Direct link to a Article in Joomla 4.4.3

Post by ceford » Sun Feb 25, 2024 2:00 pm

I don't need to create a menu item! Can you give us your site url?

Edit: I created a new category for which there is no menu item (category blog or category list). I assigned my test article to that category and made a link in the source article. It still works. The source link and output link look like this:

Code: Select all

<a href="index.php?option=com_content&amp;view=article&amp;id=7&amp;catid=12">No Menu for Me</a>
<a href="/j44/en/allcategories-en-gb/no-menu/no-menu-for-me.html">No Menu for Me</a>

Posmatrac
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 23, 2016 5:51 pm

Re: Direct link to a Article in Joomla 4.4.3

Post by Posmatrac » Sun Feb 25, 2024 3:22 pm

Unfortunately not. The site is local on my computer via XAMPP.

I think it has something to do with this error coming from Admin Tools:

Code: Select all

 Admin Tools for Joomla! - An unhandled Exception has been detected 500 Invalid controller class: urlredirections

File &lt;root&gt;\libraries\src\Dispatcher\ComponentDispatcher.php Line 174 
This error Message comes when i go ro Admin Tools an URL Directions.

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2673
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Direct link to a Article in Joomla 4.4.3

Post by ceford » Sun Feb 25, 2024 5:59 pm

What happens if you disable Admin Tools? Do the links work then?

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

Re: Direct link to a Article in Joomla 4.4.3

Post by Per Yngve Berg » Sun Feb 25, 2024 7:17 pm

This is expected behaviour. When you don't specify a Menu Item, the Default one (Home Page) will be used.

Add "&Itemid=xx" to the URL with xx=ID of Menu Item to use.

With SEF URL: www.yoursite.com/Alias of Menu Item/Alias of Article

Create a Menu Item of type
Single Article for use.

Posmatrac
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 23, 2016 5:51 pm

Re: Direct link to a Article in Joomla 4.4.3

Post by Posmatrac » Sun Feb 25, 2024 9:28 pm

ceford wrote:
Sun Feb 25, 2024 5:59 pm
What happens if you disable Admin Tools? Do the links work then?
It's the same. I have upgraded this site from Joomla 3.10 to Joomla 4.4.3. On a fresh installation of Joomla 4 or Joomla 5 there is no problem with the direct links.
Per Yngve Berg wrote:
Sun Feb 25, 2024 7:17 pm
This is expected behaviour. When you don't specify a Menu Item, the Default one (Home Page) will be used.

Add "&Itemid=xx" to the URL with xx=ID of Menu Item to use.

With SEF URL: www.yoursite.com/Alias of Menu Item/Alias of Article

Create a Menu Item of type
Single Article for use.
Does that mean I really have to generate a menu item for each article? But it worked on Joomla 3 without menu items ...

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

Re: Direct link to a Article in Joomla 4.4.3

Post by Per Yngve Berg » Sun Feb 25, 2024 10:22 pm

No, only one. The Article in the URL override the one in the Menu Item.

Posmatrac
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 23, 2016 5:51 pm

Re: Direct link to a Article in Joomla 4.4.3

Post by Posmatrac » Sun Feb 25, 2024 10:41 pm

Okay. I'll give it a try. Thank you

Posmatrac
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 23, 2016 5:51 pm

Re: Direct link to a Article in Joomla 4.4.3

Post by Posmatrac » Tue Feb 27, 2024 9:18 pm

Thank you very much @Per Yngve Berg for your tip with

&Itemid=xx

It works great. I did it exactly as you said > Menu item - Single Articel > Select Article. And no matter when I change the Article ID the link always works.

Code: Select all

https://www.mydomain.com/index.php?option=com_content&view=article&id=123&Itemid=1
Thanks again to you and the others for the valuable tips.


Post Reply

Return to “Administration Joomla! 4.x”