Closed (fixed)
Project:
Bootstrap
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Nov 2015 at 19:50 UTC
Updated:
21 Dec 2015 at 03:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Pierrere 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 commentedComment #4
xlyz 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 commentedpatch to remove span elements
Comment #6
xlyz 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 commentedComment #8
xlyz commentedoops. there was an empty() missing. correct patch attached.
Comment #9
Pierrere 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 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).