Use case: (see also https://drupal.org/node/1216224#comment-7477170)
Create a filter format
Create a ckeditor profile (or modify an existing one) that is assigned to the above format
Export both of these things to a feature
Enable the feature on a clean install
The ckeditor profile is imported, but it no longer has the assignment to it's input format. That is because if the format does not exist when the ckeditor profile is created, the ckeditor_input_format row is removed from the db. If the format does exist, it's fine.
Current workaround is to maintain two features - one with the input format, the other with the ckeditor profile - and use module dependencies to ensure the correct order.
Comment | File | Size | Author |
---|---|---|---|
#6 | ckeditor-ckeditor_features_format-2043365-6.patch | 1.64 KB | Danny_Joris |
#2 | ckeditor-ckeditor_features_format-2043365-2.patch | 1.36 KB | erik.erskine |
Comments
Comment #1
erik.erskine CreditAttribution: erik.erskine commentedComment #2
erik.erskine CreditAttribution: erik.erskine commentedIn
ckeditor_profile_features_revert()
, we delete fromckeditor_input_format
if the filter doesn't exist:Is this necessary? Do the extra rows in the
ckeditor_input_format
do any harm? On a fresh install of ckeditor the Advanced and Full profiles are assigned tofiltered_html
andfull_html
respectively, even if these formats don't exist (eg with a minimal install).I would suggest taking the above check (and delete) out and have attached a patch to do that.
Thoughts welcome - does removing this have any ill effects?
Comment #3
erik.erskine CreditAttribution: erik.erskine commentedComment #4
mathieso CreditAttribution: mathieso commentedErik,
I had the same problem, and removing the DELETE fixed it. Thnx for the tip.
Kieran
Comment #5
Danny_Joris CreditAttribution: Danny_Joris commentedPatch #2 works great, but I need to add an additional (imo) hack to my feature for a smooth install. I need to remove the default profiles fully before the ones in the feature can applied properly. If there's a better solution I'd love to know.
In my case my ckeditor profiles in features needed a manual revert after a fresh site-install (my feature is part of an install profile), plus after that the 'full' ckeditor profile would still be misconfigured as to work with the 'full html' text formatter. In my feature it wasn't set to anything, so I'd manually have to unset that.
Comment #6
Danny_Joris CreditAttribution: Danny_Joris commentedScrap the hack in #5 - I updated Erik's patch (#2), so that when it encounters a ckeditor profile with no input formats assigned (empty array), it removes that profile from the 'ckeditor_input_format' table. Please review.
Comment #7
VladSavitsky CreditAttribution: VladSavitsky commentedI tested patch ckeditor-ckeditor_features_format-2043365-6.patch and it solves problem. Thanks.
Comment #8
jcisio CreditAttribution: jcisio commentedComment #9
joelstein CreditAttribution: joelstein commentedThe patch in #6 works for me. With it applied, I can have a CKEditor profile and Text Format in the same feature, and when enabling it, the CKEditor profile is connected to the correct text format. Thanks!
Comment #11
wwalc CreditAttribution: wwalc commentedCommitted, thanks!