Download & Extend

Fatal error: Call to undefined function language_initialize()

Project:Click HeatMap
Version:6.x-2.5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi,

After extracting library into module directory and doing everything exactly as specified in readme file got:
Fatal error: Call to undefined function language_initialize() in C:\wamp\www\d6test1\sites\all\modules\click_heatmap\click_heatmap.module on line 149

Drupal 6.3, Click Heatmap 2.5
Windows XP, wamp

Comments

#1

sorry :) commented out that function.

#2

Status:active» postponed (maintainer needs more info)

So is there still a bug?

#3

Status:postponed (maintainer needs more info)» needs review

This is still a bug. The attached patch fixes the problem (and removes some trailing whitespace).

AFAICT the problem is that in click_heatmap_remove_language_prefix() we're tryingto call the function language_initialize() which may not be available.

Looking through drupal_init_language() in bootstrap.inc, language.inc is only included if the site uses two or more languages.

The fix in this patch simply includes language.inc in click_heatmap_remove_language_prefix().

AttachmentSize
click_heatmap.patch 2.04 KB

#4

This is definitely a bug for sites only using one language.

I have done what I think is a cleaner fix to just check the number of languages, no need to do anything in the function click_heatmap_remove_language_prefix() if there is only the one language in use (and I've left the whitespace fixes from the previous patch)

AttachmentSize
click_heatmap.module.patch 2.46 KB

#5

Status:needs review» fixed

Committed.

Thanks.

#6

Status:fixed» closed (fixed)

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

nobody click here