Follow-up to #2500527: Rewrite \Drupal\file\Controller\FileWidgetAjaxController::upload() to not rely on form cache
Problem/Motivation
In beta11 it was possible to align images uplaoded in the CKEditor by selecting a radio button in the popin. Since beta12 it is not possible anymore.
Investigation
$ git bisect start 8.0.0-beta12 8.0.0-beta11
At each step, reinstall Drupal standard, login and try to align an image in a page.
Result : 8b4bc7df8f30011a7d6e56d9b575694ee2d29ad7 is the first bad commit
Reverting changes introduced by this commit, the problem comes from the file module.
Steps to reproduce:
- $ git checkout 8b4bc7df8f30011a7d6e56d9b575694ee2d29ad7^
- Install drupal standard
- Login and create a page
- Insert an image in the body with align = right
- the image is aligned in the editor and in the saved content
- $ git checkout 8b4bc7df8f30011a7d6e56d9b575694ee2d29ad7
- Install drupal standard
- Login and create a page
- Insert an image in the body with align = right
- the image is not aligned in the editor nor in the saved content
Beta phase evaluation
Proposed resolution
No idea.
Remaining tasks
Fix that regression.
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #1
StuartJNCC commentedI confirm that align image does not work in beta-14, nor does image caption.
Manually adding the image-align or image-caption tags in the editor source also does not work (they get stripped out on Save), so I suspect it is the filters that are not working as expected.
Comment #2
swentel commentedComment #3
duaelfrI tried to dig a bit more in that issue.
The problem is that in
EditorImageDialog::buildForm(), there is a call toFormStateInterface::getUserInput()that returns different array structure. When you open the Dialog, the$user_input['editor_object']variable contains what's excepted but in the other cases, the expected values are in$user_input['attributes'].That's all for today. I hope that could help someone to continue this fix.
Comment #4
kattekrab commentedThis is also a dupe of #2540850
Comment #5
duaelfrThe issue mentioned in the previous comment is a lot more advanced than this one.