Advertisement

Acceptance of relative URLs for iFrame wrappers in menu items

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
Jefferson49
Joomla! Intern
Joomla! Intern
Posts: 57
Joined: Sun Sep 11, 2022 11:07 am

Acceptance of relative URLs for iFrame wrappers in menu items

Post by Jefferson49 » Sun Oct 13, 2024 9:35 am

While using iFrame wrappers in menu items, I frequently use relative URLs, i.e. a relative path to the main Joomla URL. I have been using this for many years and it is still active and working in some of my J3/J4/J5 installations.

In two of my recent J4.4.8 installations, I cannot manage to enter relative URLs any more. Any time I enter a relative URL, I get a warning message; or "http://" is added to the URL.
warning iframe URL without http.JPG
In the "Advanced" tab of the menu items, there is a button to switch on/off autoadding of "http://". However, this seems to have no influence.
URL http auto add.JPG
Is there anything else which needs to be configured to allow relative URLs? E.g. in the global configuration? Any tricks how relative URLs can be entered?
You do not have the required permissions to view the files attached to this post.

Advertisement
User avatar
AMurray
Joomla! Master
Joomla! Master
Posts: 10258
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Acceptance of relative URLs for iFrame wrappers in menu items

Post by AMurray » Sun Oct 13, 2024 9:45 pm

I think you're missing the leading forward slash ("/") so the value should be "/myfolder/index.php".

Refer to https://docs-next.joomla.org/help/menu- ... e-wrapper/ which seems to confirm this.

From what I understand, the "prefix URL" toggle will then add the http://yoursite.com part to the URL or alternatively the https:// if using SSL.
Regards - A Murray
General Support Moderator

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44657
Joined: Sat Apr 05, 2008 9:58 pm

Re: Acceptance of relative URLs for iFrame wrappers in menu items

Post by Webdongle » Sun Oct 13, 2024 9:58 pm

Yes a full url(i.e. including the domain with or without http://) must be used for iframe menu item type. This includes internal url's

It's menu item type System Links >>> URL ... that relative links can be used.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

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

Re: Acceptance of relative URLs for iFrame wrappers in menu items

Post by AMurray » Sun Oct 13, 2024 10:09 pm

Is the documentation mentioned above wrong then as it speaks of relative URLS.
https://docs-next.joomla.org/help/menu-items/menu-item-iframe-wrapper/ wrote:URL. Field to enter a URL (web page address.
Generally, it is a good idea to always add http:// or https:// when providing a URL. There is a Auto add function to prefix a URL with http:// unless it detects the prefix in the URL. NOTE - Use the relative path to a web page address on Joomla installation. If your Joomla! website is http://www.example.com, then use /html_docs/example.html omitting http://www.example.com and make sure the 'Auto add' function is disabled.
...or am I misunderstanding what that is saying?
Regards - A Murray
General Support Moderator

Jefferson49
Joomla! Intern
Joomla! Intern
Posts: 57
Joined: Sun Sep 11, 2022 11:07 am

Re: Acceptance of relative URLs for iFrame wrappers in menu items

Post by Jefferson49 » Mon Oct 14, 2024 4:10 am

AMurray wrote: Sun Oct 13, 2024 9:45 pm I think you're missing the leading forward slash ("/") so the value should be "/myfolder/index.php".
I tried with and without forward slash. Neither works. In my existing J3/J4/J5 installations, I inserted relative URLs without a slash and it is working.

AMurray wrote: Sun Oct 13, 2024 9:45 pm From what I understand, the "prefix URL" toggle will then add the http://yoursite.com part to the URL or alternatively the https:// if using SSL.
The "Auto Add" toggle in the "Advanced" tab only adds "http://" or "https://"

Jefferson49
Joomla! Intern
Joomla! Intern
Posts: 57
Joined: Sun Sep 11, 2022 11:07 am

Re: Acceptance of relative URLs for iFrame wrappers in menu items

Post by Jefferson49 » Mon Oct 14, 2024 4:16 am

AMurray wrote: Sun Oct 13, 2024 10:09 pm Is the documentation mentioned above wrong then as it speaks of relative URLS.
https://docs-next.joomla.org/help/menu-items/menu-item-iframe-wrapper/ wrote:URL. Field to enter a URL (web page address.
Generally, it is a good idea to always add http:// or https:// when providing a URL. There is a Auto add function to prefix a URL with http:// unless it detects the prefix in the URL. NOTE - Use the relative path to a web page address on Joomla installation. If your Joomla! website is http://www.example.com, then use /html_docs/example.html omitting http://www.example.com and make sure the 'Auto add' function is disabled.
...or am I misunderstanding what that is saying?
My understanding is also that it deliberately uses relative URLs. Like mentioned in the the documentation, it really makes sense for the maintenance of the Joomla installation to use relative URLs if the path lies within the Joomla installation folders. For example, it enables to move the whole installation to a different folder or a different server without changing the iFrame wrapper URLs.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44657
Joined: Sat Apr 05, 2008 9:58 pm

Re: Acceptance of relative URLs for iFrame wrappers in menu items

Post by Webdongle » Mon Oct 14, 2024 4:29 am

Jefferson49 wrote: Mon Oct 14, 2024 4:16 am ...
My understanding is also that it deliberately uses relative URLs. Like mentioned in the the documentation, it really makes sense for the maintenance of the Joomla installation to use relative URLs if the path lies within the Joomla installation folders. For example, it enables to move the whole installation to a different folder or a different server without changing the iFrame wrapper URLs.
If you changed server the full url would be the same because changing server or folder does not change the domain name.

As I said previously the iframe menu item requires a full url
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

Jefferson49
Joomla! Intern
Joomla! Intern
Posts: 57
Joined: Sun Sep 11, 2022 11:07 am

Re: Acceptance of relative URLs for iFrame wrappers in menu items

Post by Jefferson49 » Tue Oct 15, 2024 4:38 pm

Webdongle wrote: Mon Oct 14, 2024 4:29 am If you changed server the full url would be the same because changing server or folder does not change the domain name.
Well, a typical use case for me is to prototype a Joomla site on a local machine. If everything is setup, I move the site to a remote server with a public address. In this case, the URL changes and it is very helpful if the iFrame URLs do not have to be changed.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44657
Joined: Sat Apr 05, 2008 9:58 pm

Re: Acceptance of relative URLs for iFrame wrappers in menu items

Post by Webdongle » Tue Oct 15, 2024 5:44 pm

ok I tried
http///index.php/typography and it saved but prefixed with http://
According to
https://docs.joomla.org/Help5.x:Menu_It ... orm_Fields relative url's should be allowed
NOTE - Use the relative path to a web page address on Joomla installation. If your Joomla! website is http://www.example.com, then use /html_docs/example.html omitting http://www.example.com and make sure the 'Auto add' function is disabled.
So either the docs are incorrect or the error message is wrong but the http/// saves with the add http:// setting ignored.

Looks like something is wrong
https://issues.joomla.org/ would be a good place to post it

Addendum
Have started a tracker https://issues.joomla.org/tracker/joomla-cms/44262
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44657
Joined: Sat Apr 05, 2008 9:58 pm

Re: Acceptance of relative URLs for iFrame wrappers in menu items

Post by Webdongle » Sat Oct 19, 2024 5:34 pm

Tracker has been closed because there is a PR.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

Advertisement

Post Reply

Return to “Administration Joomla! 4.x”