Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I noticed that adding/editing (CKEditor) images on admin area loads in bootstrap theme files (css and js). I don't see any bug reports related to that.
Current configuration: subtheme, cdn, checked out from git.
Comment | File | Size | Author |
---|
Comments
Comment #2
Pierrere CreditAttribution: Pierrere as a volunteer commentedTrying to add images actually does not work, here are the errors. They are generated for any sub- and the base-theme.
Here is a video of the symptoms: YouTube Video
Drupal 8.0.0 with CKeditor version (8.0.0 - the onboard one)
Bootstrap 8.x-3.0-alpha1 and 8.x-3.x-dev (Nov. 21st 2015)
Comment #3
xlyz CreditAttribution: xlyz commentedComment #4
xlyz CreditAttribution: xlyz as a volunteer commentedafter some investigation looks like image is correctly uploaded, but then ckeditor plugin is not able to set the img tag attributes with the image data, in spite of the fact that ajax request and response are exactly the same than using any core theme (that does work).
thare are also a couple of span elements that should not be there.
Comment #5
xlyz CreditAttribution: xlyz as a volunteer commentedpatch to remove span elements
Comment #6
xlyz CreditAttribution: xlyz as a volunteer commentedunsetting bootstrap_form_process for editor_image_dialog form seems to fix this issue. not sure if this can cause other problems.
patch included.
Comment #7
xlyz CreditAttribution: xlyz as a volunteer commentedComment #8
xlyz CreditAttribution: xlyz as a volunteer commentedoops. there was an empty() missing. correct patch attached.
Comment #9
Pierrere CreditAttribution: Pierrere as a volunteer commentedPatch in #5 cleans up the image dialogue and works well.
Patch in #8 works, I can insert images with CKeditor's dialogue on admin interface and inpage-quickedit. Experienced no other problems so far, will report back if something comes up
(I had to apply it manually as neither "git apply" nor "patch -p1" would patch my file, but that might be an error on my side, don't read too much into it yet)
Patched against the dev version, but from the structure of the patches itself, I'd say they should work on any D8 Bootstrap version.
Quick work "xlyz"
Thanks
Comment #10
markhalliwellThis will definitely need work after I'm finished with #2624420: Restructure code into OO (see the 8.x-OOP branch if you're curious). However, I suspect I'll need to do the work once that's merged. I'll take a look at this once it's done.
Comment #11
dangreen CreditAttribution: dangreen as a volunteer commentedThis patch comments out an unnecessary ‘use’ statement as well as a
preprocess that makes adding inline images impossible.
- Crypt was not being used, so I commented it out
- There is a problem with setting `$element['#process’][]`
After making these changes I can upload images normally.
Comment #12
markhalliwellThe patch in #11 will not be committed. That removes all form element processing.
Comment #13
markhalliwellFixed this as part of #2628530: Introduce a proper Update API.
The subsequent portion of that commit is: http://cgit.drupalcode.org/bootstrap/diff/src/Plugin/Alter/ElementInfo.p...
Essentially, if the $type === 'form', don't add anything since it messes up all AJAX callbacks (not just this particular case).