?
avatar reboot-sequence
reboot-sequence
6 Jul 2017

Steps to reproduce the issue

Create an external URL menu item and attempt to view it (I get 404s instead of being redirected to the URL configured).

  1. Log into Joomla as Joomla Administrator (on /administrator URL).

  2. In the Menus menu go to > 'All menu items'

  3. On the Menus screen select 'New +'

  4. Type/fill in 'Menu Title', 'Alias', choose a 'Menu *' from ' - Select Menu -' drop-down (I chose 'joomla' as the alias).

  5. On Menu Item Type * (click ☰ Select)

  6. Select 'System Links' from options list

  7. In the Menu Item Type dialog select System Links and 'External URL An external or internal URL.'

  8. On the 'Menus: New Item' screen type/fill in the 'Link' (I chose http://www.joomla.org-- any working URL is good for testing).

  9. Hit 'Save' button at top.

  10. In your browser go to url: <yoursite.ftw>/joomla (or alias you chose step 4)

I am getting a 404 on all 3 sites I have on Joomla 3.7.3

Expected result

Browser navigates to External URL set in the menu.

Actual result

404 on Joomla Instance

System information (as much as possible)

Joomla 3.7.3 on PHP 5.5 on LNMP stack-- SEF is turned on.

Additional comments

Was working in past 3.5.x? Possibly due to router/JRoute updates?

I tried some older patches I found on the web for mod_menu helper to no avail so far:
https://developer.joomla.org/joomlacode-archive/issue-26880.html

avatar reboot-sequence reboot-sequence - open - 6 Jul 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Jul 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Jul 2017

@reboot-sequence thanks for reporting Issue – can't confirm.

Set an external Link on http://www.joomla.org works as expected.

System information

3.7.4-dev (latest nightly build)
Multilanguage Site
macOS Sierra, 10.12.5
Firefox 54 (64-bit)

MAMP 4.1.1

  • PHP 7.0.15
  • MySQLi 5.6.35
avatar reboot-sequence
reboot-sequence - comment - 6 Jul 2017

Thanks Franz.

I wonder if the 3.7.3 vs 3.7.4 makes a difference? All 3 of my Joomla instances are doing this.

I checked to see if https vs http made a difference and it didn't. I've got a pretty crappy work around going in my templates 404 error.php file to keep my site working til I figure out why the 404s:

//check missed External URLs
$qUrl = ltrim(rtrim(strtolower($_SERVER['REQUEST_URI']), '/'), '/');

$db = JFactory::getDbo();
$query = $db->getQuery(true);

$conditions = array(
$db->quoteName('alias') . " = " . $db->quote($qUrl),
$db->quoteName('type') . ' = ' . $db->quote('url'),
$db->quoteName('published') . ' = 1' );

$query
->select(array('alias', 'link'))
->from($db->quoteName('#__menu'))
->where($conditions);

$db->setQuery($query);
$results = $db->loadAssoc();

/*

echo('');

*/

if( $results != null ) {
if( array_key_exists( 'link', $results ) )
{
$allDone = JFactory::getApplication();
$allDone->redirect( $results['link'] );
exit();
}
}


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17006.
avatar reboot-sequence
reboot-sequence - comment - 6 Jul 2017

FWIW all three sites use different default templates. A few are GavickPro products.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17006.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 7 Jul 2017

Same Result using fresh installed 3.7.2. Have you tried using Protostar?

avatar Quy
Quy - comment - 7 Jul 2017

@franz-wohlkoenig Did you do step 10 or clicked the link on the frontend?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 7 Jul 2017

@Quy i missed Step 10, i clicked on Menu-Link. Typing alias manually get 404 Component not found.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 7 Jul 2017

Whats the benefit of typing url instead using Menu?

avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Jul 2017
Status New Discussion
avatar infograf768
infograf768 - comment - 7 Jul 2017

External urls do not use the alias in the url produced when clicking on the menu item title.
The url produced IS the Link itself.

screen shot 2017-07-07 at 09 29 33

The alias is there as it has to be unique.
Therefore this is expected behavior.

Closing as not a bug.

avatar infograf768 infograf768 - change - 7 Jul 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-07-07 07:32:14
Closed_By infograf768
avatar infograf768 infograf768 - close - 7 Jul 2017
avatar reboot-sequence
reboot-sequence - comment - 11 Jul 2017

Ahhh, sorry for the delay this is in a hidden menu so a clicking on a link is not an option here...

I see it works if the menu is is being output to html but not when in a hidden menu; sorry for missing this important detail. Dropping the alias isn't an option as I want to use the alias to get to the external URL (that I am putting into the menu item).

What's the correct way to do this in Joomla? Effectively a hidden menu item takes you off your Joomla site? Is there a way without using the Redirects section?

Add a Comment

Login with GitHub to post a comment