Ckeditor options disabled on Rules creation
When trying to create a rule, the buttons of the ckeditor are disabled.
To reproduce this you have to:
1.- Install drupal 7
2.- Install rules and rules_admin modules
3.- Install wysiwyg module with ckeditor
4.- Install media and media_wysiwyg modules
5.- Install workflow and workflow_admin_ui and workflow_rules
6.- Go to admin/config/content/formats and put the format "Full HTML" on top
7.- Go to admin/config/content/formats/full_html add check the option "Convert Media tags to markup"
8.- Go to admin/config/content/wysiwyg and add the ckeditor profile to "Full HTML" and add several buttons to the profile, including "Media browser"
Then:
When I go to Configuration > Workflow > Rules
And I click on Add new rule
And I fill in the following values:
_ name: "test"
_ React on event: "Node - Before saving a node"
And I click on Save
And I click on "Actions - Add action"
And I Select the action to add: "Data - Set a data value"
And I fill in the DATA Data selector with: "node:body"
And I click on Continue
Then on the page Editing action "Set a data value" I expect to be able to use the CKeditor features in the Value field
But most features are grayed out and none of them are working
Comment | File | Size | Author |
---|---|---|---|
#2 | add-js-library-3039731-1.patch | 471 bytes | enriquelacoma |
|
Comments
Comment #2
enriquelacoma CreditAttribution: enriquelacoma at NTT DATA commentedThis can be fixed by adding the media_wysiwyg.filter.js file
Comment #3
joseph.olstadhi Enriquelacoma, can you please help me understand this issue better?
could you try reproducing this with the media_dev distribution, it uses media_wysiwyg.
does your patch work correctly when 'not' using the rules module?
both with and without rules?
would like to make sure this fix doesn't cause a regression.
Comment #4
enriquelacoma CreditAttribution: enriquelacoma at NTT DATA commentedHi joseph
I have run these tests with the media profile, using the 7.x-2.x
Enable the rules and rules ui modules
.- In this case the result is the same when creating a rule without the patch, with the patch the ckeditor buttons are enabled.
.- With the patch applied, we can use the ckeditor when creating content
Disable the rules and rules ui modules
.- With the patch applied, we can use the ckeditor when creating content
.- Without the patch, we can use the ckeditor when creating content
Comment #5
Andras_Szilagyi CreditAttribution: Andras_Szilagyi commentedI installed media_dev
Then I installed rules and rules_admin modules
Then I install workflow and workflow_admin_ui and workflow_rules
Go to admin/config/content/formats and put the format "Full HTML" on top
Go to admin/config/content/formats/full_html, "Convert Media tags to markup" option was checked
Go to admin/config/content/wysiwyg and add the ckeditor profile to "Full HTML" and added all buttons to the profile
Then I followed add rule process from issue description "When I go to Configuration > Workflow > Rules.."
I found features are grayed out and none of them are working.
Then I applied path form #2, issue was fixed, buttons / features are working.
Then I disabled rules, when visiting pages with wysiwyg all buttoons and features are working.
Then I followed instructions as in description, issue was reproduced and fixed by patch.
Comment #6
Andras_Szilagyi CreditAttribution: Andras_Szilagyi commentedComment #10
joseph.olstadfixed in the dev branch
Comment #12
joseph.olstadthis change caused a minor regression.
#3074774: PHP Notice while editing a node
Comment #13
ayalon CreditAttribution: ayalon commentedThis fix breaks WYSIWYG Editor with media inserts.
The issue is, that the Javascript File for the filter is added on the end of the function:
// Add filter handling.
$element['#attached']['js'][] = drupal_get_path('module', 'media_wysiwyg') . '/js/media_wysiwyg.filter.js';
Every WYSIWYG CKEditor with the media button for inline images will break, if you edit an existing node because the the $field['#value'] is not empty. I strongly recommend refactoring or reverting the patch.
Uncaught TypeError: Cannot read property 'replaceTokenWithPlaceholder' of undefined
at Object.attach (wysiwyg-media.js?pxm9sh:77)
at CKEDITOR.htmlDataProcessor.toHtml (ckeditor-3.0.js?pxm9sh:168)
at $.setData (ckeditor.js?pxm9sh:934)
at $. (ckeditor.js?pxm9sh:375)
at a.m (ckeditor.js?pxm9sh:10)
at a. (ckeditor.js?pxm9sh:12)
at a.CKEDITOR.editor.CKEDITOR.editor.fire (ckeditor.js?pxm9sh:13)
at a.setData (ckeditor.js?pxm9sh:277)
at b (ckeditor.js?pxm9sh:930)
at Object.wysiwyg (ckeditor.js?pxm9sh:932)
Comment #14
Andras_Szilagyi CreditAttribution: Andras_Szilagyi commentedHi @ayalon,
I cant reproduce, could you provide some steps?
Thank you.
Comment #15
joseph.olstadIf you're having configuration issues with the media module, I've added a new sub module/feature that provides working default configuration
Try the latest release of media and if your media embedding is unsatisfactory, try the new sub module which shows up in the 'User interface' group of modules.
I have provided one of these modules for those using the wysiwyg module (the settings module is in the media project) and another one for those using the ckeditor module (that settings module /feature is in the media_ckeditor project latest version)
When in doubt, check with the latest media recipe for installation/configuration and troubleshooting instructions.
Comment #16
joseph.olstad