Closed bjarnef closed 5 years ago
I guess this method should have an overload for Udi
and maybe Guid
as well?
https://github.com/umbraco/Umbraco-CMS/blob/v7/dev/src/Umbraco.Web/Editors/EntityController.cs#L286-L291
or in Angular it need to convert it to an int
id and since it use the udi from here https://github.com/umbraco/Umbraco-CMS/blob/4733256ca1bfb49d4fe946110e734db1351f81d9/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.controller.js#L66
It seems in only hit this method first time where it send a request like this: /umbraco/backoffice/UmbracoApi/Entity/GetUrlAndAnchors?id=1129
When your afterwards edit the link it send this request:
/umbraco/backoffice/UmbracoApi/Entity/GetUrlAndAnchors?id=umb://document/afcc3d4df40d4d1eb8f2c43fdc592b58
which return the 417 (Missing token) error.
I guess it is also an issue in v8: https://github.com/umbraco/Umbraco-CMS/blob/v8/dev/src/Umbraco.Web/Editors/EntityController.cs#L290-L296
In media picker there is something similar to use udi
or id
.
https://github.com/umbraco/Umbraco-CMS/blob/4733256ca1bfb49d4fe946110e734db1351f81d9/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediapicker/mediapicker.controller.js#L97
The GetById
overload methods doesn't have the attribute [HttpGet]
and the parameter attribute [FromUri]
:
https://github.com/umbraco/Umbraco-CMS/blob/853087a75044b814df458457dc9a1f778cc89749/src/Umbraco.Web/Editors/EntityController.cs#L285-L321
Furthermore it seems to have something special to handle the different parameter types: https://github.com/umbraco/Umbraco-CMS/blob/853087a75044b814df458457dc9a1f778cc89749/src/Umbraco.Web/Editors/EntityController.cs#L72
The issue also exists in v8, but a bit different console error and status code. I will have a look at it.
Ahh, it seems you also have applied the changes in v8. Great, thanks @Shazwazza 👍
Sorry for bothering, is this issue resolved for 7.15.x versions? My 7.15.3 applications still have this behaviour.
Thank you S
Have had to manually apply PR #5881 at 7.15.3 ! A
Also still causing us problems in latest v7...
It seems this never actually got released, as it was reverted (I'm guessing accidentally) in f0fb371
Only way around now is to patch yourself :-(
Ah that is very unfortunate.. sorry about that, have removed the v7 label now. Unfortunately we're currently only providing security fixes for v7, so this will be a known issue for the rest of the duration for v7.
Thanks @nul800sebastiaan! At least it's clear now :-)
After upgrading af site on Umbraco Cloud from 7.12.4 to 7.15.0 to RTE link picker seems to throw an
417 (Missing token)
error.My Page
. Previously the link picker then showed/my-page
underLink
, but now it shows something like this/{localLink:umb://document/afcc3d4df40d4d1eb8f2c43fdc592b58}
/umbraco/backoffice/UmbracoApi/Entity/GetUrlAndAnchors?id=umb://document/afcc3d4df40d4d1eb8f2c43fdc592b58
- status code: 417 Missing tokenThe link does however seems to work on frontend.