In previous versions of tiki wiki, the alias of a page would show as the pagetitle for that page (assuming pref enabled to do so), but now the pagetitle is the pagename and not the page alias.
workaround below.
Modified block at line 360 in lib/breadcrumblib.php
changing the code from
} else { $ret .= htmlentities(tra($crumbs[$len-1]->title), ENT_QUOTES, 'UTF-8').'</a>'; }
to
} else { //see if page has alias and if so, set it as title //structure path contains pages and their aliases global $structure_path; //store if alias found $found_alias = false; //current page name $cur_page = $crumbs[$len-1]->title; //for each item in structure path foreach ($structure_path as $crumb){ //if it is the current page if($crumb['pageName'] == $cur_page){ if ($crumb['page_alias'] != "" ){ $ret .= htmlentities(tra(($crumb['page_alias']))).'</a>'; $found_alias = true; } } } if (!$found_alias){ $ret .= htmlentities(tra($crumbs[$len-1]->title), ENT_QUOTES, 'UTF-8').'</a>'; } }
Note:
This change affects the following:
When tiki loads the page, calls breadcrumblib to generate the page title, and it says "return the crumb object's title attribute" (which is pageName), this code says "before returning the title attribute, check if the page has an alias and if it does return that instead". A better approach might be to fix wherever the title attribute is being generated, and set it to the alias, if that doesn't cause problems for other things.
The code here is the same between tiki 11 and 10 (may want to verify), meaning that this is not the actual cause of the problem (as the regression appears in tiki 11). However, other changes have been made to the file, and I didn't have the time to hunt down the central issue and then test to make sure modifying it wouldn't mess with those other changes, so I just duct taped it here.
To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.
Unable to connect to show.tikiwiki.org. Please let us know of the problem so that we can do something about it. Thanks.
filename | created | hits | comment | version | filetype | ||
---|---|---|---|---|---|---|---|
No attachments for this item |