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.

CommentFileSizeAuthor
#5 301611.patch722 bytessimon georges

Comments

coltrane’s picture

jchuck5612’s picture

Category: bug » feature

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);
	}
}
coltrane’s picture

Category: feature » bug

I think this is a bug, so reclassifying.

coltrane’s picture

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.

simon georges’s picture

Version: 6.x-1.0 » 6.x-1.2
Category: feature » bug
Status: Active » Needs review
StatusFileSize
new722 bytes

Actually, when Views paths have no associated menu entry (just paths), there is no $menu_item['title'], but there is a $menu_item, so drupal_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.

asb’s picture

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?