This issue was reported by @AlfTheCat in #906846: Support the Features module API to allow bundling of CKEditor's visibility settings :

Tentatively setting this back to 'needs work', for the committed patch does work on activating a feature manually, but after my extensive efforts to get this to work in an installation profile I can report that automated install fails.

My steps / info:

- My install profile enables/ installs a few features, the first one includes the new ckeditor dev version and an export of general, default and advanced profile. It also includes IMCE, which is set as the default filebrowser in the export.

- My install profile reverts all features at the end

- In my .profile file, I have tried enabling both ckeditor and imce before the features are enabled but to no avail.

- The feature containing the ckeditor export appears as overridden after install and only when I revert it manually the ckeditor profile settings are propagated.

Hope this helps and my thanks in advance for any guidance on this.

Comments

alfthecat’s picture

subscribing

iaminawe’s picture

subscribing

circuscowboy’s picture

I have the same problem. I would like to be able have these settings work from my install profile feature but it keeps on getting overridden. Any one have any insite? I am currently trying this on drupal 7.

alfthecat’s picture

Hey circuscowboy,

My solution to use features to setup WYSIWYG functionality during install came with the patch (#31) in this queue: #1060846: Exportables and Features support for 6.x. Mind you, this is for the wysiwyg module, I had to abandon the Ckeditor module. However, I do use ckeditor via the wysiwyg module. Also, the patch is for drupal 6 and I haven't tested #624018: Exportables and Features support for WYSIWYG 7.x which is for D7 to see if that one works on install too. The latter off course is the one you want.

In my case, I must add, I needed to export my wysiwyg settings to a separate feature. Including the code in features that also perform other tasks made it fail to setup wysiwyg.

Hope this helps!

Tarch’s picture

StatusFileSize
new609 bytes

Hi,
I think that the problem you have is due to the problem corrected by the attched patch.
The function to get the defaults is called "directly" instead of calling the features_get_default() function. The call to module_invoke was failing because the module containing the function that returns the default was not included before invoking it.

Hope it helps,
Best regards,
Tarch.

mkesicki’s picture

Status: Active » Needs review

@Tarch thank you for patch.

ndeschildre’s picture

StatusFileSize
new548 bytes

The source of the problem is that the module 'ckeditor' is a 'faux-exportables' module (as defined in API.txt of the features modules), meaning that the default features stored in code are also being stored in the database. (That is at least what ckeditor_profile_features_revert(), which writes on DB, implies).

To handle faux-exportables, there is another hook that is needed to be implemented: hook_features_rebuild().

So the following patch allows the import to work:

 }
 
 /**
+ * Implementation of hook_features_rebuild()
+ */
+function ckeditor_profile_features_rebuild($module) {
+  ckeditor_profile_features_revert($module);
+}
+
+/**
  * Implementation of hook_features_revert()
  */
 function ckeditor_profile_features_revert($module) {

EDIT: That is a Drupal 7 patch.

ndeschildre’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

(Hopefully not highjacking the D6 patch... I'll create a separate report if so).

mkesicki’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev

@ndeschildre please create new topic with your patch and description. I change this ticket back to 6.x version.

ndeschildre’s picture

You're fast, I like it :)
See http://drupal.org/node/1504398
Thx