Project:Click HeatMap
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:boombatower
Status:needs work

Issue Summary

All links in scrips doesn't support language prefix in url (example: http://localhost/en/modules/click_heatmap/clickheat/click.php?s=...)

Comments

#1

I fix it by replacing function 'click_heatmap_footer' with this one:

/**
* Implementation of hook_footer().
*/
function click_heatmap_footer() {
  global $base_url;
  if (click_heatmap_display()) {
    drupal_add_js(
      "clickHeatSite = '". variable_get('site_name', 'Drupal Click Heatmap') ."';
      clickHeatGroup = '". click_heatmap_get_url() ."';
      clickHeatServer = '".$base_url.'/'.drupal_get_path('module', 'click_heatmap') ."/clickheat/click.php';
      initClickHeat();",
      'inline', 'footer');
    return '<script type="text/javascript" src="'. base_path() . drupal_get_path('module', 'click_heatmap') .'/clickheat/js/clickheat.js"></script>'."\n";
  }
}

#2

I am at Drupalcon and do not have access to a developement computer. I will work on this once I return home this weekend.

#3

Status:active» fixed

I made the necessary changes for the 5.x and 6.x branches.

Use the new release 2.3.

#4

Assigned to:Anonymous» boombatower

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#6

Version:5.x-2.2» 6.x-2.5

I have the same problem with D6.

clickHeatServer = '". click_heatmap_remove_language_prefix(url(drupal_get_path('module', 'click_heatmap') ."/clickheat/click.php", array('absolute' => TRUE))) ."';

return

clickHeatServer = 'http://www.webstrat.sites/all/modules/click_heatmap/clickheat/click.php';

instead of

clickHeatServer = 'http://www.webstrat.fr/sites/all/modules/click_heatmap/clickheat/click.php';

#7

Status:closed (fixed)» active

#8

Version:6.x-2.5» 6.x-2.x-dev
Status:active» postponed (maintainer needs more info)

Not sure what is going on there. I enabled french and paths and such and went to http://d6x.loc/fr and if I comment out:

<?php
return str_replace('/' . $language->prefix . '/', '/', $url);
?>

then I see:
var clickHeatServer = 'http://d6x.loc/fr/sites/default/modules/click_heatmap/clickheat/click.php';

and if I uncommented I get:
var clickHeatServer = 'http://d6x.loc/sites/default/modules/click_heatmap/clickheat/click.php';

I have not changed anything related to this bit, but please try running dev. It would appear you do not have a language prefix set thus it is only removing '/'.

I will change:

<?php
if ($language->prefix != '') {
?>

to
<?php
if ($language->prefix) {
?>

#9

Wonderfull Jimmy,
This problem is solved by the dev release.

Thanks
Sylvain

#10

Status:postponed (maintainer needs more info)» fixed

Ok, great.

#11

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#12

Status:closed (fixed)» active

There is still a problem with the language prefix.

If under "Site configuration » Languages" the option "Path prefix with language fallback." is selected, the prefix (e.g. "/de") is added to the path.

The Option "Reports » Click heatmap" then is linked to "/de/admin/reports/click_heatmap". Clicking the link does not redirect to the Click heatmap report page -- instead a "Page not found" error is displayed.

I have encounterd this problem with the versions 6.x-2.6 and 6.x-2.x-dev (2009-Oct-21) of Click HeatMap.

#13

Status:active» needs review

function click_heatmap_log_view() calls url() to set the src path for the iframe - need to set 'language' => FALSE in the $options array for url().

function click_heatmap_log_view() {
  $url = url(drupal_get_path('module', 'click_heatmap') . '/clickheat', array('absolute' => TRUE, 'language' => FALSE));
  print theme('click_heatmap_report', $url);
}

#14

Here's the patch file.

AttachmentSize
click_heatmap.patch 586 bytes

#15

Status:needs review» needs work

The patch does not apply. Also see http://drupal.org/patch/create as they should be relative to the module root, not the directory above (I compensated when attempting to apply).

nobody click here