Closed (fixed)
Project:
Drupal core
Version:
8.1.x-dev
Component:
ckeditor.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Jun 2016 at 22:33 UTC
Updated:
2 Aug 2016 at 14:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
maskedjellybeanComment #3
maskedjellybeanComment #4
wim leersCKEditor explicitly doesn't allow that:
Source: http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Styles
So, that means our validation is insufficient. Nice catch!
Here's a patch that adds the necessary validation. Now the only thing that's still necessary, is test coverage.
Comment #5
Orizontal commentedTesting this issu
Comment #6
Orizontal commentedComment #7
bohemier commentedTesting with Orizontal @DrupalNorth
Comment #8
Orizontal commentedComment #9
Orizontal commentedWe applied the patch: cke_styles_unique_name_validation-2749475-4.patch and we reproduce the issue. We did received a validation error: Each style must have a unique label. We did change the style label to use unique label. Now we can apply the style to the list. The validation is working. We did verify that the html style are working when inspecting the generated html. Nothing much to do with core gates.
Comment #10
penyaskitoThanks for testing it, @Orizontal and @bohemier!
Looks like the behavior is as expected, next action would be adding an automated test for ensuring it.
Comment #11
penyaskitoI think this is a Normal bug according to https://www.drupal.org/node/45111, not a Minor.
Comment #12
wim leersThanks for testing & confirming!
Comment #13
wim leersThis would be a great issue for a new contributor to work on at DrupalDevDays Milan!
Updated the issue summary for clarity.
So what still needs to be done is adding test coverage, at
\Drupal\ckeditor\Tests\CKEditorStylesComboAdminTest. You can look at\Drupal\ckeditor\Tests\CKEditorAdminTestfor examples — you should be able to reuse significant parts :)(It needs to be a separate test because this is not testing the overall CKEditor configuration UI, but only one particular plugin's settings form. This then sets the right example for contrib modules.)
Comment #14
wim leersComment #15
thpoul commentedSince drupaldevdays is over and this is a bug report for 8.1.x, I thought this should get moved forward. Here are the test-only and the full patch. Hopefully it's on the right track based on #13
Comment #17
wim leersAgreed! Thanks :)
Comment #18
wim leersLet's use
$this->randomMachineName().$this->randomString()Do we really need both of these? I think just one will do.
s/object/config entity/
Comment #19
thpoul commentedThank you for the review Wim, here is the updated patch.
+1
Comment #20
wim leersThanks! Found another few nits, but those don't need to block commit.
Missing
{@inheritdoc}.These can be removed IMO.
Comment #22
thpoul commentedUnrelated test failure back to RTBC
Comment #23
thpoul commentedAnd here are the nits trying to make the life easier to our beloved committers!
Comment #25
wim leersRandom fails in upgrade path tests. Retesting. Back to RTBC.
Comment #26
alexpottCommitted and pushed f2d19d2d2bee3229fd0730af4fb95ace4d5de3ad to 8.2.x and a6b370b to 8.1.x. Thanks!