Fatal error: Call to undefined function language_initialize()

PlayfulWolf - August 5, 2008 - 19:47
Project:Click HeatMap
Version:6.x-2.5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

#1

PlayfulWolf - August 5, 2008 - 20:52

sorry :) commented out that function.

#2

boombatower - August 5, 2008 - 21:51
Status:active» postponed (maintainer needs more info)

So is there still a bug?

#3

wulff - November 1, 2008 - 09:04
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

univate - April 5, 2009 - 06:52

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

boombatower - April 7, 2009 - 07:03
Status:needs review» fixed

Committed.

Thanks.

#6

System Message - April 21, 2009 - 07:10
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.