CKEditior breaks installation process in an installation profile. The reason is the use of module_load_include in the hook_requirements implementation of the .install file. System table is not, yet, available when hook_requirements is invoked by an installation profile which breaks module_load_include, which breaks entire installation profile with a violent error.

I am attaching a patch that does a minor change to code: moves module_load_includes under existing:

if ($phase == 'runtime') { .. }

check, since the only code in the hook_requirements implementation is within that "if" statement and you don't need inclusion outside that statement anyway.

This fixes the problem with installation profiles.

As a side note, if I may express my opinion, you should not be using module_load_include for files that belong to the same module. A call like:

require_once (dirname(__FILE__) . '/ckeditor.module');

is both more reliable (would not have given you an error in installation profile) and faster too (since it does not involve a DB lookup).

You only need module_load_include if you are loading files from other modules.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

irakli’s picture

FileSize
706 bytes
irakli’s picture

FileSize
706 bytes

Patch:

mephir’s picture

Status: Active » Fixed

Changes commited to CVS. Thanks for your interest.

Status: Fixed » Closed (fixed)

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