Page 1 of 1

[LOW:KNOWN ISSUE:1.0.11] Custom pathway does not work unless Itemid is set

Posted: Thu Sep 07, 2006 10:53 am
by ekorn
appendPathway() has no effect if the URL does not specify Itemid. This is because pathway.php checks for the existence of Itemid before outputting anything at all. This is a problem for custom components which make their own pathway without relying on the Joomla menu structure. In my case, I do this because category-like classification is taken from a large, existing database, so it's cumbersome to make menu entries for everything.

Some might call this a feature rather than a bug, arguing that Itemid is at the heart of Joomla's navigation system as detailed in http://forum.joomla.org/index.php?topic=83148.0
However, what is the point of appendPathway() if not to provide a workaround for classified content which does not fit into a menu system?

I think it would be reasonable if showPathway() checked for the existence of Itemid OR custom pathway elements, and humbly suggest that this be incorporated into future versions.

Description:
[USER] Customizing the pathway with appendPathway() has no effect on the printed HTML unless Itemid is set.

Reported on:
[USER] Joomla 1.0.11

Classification:
[Q&T] Critical/High/Medium/Low/Enhancement

Affected functions:
[USER] showPathway() is the culprit; calls to appendPathway() are ignored.

Related files:
[USER] includes/pathway.php

Steps to replicate:
[USER]
Clean install of Joomla 1.0.11
For demonstration purposes only, hack components/com_content/content.html.php by setting line 435 to
$mainframe->appendPathWay('TEST');
Navigate to any news item from the default menu structure. The pathway will say TEST.
Now delete the Itemid= part from the URL. The pathway does not appear.

Analysis:
[Q&T] Confirmed/Unable to confirm/Rejected
Any other comments

Proposed fix(es):
[USER]
Change line 322 of includes/pathway.php to
if ( $mainframe->getCustomPathWay() || ( $Itemid && $Itemid != 99999999 ) ) {
// Was: if ( $Itemid && $Itemid != 99999999 ) {

Re: Custom pathway does not work unless Itemid is set

Posted: Thu Sep 07, 2006 12:42 pm
by diri
Nice try! :)

But, there are more issues involved:

Did you try to create a correct sitemap as well?

Due to J!'s dependency on ItemID and menu entries it fails to fullfill some of most basic tasks of a CMS (show user where he is and where he can go) when you don't create a real bunch of faking menu entries even when core functionalities are used. Sad but true.

cu, diri

Re: Custom pathway does not work unless Itemid is set

Posted: Thu Sep 07, 2006 12:57 pm
by ekorn
diri wrote: Did you try to create a correct sitemap as well?
Not as such, but the component lists all "groups" if nothing else is specified, all "subgroups" if only a "group" is specified, etc. (Based on an if-then construct in the component code, applying different database queries and Smarty templates depending on the task.) This basically duplicates the tasks that Joomla does automatically based on Itemid.

In this particular case, I do not desire a single-page site map of all my items.

Re: Custom pathway does not work unless Itemid is set

Posted: Fri Sep 08, 2006 10:23 am
by Robin
[TAGGED: Q&T] Status > Under review

Re: [LOW:UNDER REVIEW:1.0.11] Custom pathway does not work unless Itemid is set

Posted: Wed Nov 15, 2006 8:44 pm
by Robin
Q&T Note; sent feedback/question to dev-list.

Re: [LOW:UNDER REVIEW:1.0.11] Custom pathway does not work unless Itemid is set

Posted: Thu Nov 16, 2006 6:14 am
by Robin
Feedback from developers is that in basic 1.0.12 will be a stability release, such a fix also leans towards a feature request. There are also other effects to take in account such as unwanted changes due to the Itemid issue(s). Report will be closed as known issue/limitation.