Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
rest.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Jan 2015 at 21:20 UTC
Updated:
17 Feb 2016 at 18:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
clemens.tolboomComment #3
clemens.tolboomAdded String import
Comment #5
clemens.tolboomComment #7
clemens.tolboomDarn .
Comment #9
clemens.tolboomThis is probably partly solved through #2405091: Cannot create user entities - {"error":"Access denied on creating field pass"}
I need to check the other throw.
Comment #10
clemens.tolboomPatch needed a reroll due to https://www.drupal.org/node/2405091.
I still don't get the failure in
What is wrong with the expectedExceptionMessage?
Comment #12
clemens.tolboomI completely missed $format was set to NULL so we need to use the 'raw' CONTENT_TYPE instead.
Comment #13
klausiI think the String class is gone, so we need to use SafeMarkup instead.
Otherwise makes sense to me.
Comment #14
joelpittetFor other exceptions in core we just use sprintf(). Simple but effective;)
Comment #15
clemens.tolboomThis doesn't cover #13
Should we use this?
Comment #16
sudhanshug commentedImplemented
SafeMarkup::format().Comment #18
sudhanshug commentedSorry for the previous patch.
Comment #19
sudhanshug commentedComment #20
zealfire commentedThe latest patch only includes the class of SafeMarkup but does not makes use of it. I think we still need to decide whether we should make use of SafeMarkup or make use of patch submitted in #14.
Comment #21
sudhanshug commentedI think that I uploaded some old patch. Attached is the latest one and implements
SafeMarkup::format().Comment #23
sudhanshug commentedWas able to solve one error but still one more error persists here:
Line 99 of core/tests/Drupal/Tests/Core/Routing/ContentTypeHeaderMatcherTest.phpCan somebody help with that?
Comment #24
sudhanshug commentedComment #26
chx commentedThe %s gets converted to a placeholder. Perhaps you wanted to use sprintf ? Check for example core/lib/Drupal/Core/DependencyInjection/ClassResolver.php .
Comment #27
chx commentedRe #15
We use sprintf.
Comment #28
berdirActually, we use neither these days, just use plain string concatenation.
Comment #29
wim leers#2659070: REST requests without Content-Type header: unhelpful response significantly hinders DX, should receive a 415 response is closely related.
Comment #30
wim leersComment #31
berdirLooks good.
Comment #33
catchCommitted/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!