Closed (fixed)
Project:
Drupal core
Version:
8.1.x-dev
Component:
config.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2015 at 13:05 UTC
Updated:
2 Jun 2016 at 15:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
chi commentedI am not convinced what error message we should display in this case. Exception message is not translatable I guess.
Comment #3
dawehnerDo you think we can write some simple test coverage for that case? The fix itself makes totally sense for me. Maybe we could catch like all exceptions, but that seems to be details.
Comment #4
alexpottYep we can definitely test this. Plus I don't think the main part of the message should be the exception message. We need something that can be translated.
Comment #5
dawehnerYeah, we should say its an invalid YML file, but I think we should still include the exception message, given that it contains more information that might be helpful.
Comment #6
chi commentedComment #7
chi commentedComment #8
chi commentedWrong reference.
Comment #9
dawehnerNitpick: We could name the method to point out that we deal with an invalid YML here
Comment #10
chi commented@dawehner, this form does not have any tests at all. This is why I decided to give the method more generic name. We should add more cases there.
Added todo statement for this.
Comment #11
dawehnerOH yeah, this is a good idea.
Comment #12
alexpott@Chi this test belongs in
Drupal\config\Tests\ConfigSingleImportExportTestand the @todo is unnecessary.Comment #13
chi commented@alexpott, correct. That file with UITest suffix confused me. I thought it is the only file with UI tests.
Comment #14
dawehnerAh good to see that we have actual test coverage. My inner alexpott would have been disappointed by the outer alexpott.
Comment #15
alexpottI think that this message, whilst technically correct, is not the most user friendly. Have we even told the user that yaml is the expected format of the string yet?
Comment #16
chi commentedWhat about
The import failed with the following message: %message?Comment #17
alexpott@Chi looks good to me
Comment #18
chi commentedComment #20
chi commentedFixed test.
Comment #22
lendudeFeedback from @alexpott in #15 is addressed and we have tests and a fix. Looks good to go.
Comment #23
alexpottCommitted 037962e and pushed to 8.1.x and 8.2.x. Thanks!