Hello,

Installing a feature module with ckeditor profiles will not make these profiles available: you will have to manually revert the feature to see your profiles.

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) {
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dczepierga’s picture

Title: Import of ckeditor profile features fails, manual revert needed » [D7] Import of ckeditor profile features fails, manual revert needed
Status: Needs review » Fixed

Changes commited to GIT (diff).

Really thx for your patch and help.

Greetings

ndeschildre’s picture

Thanks!

Status: Fixed » Closed (fixed)

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

eXistenZ’s picture

Version: 7.x-1.x-dev » 7.x-1.9
Priority: Normal » Major
Status: Closed (fixed) » Needs work

Hello,

it still seems that even though I am running the patched version of the ckeditor plugin (7.x-1.9), the import of ckeditor profiles via features still fails. People I send my packed feature to complain that that feature breaks their Drupal environment.

What I packed in the feature:
- 2 ckeditor profiles: generic and mywebsite_cms
- access rights: use text format filtered_html, use text format full_html, use text format mywebsite_cms

It makes no difference if I pack all ckeditor profiles in the feature.

After importing in another Drupal environment we found that the profile mywebsite_cms was not created, and Drupal tries to write access rights for that profile that does not exist:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'module' cannot be null: INSERT INTO {role_permission} (rid, permission, module) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 4 [:db_insert_placeholder_1] => use text format mywebsite_cms [:db_insert_placeholder_2] => ) in user_role_grant_permissions() (line 3030 of /srv/http/mywebsite/releases/mywebsite/www/public/modules/user/user.module).
dczepierga’s picture

Priority: Major » Normal
Status: Needs work » Closed (fixed)

@eXistenZ, pls not open closed issue which are fixed (confirmed) does it work and released to stable version.
It could be a lot of reasons why sth not work, so pls open new issue with your bug and if it possible attach your profile or send me PM with it, it will help to check this and fix it asap.

Greetings