textsize breaks maintanance-theme due to use of path_to_theme in hook_init()

mrfelton - March 17, 2009 - 22:38
Project:Text Size
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Please see for full details of the problem: http://drupal.org/node/374645

In summary: You can not use path_to_theme() in hook_init().

#1

Christian Zwahlen - March 18, 2009 - 13:12
Status:active» fixed

Should be fixed.

#2

System Message - April 1, 2009 - 13:20
Status:fixed» closed

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

#3

jsaints - April 23, 2009 - 22:21
Status:closed» needs work

This is still a bug. Just tested today. I think it was changed to closed by mistake.

#4

Christian Zwahlen - May 12, 2009 - 15:08

#5

Christian Zwahlen - May 13, 2009 - 22:28
Status:needs work» fixed

#6

System Message - May 27, 2009 - 22:30
Status:fixed» closed

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

#7

dkruglyak - May 28, 2009 - 01:01
Status:closed» needs review

Please note the problem with this fix as described here: http://drupal.org/node/399694

Moving the code out of hook_init does not work, since other modules might not be loaded when they are needed (e.g. jquery_plugin).

I am not sure about the solution as new to this module, but there should be a way to use hook_init, while avoiding its limitations.

#8

mrfelton - September 17, 2009 - 08:25
Status:needs review» needs work

Agreed. This is not the correct solution. Moving these functions to the end of the module file causes other problems such as

It seems that path_to_theme() is not even used anymore in textsize.module, so I think it's safe to move these functions back into hook_init(). I can confirm that in doing so, the maintenance theme once again works correctly.

#9

Christian Zwahlen - September 17, 2009 - 18:08
Status:needs work» fixed

Moved back to hook_init().

#10

System Message - October 1, 2009 - 18:10
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.