?

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
12 Jan 2014

Issue

If the RouteHelper doesn't find a matching Itemid (menu item) for a given article, it will just return nothing.
It should however fall back to the currently active Itemid instead.
This bug basically is a regression from a previous PR #1708. However since the PR itself is good and fixes a valid issue, I don't want to revert it.

Proposed Fix

This PR only takes the fallback code out of the if-else clause in the _findItem() function. The else makes no sense anymore since we always have $needles. With this PR if nothing is found using the $needles, it will return the current active Itemid like it used to be.

Tracker

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33011
Also some discussion on https://groups.google.com/d/topic/joomlabugsquad/-UyLy58q95Y/discussion

avatar Bakual Bakual - open - 12 Jan 2014
avatar Bakual
Bakual - comment - 12 Jan 2014

Btw: This also fixes the same issue for com_weblinks, com_contact and com_newsfeed. Allthough it probably never surfaces there :smile:

avatar gwsdesk
gwsdesk - comment - 13 Jan 2014

@test
Works as expected. Changed status on Tracker to "ready to commit" :)

avatar infograf768 infograf768 - reference | 78d533f - 13 Jan 14
avatar infograf768 infograf768 - merge - 13 Jan 2014
avatar infograf768 infograf768 - close - 13 Jan 2014
avatar infograf768 infograf768 - close - 13 Jan 2014
avatar infograf768 infograf768 - change - 13 Jan 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-01-13 08:17:10
Labels Added: ?
avatar Bakual Bakual - head_ref_deleted - 13 Jan 2014

Add a Comment

Login with GitHub to post a comment