Fatal error if forum.module is included in a install profile
asimmonds - July 7, 2007 - 12:29
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | forum.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Description
If I include forum.module in a install profile, I get:
Fatal error: Call to undefined function taxonomy_save_vocabulary() in .\modules\forum\forum.install on line 20
doing a fresh install.

#1
Does this occur if you also include the Taxonomy module in the profile, and place it before Forum in the array? Making installation profiles.
The profile install system could use the same dependency checking that manually enabled modules get. Perhaps it could begin installing modules in the order of dependency rather than in the one specified in the profile... on the other hand, this might be unnecessary overhead.
#2
Taxonomy was already included in the profile, and it doesn't matter where it is located in the array, before or after forum, the error is still received.
One of the ways around this that I can think of, is wrap the taxonomy code in forum_install() in a drupal_load('module', 'taxonomy') call. At this point of the install, the database schema is loaded and the tables have been created so we shouldn't get any table missing errors.
Attached patch uses this method (could also possibly generate a message or log a error if taxonomy module can not be loaded at this point)
#3
This doesn't happen any more, as the vocabulary creation was moved to forum_enable() when http://drupal.org/node/172643 was committed.