Skip to content

[BUG] It's not possible to create wrapper/external item, because of backend validation #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ITeMbI4 opened this issue May 28, 2025 · 5 comments
Assignees
Labels

Comments

@ITeMbI4
Copy link

ITeMbI4 commented May 28, 2025

Plugin version: v3.0.15
Strapi version: v5.13.1

It's not possible to create wrapper/external item, because plugin backend tries to validate a related field, but it doesn't exist

Image

curl "[http://localhost:1337/navigation/k4p0vp3p62wo31h8z5t0msrh"](http://localhost:1337/navigation/k4p0vp3p62wo31h8z5t0msrh%22) ^
  -X "PUT" ^
  -H "Accept-Language: en-US,en;q=0.9,ru;q=0.8" ^
  -H "Connection: keep-alive" ^
  -H ^"Cookie: currentLocale=en; realm=eu; country=CZ; _gcl_au=1.1.1796820531.1747399962; _ga=GA1.1.2004299562.1747399963; _ga_BWRKLL4HR5=GS2.1.s1747829947^$o2^$g0^$t1747830778^$j60^$l0^$h0^$dr8r6U6LwRUIi5KuvkpIHi71XtqbiLyOwqg; __next_hmr_refresh_hash__=69af6436d7e63683899443b6c7bfaad39862a59e3246e3b6; 
  -H "Origin: http://localhost:1337" ^
  -H "Referer: [http://localhost:1337/admin/plugins/navigation"](http://localhost:1337/admin/plugins/navigation%22) ^
  -H "Sec-Fetch-Dest: empty" ^
  -H "Sec-Fetch-Mode: cors" ^
  -H "Sec-Fetch-Site: same-origin" ^
  -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" ^
  -H "accept: application/json" ^
  -H "content-type: application/json" ^
  -H ^"sec-ch-ua: ^\^"Google Chrome^\^";v=^\^"123^\^", ^\^"Not:A-Brand^\^";v=^\^"8^\^", ^\^"Chromium^\^";v=^\^"123^\^"^" ^
  -H "sec-ch-ua-mobile: ?0" ^
  -H ^"sec-ch-ua-platform: ^\^"Windows^\^"^" ^
  --data-raw ^"^{^\^"id^\^":1,^\^"documentId^\^":^\^"k4p0vp3p62wo31h8z5t0msrh^\^",^\^"name^\^":^\^"Navigation^\^",^\^"slug^\^":^\^"navigation^\^",^\^"locale^\^":^\^"en^\^",^\^"visible^\^":true,^\^"items^\^":^[^{^\^"type^\^":^\^"EXTERNAL^\^",^\^"collapsed^\^":false,^\^"menuAttached^\^":false,^\^"order^\^":1,^\^"title^\^":^\^"test^\^",^\^"uiRouterKey^\^":^\^"test^\^",^\^"additionalFields^\^":^{^},^\^"autoSync^\^":true,^\^"path^\^":^\^"^\^",^\^"viewId^\^":1748439542965,^\^"structureId^\^":^\^"0^\^",^\^"updated^\^":true,^\^"externalPath^\^":^\^"[https://www.google.com/l^\^",^\^"audience^\^":^[^]^}^]^}^"](https://www.google.com/)
@CodeVoyager CodeVoyager self-assigned this May 31, 2025
@CodeVoyager
Copy link
Contributor

Hi @ITeMbI4

Have you tried adding related as undefined. I would try this in the meantime as I'm working on the fix.

@CodeVoyager
Copy link
Contributor

Would share also a raw JSON body?

@ITeMbI4
Copy link
Author

ITeMbI4 commented Jun 2, 2025

Hey @CodeVoyager, even if I set related as undefined it will throw a validation error
Raw body:

{
   "id":1,
   "documentId":"k4p0vp3p62wo31h8z5t0msrh",
   "name":"Navigation",
   "slug":"navigation",
   "locale":"en",
   "visible":true,
   "items":[
      {
         "type":"EXTERNAL",
         "collapsed":false,
         "menuAttached":false,
         "order":1,
         "title":"Test",
         "uiRouterKey":"test",
         "additionalFields":{
         },
         "autoSync":true,
         "path":"",
         "viewId":1748849887970,
         "structureId":"0",
         "updated":true,
         "externalPath":"[https://www.google.com/"](https://www.google.com/%22),
         "audience":[
         ]
      }
   ]
}

@ITeMbI4
Copy link
Author

ITeMbI4 commented Jun 4, 2025

@CodeVoyager any news so far?

@CodeVoyager
Copy link
Contributor

I think I'll have a look on this issue this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants