Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
filter.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Nov 2014 at 12:45 UTC
Updated:
21 Dec 2014 at 17:43 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
daffie commentedI would like to get this fixed. So I will do a good review for posted patches.
Comment #2
daffie commentedComment #3
daffie commentedComment #4
daffie commentedThe class variables $format, $name and $weight need to become protected.
Comment #5
sharique commentedI've also changed the name for variables, which was specified in todo. Do we need setId function? I think we need it.
Comment #7
daffie commentedI would not rename the class variables. I know there is a @todo is the code. The problem is that renaming a variable will result in a lot of changes. And I have the idea that that will not be allowed (beta changes).
This function is not necessary. You can use the build in function label().
These function are probably not used. Maybe only in testing. You can remove them and use set('name', $value) and set('weight', $value)
Comment #8
rpayanmComment #10
rpayanmRound 1
Comment #12
daffie commentedUse the function id() for this instead of get('format').
Comment #13
rpayanmRound 2
Comment #14
rpayanm@daffie ohhh thank you.
Comment #15
rpayanmComment #25
rpayanmohh god! appear that testbot it's on trouble :(
Comment #27
rpayanmNo rest!
Comment #29
rpayanmComment #31
rpayanmComment #33
rpayanmComment #35
areke commentedComment #38
daffie commentedUse label() instead of get('name'). In the annotation of the FilterFormat class is the variable $name defined as being the label. And the label has its own getter function called label().
After this change it is RTBC for me. Good work ;-)
Comment #39
rpayanmComment #40
daffie commentedAll the class variables are protected.
There are already getter functions available, so no need for new ones.
The test-server give it green.
It all looks good to me, so for me it is RTBC.
Comment #41
alexpottPatch needs to be rerolled... it looks good though.
Comment #44
rpayanmRerolled :)
Comment #45
daffie commentedThe file core/modules/text/src/Tests/TextFieldTest.php was updated. So a reroll was necessary. Also for me RTBC.
Comment #46
alexpottLet's use label() instead.
Comment #47
daffie commentedI thought that the get('name') was replaced by label() in the past. Somehow it got back in. :-(
Comment #48
daffie commentedDouble checked it. The file core/modules/text/src/Tests/TextFieldTest.php was updated. So a reroll was necessary. All the get('name') are gone again.
Comment #49
alexpottCommitted 3ec6348 and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation for to the issue summary.
Comment #51
wim leersThis broke HEAD.
EditorImageDialogstill contains:And because
formatis now a protected property, a fatal error is thrown.I don't know what's preferred: a revert + reroll, or a new issue to fix it.
Comment #52
daffie commented@Wim Leers: How much problems is it giving now?
We need to fix this and add a test to make sure it does not happen again.
Comment #53
daffie commentedSame problem in core/modules/editor/src/Plugin/InPlaceEditor/Editor.php (line 39).
The bug from commend #51 is in file core/modules/editor/src/Form/EditorImageDialog.php (line 51).
Comment #54
wim leersdaffie: it's making it impossible to upload or edit images via CKEditor. So: a big problem.
Comment #55
daffie commentedQuick fix without new tests.
Comment #56
daffie commentedIt is a bit confusing to me when ->format is from the filter_format entity en when it is the property of a text field. So also a patch to only quick fix the bug reported by Win Leers.
Comment #58
wim leers#55 is wrong, #56 is correct. The difference is quite big: just looking for
->formatis not enough. The first hunk in #55 is getting the "format" property on aFilterFormatentity, the second is getting the "format" property on aTextItem.But #56 is never going to be committed here. It needs to be put in its own issue. We no longer do "follow-up commits".
That's why I wrote:
Comment #59
daffie commentedMy idea was that we do it as a followup in this issue. It seams that that is not allowed, so here is the followup: #2389381: Impossible to add images in WYSIWYG including in-place editing due to fatal error
Comment #60
daffie commentedThe issue has been fixed and the followup issue has also been fixed.
Comment #61
yesct commentedI'm not sure why this was opened instead of using #2030641: Expand FilterFormat with methods but I closed that as a duplicate. It is a bit sad that the people who worked on that were not included in this.
Comment #62
yesct commented