configuration page gone after call from module_invoke
ludo1960 - October 12, 2009 - 18:57
| Project: | Text Size |
| Version: | 6.x-1.4 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | fixed |
Jump to:
Description
Hello Christian,
I called text size and page style into a block using the code below, surprise surprise it worked!
<?php
$block1 = (object) module_invoke('textsize', 'block', 'view', '0');
$block2 = (object) module_invoke('pagestyle', 'block', 'view', '0');
print theme('block',$block1);
print theme('block'.$block2;
?>However when I went to configure text size in the admin/block page all the options ie display inline etc were gone, same with Page style. So I deleted the new block I created, then I disabled and re-enabled the text size and page style modules. Still no options (other than the basic drupal otions) on the configure pages! Then I thought I'll remove the modules and re-install. So i disabled the modules but when I went to the module removal page neither were listed as availbale for removal!
Yikes what have I done?
Ludo...

#1
Can you tell me reasons of this practice? And where is this code placed?
#2
Hi Christian,
Problem solved. I created a "combo" block with both your modules called using module_invoke as PHP code. If I access the modules from admin/build/block page I get a configuration page without options, but if I access the modules from the admin menu module directly, voila there are the options. Guess calling module_invoke messes the the Drupal menu system somehow!
Sorry to bother you, hope this helps somebody else.
Many thanks again for your time and your modules.
Regards,
Ludo...
#3
Hi Ludo,
So, you say "Problem solved."