Posted by edward.peters on August 29, 2008 at 4:19pm
| Project: | Clickpath |
| Version: | 6.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
This is a FANTASTIC module! Thanks so much. I notice that it only stores the paths of page views, and if a page display of a View is visited, a blank line appears in the list of recent pages. It would be great if pages which were full Views page displays could be stored too.
Comments
#1
#399008: Use menu_get_item() instead of drupal_get_title() may solve this
#2
I don't know if this is applicable in all situations but I was able to get my view paths recognized using the following code. I am just beginning my Drupal development experience so I assume there is a lot wrong here but for now it's working.
Replaced:
$title = _clickpath_path_is_frontpage($path) ? t('Home') : $menu_item['title'];With:
if (_clickpath_path_is_frontpage($path) == t('Home')) {$title = t('Home');
}
else {
$title = $menu_item['title'];
if(empty($title)) {
$title = ucwords($path);
}
}
#3
I think this is a bug, so reclassifying.
#4
Give the patch at #399008: Use menu_get_item() instead of drupal_get_title() a try and see if Views paths appear correctly. I'll try here soon if I can.
#5
Actually, when Views paths have no associated menu entry (just paths), there is no
$menu_item['title'], but there is a$menu_item, sodrupal_get_title()is not used.I've managed to fix the bug using the following patch
$menu_item = menu_get_item($path);$title = !empty($menu_item['title']) ? $menu_item['title'] : drupal_get_title();
Thanks to the folks on #399008: Use menu_get_item() instead of drupal_get_title() for their work !
=> This patch should fix #399008: Use menu_get_item() instead of drupal_get_title() & #275777: Duplicate Clicks and Clear Clicks.
#6
I'm confused... does 301611.patch include or supercede the mentioned patches from #399008 and #275777?
Maybe someone could roll a new release, of the whole module, with all recent patches, please?