Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
serialization.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Nov 2015 at 05:49 UTC
Updated:
8 Aug 2018 at 08:38 UTC
Jump to comment: Most recent
Comments
Comment #2
dawehnerThank you for filing the bug report.
Even this seems to be critical for you, IMHO this is not critical for the Drupal project itself. Just ask yourself whether you would
release Drupal without this bugfix or not. Moving to major as of that.
Regarding the actual, did you tried to specify the path: alias field? Maybe report how you tried to create the content using REST.
Regarding the retrieval, #2539634: PathItem::delete() never runs because the path field type is a computed field in disguise and #2392845: Add a trait to standardize handling of computed item lists are really related bugs. These kind of fields are totally arguable a mess.
Comment #3
daveferrara1 commentedActually I think many projects are going to be affected by this. (if they are going to use REST)
PATHs are critical. REST is whats going to make Drupal 8 amazing. IMHO yeah Drupal 8 is not ready if REST is not usable 100%. REST is basically still in dev. I also noticed Patterns by content type also missing. Maybe that was pathauto that delivers that- IMHO that is also about as important out of the box like permalinks is for wp.
Basically getting a rest export from views, with a list of nodes that do not contain the path back to the node is quite a negative. Nearly useless.
Also, on a POST not getting to set the alias is also silly. Though, probably not that bad since most POSTS will be user data and FOrm submissions.
Also, the SEO negative it would cause if you were displaying a bunch of links to the node id and then also linking to it with the alias.
This POST FAILS:
{
"type": [
{
"target_id": "page"
}
],
"title": [
{
"value": "Hello world example"
}
],
"_links": {
"type": {
"href": "http://d8.ex.com/rest/type/node/page"
}
},
"alias":[
{
"value": "/example"
}
]
}
THIS POST SUCCEEDS BUT - no alias set and a new one - (Does not allow editing of the node after creation by admin) .
{
"type": [
{
"target_id": "page"
}
],
"title": [
{
"value": "Hello world example2"
}
],
"_links": {
"type": {
"href": "http://d8.ex.com/rest/type/node/page"
}
},
"path":[
{
"value": "http://d8.ex.com/example2"
}
]
}
Comment #4
dawehnerWell, conceptually you can fix those bits really after the release, so I would suggest you to just relax a bit. You know, there are bugs everywhere, its just a matter of software.
One interesting point which we have to keep in mind is that what you think is critical for your particular project is not critical in that way for the Drupal project as itself.
Feel free to read more about it on https://www.drupal.org/core/issue-priority
The following steps worked for me:
http://d8.dev/entity/node:Personally I could not care less :) SEO is IMHO mostly triggered by good content, so investing time in that is from my point of view a much better investment of any time, but you know, this is just my radical view.
Comment #5
daveferrara1 commentedThe POST alias can be set with the correct permissions for the user and the correct JSON addition of:
Thanks to @dawehner coming up with the POST solution.
Changed to minor. As the only issue now is that the path alias is not being provided via GET in either JSON or Hal+JSON, Views rest export also not providing the path alias.
I believe it should be in here:
Comment #6
wim leersSo there are two questions here:
Comment #8
davidwbarratt commentedI noticed that if you don't save it with a
pidit creates a newurl_aliasrecord. :(Comment #9
rvanegmond commentedTo set a custom alias I had to add the pathauto:false.