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 |
Jump to:
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
Should be fixed.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.
#3
This is still a bug. Just tested today. I think it was changed to closed by mistake.
#4
Should now fixed http://drupal.org/node/443404#comment-1574630
#5
#6
Automatically closed -- issue fixed for 2 weeks with no activity.
#7
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
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
Moved back to hook_init().
#10
Automatically closed -- issue fixed for 2 weeks with no activity.