Hello,

When exporting a profile with Drush, the 'input_formats' data will be partially missing.
It is due to the export function which calls:

function ckeditor_profile_load($name = '', $clear = FALSE) {

and the code inside this function does not gather all data:

        $input_formats = filter_formats($user);
        $result = db_select('ckeditor_input_format', 'f')->fields('f')->execute();
        foreach ($result as $data) {
            if (isset($input_formats[$data->format])) {
                $profiles[$data->name]->input_formats[$data->format] = $input_formats[$data->format]->name;
            }
        }

filter_formats($user) will limit the loading of the input formats to the one allowed to the user. But when you export via drush, you have no rights, so the exported list of input_formats is not complete.

Comments

ndeschildre’s picture

A patch here is more difficult to do, as this function is used at many places, is expected to only load the input formats allowed to the current user, and the results are static cached.
Ideally, a _load function return shouldn't differ depending to the user, so the real clean thing to do would be to make 'filter_formats($user)' into 'filter_formats()', and to make the callers of this ckeditor_profile_load to take care of the permissions. Or a sub-function, e.g. ckeditor_profile_load_complete(), would fetch all data, and ckeditor_profile_load() would call it and remove the input formats not allowed by the current user... but then it should be renamed..

Well, up to you to see.