piwikjapan/plugin-clickheat

ClickHeat redirects to Dashboard

Opened this issue · 9 comments

I Install ClickHeat Plugin in Piwik , But when clicking on it the page redirects to Dashboard.
Please Help.
Thanks

Hello,
Same issue here, as I said in the piwik forum, by pressing esc I stopped the redirect and saw I had to insert a JS in my pages, but after this, this still doesn't work. No redirect, but no image either (the cache directory is empty).

Hi,

yes, similar issue here... stopping even earlier... the escape doesn't work for me at all...

UPDATE:

ok, escape worked now... will update if I face same issue as Arvi89 after installation...

same issue.

Yes, I have same issue.

Yes, I´ve the same issue. Has anyone a patchwork / workaround?

Up.
Same issue, plus if I esc the page renders to the other commonly reported error of

Fatal error: Class 'Piwik_ClickHeat_Controller' not found in /[INSTALL PATH]/plugins/ClickHeat/libs/layout.php on line 18

I have the same issue.
I found a fix for this with the post of fvdm : #4 (comment)
Thanks to him !

Redirecting to the Dashboard when no clicks have yet been recorded is very confusing in my opinion, is this the expected behaviour?

https://issues.matomo.org/attachments/5493/piwik-clickheat-fix-redirect-to-dashboard-bug.patch

--- ClickHeat/Controller.php.orig	2012-08-03 15:07:15.449002296 +0200
+++ ClickHeat/Controller.php	2012-08-03 14:54:19.192001798 +0200
@@ -202,9 +202,9 @@
 	{
 		$group = isset($_GET['group']) ? str_replace('/', '', $_GET['group']) : '';
 		$conf = self::conf();
+		$webPage = array( CLICKHEAT_PATH . 'clickempty.html' );
 		if (is_dir($conf['logPath'].$group))
 		{
-			$webPage = array('/');
 			if (file_exists($conf['logPath'].$group.'/url.txt'))
 			{
 				$f = @fopen($conf['logPath'].$group.'/url.txt', 'r');
@@ -214,8 +214,8 @@
 					fclose($f);
 				}
 			}
-			echo $webPage[0];
 		}
+		echo $webPage[0];
 	}
 
 	function javascrip