Environment is Clean local MAMP install with Drupal CKEditor 7.x-1.13
[Note: I've also done the same tests on a remote LAMP server with same issue appearing, so I hope that makes my local MAMP environment less suspect! ;-) ]
Browsers: can repro in latest Firefox, Chrome and Safari
Have tried with latest Standard CKEditor library and config.allowedContent = true;
Have tried with older (3.x) CKEditor library.
1. With no additional modules except CKEditor enabled, add a new node, set to use Full HTML text format.
Click on CKEditor's IMAGE icon --> image dialog comes up (as expected)
2. Enable Picture 7.x-1.2 (and dependencies)
3. Open CKEditor's "Full" profile (admin/config/content/ckeditor/edit/Full)
Tick "Support responsive images with the Picture module"
Save the profile
4. Add another new node, set to use Full HTML text format.
Click on CKEditor's IMAGE icon --> no image dialog box appears, but screen dims and freezes up as if it was about to display one.
Firefox console output:
TypeError: Drupal.settings.picture is undefined
plugin.js:64
Safari's console output:
[Error] TypeError: 'undefined' is not an object (evaluating 'Drupal.settings.picture.label')
(anonymous function) (plugin.js, line 64)
i (ckeditor.js, line 10)
(anonymous function) (ckeditor.js, line 12)
dialog (ckeditor.js, line 514)
openDialog (ckeditor.js, line 560)
(anonymous function) (ckeditor.js, line 561)
o (ckeditor.js, line 214)
q (ckeditor.js, line 214)
s (ckeditor.js, line 214)
(anonymous function) (ckeditor.js, line 215)
Chrome's console output:
Uncaught TypeError: Cannot read property 'label' of undefined plugin.js?t=DBAA:64
(anonymous function) plugin.js?t=DBAA:64
i ckeditor.js?n1sinp:10
CKEDITOR.event.CKEDITOR.event.fire ckeditor.js?n1sinp:12
CKEDITOR.dialog ckeditor.js?n1sinp:514
CKEDITOR.tools.extend.openDialog ckeditor.js?n1sinp:560
(anonymous function) ckeditor.js?n1sinp:561
o ckeditor.js?n1sinp:214
q ckeditor.js?n1sinp:214
s ckeditor.js?n1sinp:214
(anonymous function) ckeditor.js?n1sinp:215
Comment | File | Size | Author |
---|---|---|---|
#26 | fix-ckeditor-hanging-on-configuration-miss-2208567-26.patch | 904 bytes | junaidpv |
Comments
Comment #1
frost CreditAttribution: frost commentedNote: I can't tell if this is a Picture or CKEditor issue, if anyone can advise how I could narrow the causes of this more, I'd appreciate it.
Comment #2
frost CreditAttribution: frost commentedComment #3
attiks CreditAttribution: attiks commentedDid you try the latest dev version?
Comment #4
inescubo CreditAttribution: inescubo commentedSame issue, did you solve it?
Comment #5
attiks CreditAttribution: attiks commentedDid you define picture mappings?
Comment #6
frost CreditAttribution: frost commented@attiks Re: Dev, I assume you are talking specifically about the dev release of the Picture module? I think I tried it in Dev, but unfortunately can't remember, since I was trying various combinations of releases of Ckeditor module, Ckeditor library, Picture, Breakpoints etc.
I know that I followed the "Note for CKEditor 4.1+ users" on the CKEditor module page when using the latest CKEDitor library release, but also tried an older library release.
Re: Picture Mappings, I following instructions on Picture docs page.
@inescubo No, I ran out of time on that project, so I went with responsive images & styles instead. Would prefer to use Picture etc but used up too much project time trying to solve this issue already.
If I have time after my current project I will try to repro this again using Dev of Picture module and will update this issue with full details of the versions of relevant modules and the steps to repro the issue.
Comment #7
frost CreditAttribution: frost commentedOk I've set up a new test environment and tried this again. I can repro this issue with a very plain Drupal setup:
I'm using the latest full release of all modules, except that I'm using the latest dev of Picture
Using latest CKEditor standard library (ckeditor_4.3.1_standard.zip)
1. Log in as Admin
2. Enable Picture, CTools, Breakpoints, CKEditor (I'm also enabling Admin menu and Module filter, but nothing else)
3. Test:
Add Content/Article
Change text format to Full HTML.
In Body area, click on Image icon. All is normal.
4. Go into CKeditor configuration for the FULL profile (admin/config/content/ckeditor/edit/Full)
Under Editor Appearance, you will note that "Support responsive images with the Picture module" is already ticked
DON'T CHANGE ANYTHING but SAVE the configuration.
5. Test again: Add Content/Article
Change text format to Full HTML.
In Body area, click on Image icon. The screen locks up
Firefox console says "TypeError: Drupal.settings.picture is undefined"
6. Now remove Picture support from CKEditor config:
Go into CKeditor configuration for the FULL profile (admin/config/content/ckeditor/edit/Full)
UNTICK "Support responsive images with the Picture module"
SAVE the configuration
7. One last Test:
Add Content/Article
Change text format to Full HTML.
In Body area, click on Image icon. All is normal.
So it seems to me there are 2, probably unrelated, issues here:
1. The setting "Support responsive images with the Picture module" is initially not enabled in the database but appears to be enabled from the UI.
2. When the setting is correctly enabled, we get the broken IMAGE icon behaviour previously described.
Comment #8
dflitner CreditAttribution: dflitner commentedI'm also seeing this behavior (broken Image icon). I've tried with release versions of CKEditor & Picture, dev version of both, and release CKEditor and dev Picture. The behavior is the same in all versions.
Chrome says: "Uncaught TypeError: Cannot read property 'label' of undefined" in line 63, column 1
Comment #9
frost CreditAttribution: frost commentedComment #10
frost CreditAttribution: frost commentedAnyone able to solve this? I'm stuck using resp_img until this is working :-(
I'm happy to work with anyone who's trying to resolve this; can supply more debugging info if you tell me what you need.
Comment #11
yingtho CreditAttribution: yingtho commentedWorkaround:
You need to start add breakpoints and then breakpoint groups for the breakpoints you have created. You also need to add some image styles. Then you can see the the breakpoint group in admin/config/media/picture. Click on the group to edit the settings and save the settings.
After that you have to the CKEditor tab to change the settings enable it for CKEditor. Now CKEditor will open without error.
Comment #12
frost CreditAttribution: frost commentedThanks for that @yingtho. I tried as you suggested, and also had to edit the Picture CKEditor settings here:
/admin/config/media/picture/ckeditor
Once I did that (I just ticked the box to include my picture group), the Image dialog worked, and allowed me to choose my image style group.
This is a usable workaround.
(I'm leaving status as it is, since this is still a bug)
Comment #13
attiks CreditAttribution: attiks commentedComment #14
hmartens CreditAttribution: hmartens commentedYou can't close this issue because someone found a work around...it's not "works as designed"...
I'm also having the exact same issue...please help.
Comment #15
Jelle_SThese steps should work for now. The plugin needs at least one group enabled for ckeditor. We'll look for a solution.
Comment #16
hmartens CreditAttribution: hmartens commentedThanks I'll try and also imlement this workaround and see how it goes.
Appreciate the help!
Comment #17
andrew smith CreditAttribution: andrew smith commentedThis is not a workaround so much as a glaring omission in the documentation; to clarify...
...go to admin/config/media/picture/settings - providing you've set up a picture mapping as per the instructions - and tick "include [picture mapping name] in the CKEditor image dialog", otherwise the image button won't work.
Comment #18
Renee S CreditAttribution: Renee S commentedThanks, @andrew smith, this indeed did it for me. Siiigh :)
Comment #19
Rob de Koter CreditAttribution: Rob de Koter commentedThank you yingtho and Andrew Smith I was getting desperate.
I used the Picture module a few times, I will try to make a YouTube video explaining how to set up the picture module next week.
Comment #20
frost CreditAttribution: frost commentedFYI, I put up a three part screencast about a year ago explaining how to set this up. Forgot to post link here, so here it is:
https://vimeo.com/92537789
Comment #21
attiks CreditAttribution: attiks commentedFeel free to add this to the documentation or provide a patch to fix it.
Comment #22
emmonsaz CreditAttribution: emmonsaz as a volunteer commentedAnother gotcha that took me awhile to figure out: for wysiwyg/ckeditor integration you also need to go to /admin/config/content/formats and for each format enable the Make images responsive with the picture module filter
Comment #23
mermentau CreditAttribution: mermentau as a volunteer commentedI ran up against this problem after upgrading to Picture 7.x-2.11 and used the work around to get it going. After that I did find pretty good documentation has been added here. I'm thinking this could be closed now.
Comment #24
attiks CreditAttribution: attiks commentedComment #25
Chimos CreditAttribution: Chimos commentedI followed the steps in documentation, as suggested, but I still found them uncomplete and therefore they drove me to this issue. I missed those two points in the docs:
data-picture-align
anddata-picture-mapping
), and when editing again that node, ckeditor content filter deletes those attributes at some point.To avoid that:
img [ data-picture-align, data-picture-mapping ];
to allow those two attributes for
img
tags.I hope this helps
Comment #26
junaidpvI don't think it is good thing for code to throw error if some configuration is missing.
Why not it add JS settings anyway even if mappings is empty as in attached patch?