Skip to content
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

Edit in Infinite Editor of Edit in Infinite Editor - "Create Button" creates wrong #13355

Closed
croban opened this issue Nov 4, 2022 · 6 comments

Comments

@croban
Copy link

croban commented Nov 4, 2022

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

10.2.1 to 10.3.2

Bug summary

I have following document types with permissions as below: with enable list view where the last doctype is a leaf

  • firstdoctype (custom list view enabled - with infinite editor)
    • seconddoctype (custom list view enabled - with infinite editor)
      • thirddoctype

when navigating through the levels on the seconddoctype the button for creating child doctype showing "Create seconddoctype" where must be "Create thirddoctype".

without infinite editor everything works

Specifics

No response

Steps to reproduce

Create this document types with permision as in ul, create custom listview with enabled infinite editor

  • firstdoctype (custom list view enabled - with infinite editor)
    • seconddoctype (custom list view enabled - with infinite editor)
      • thirddoctype

within content create the same structure try to create "thirddoctype" on the "seconddoctype"

  • firstdoctype content
    • seconddoctype content

try to create thirddoctype content on the secondoctype level.

Expected result / actual result

No response

@croban croban added the type/bug label Nov 4, 2022
@Zeegaan
Copy link
Member

Zeegaan commented Nov 22, 2022

Hey @croban, thanks for reporting! Would you mind sharing your custom list view so I can use it when testing this out 😁

@Zeegaan Zeegaan added the state/needs-investigation This requires input from HQ or community to proceed label Nov 22, 2022
@croban
Copy link
Author

croban commented Nov 22, 2022

@Zeegaan I'm sorry I don't have the custom list anymore, I have turned them off, because of the issue. They are easy to create because they only have had enabled infinity editor.

@elit0451 elit0451 added state/reproduced affected/v10 affected/v11 area/backend and removed state/needs-investigation This requires input from HQ or community to proceed labels Nov 25, 2022
@elit0451
Copy link
Contributor

elit0451 commented Nov 25, 2022

Thanks for reporting this issue @croban, 💪

I managed to replicate the problem. Here is a little video of me reproducing the bug and testing out a different scenario (custom listview without enabling "Edit in Infinite Editor").

List_view_infinite_editing.mp4

(Quick) Investigation + notes:

Seems like when enabling the "Edit in Infinite Editor":
SetToTrue


the response from calling .../umbracoapi/contenttype/GetAllowedChildren?contentId= contains wrong information:

⬆️ When Infinite Editor enabled


⬆️ When Infinite Editor disabled


I didn't have time to investigate further but I will mark it as up-for-grabs and perhaps someone from the community has a potential fix 😊

@kjac
Copy link
Contributor

kjac commented Jan 11, 2023

See also more details in #13652 (duplicate of this issue)

@dKumarmj
Copy link
Contributor

dKumarmj commented Jan 13, 2023

I also raised the same issue here #13652 .

The video is here

While I checking the issue, what I understood is

In the API call, it's passing the wrong Id umbraco/backoffice/umbracoapi/contenttype/GetAllowedChildren?contentId=1192,

1192 - it is the Id of the first Parent content, in the video check Id of the Parent Content. while opening the second child item in the Infinite Editor, it needs to pass the correct Id based on the newly opened content, but in this case, the Url is not changed and the old ID get from the $routeParams.Id& it is 1192

Debugging in umbraco.controller.js

In umbraco.controller.js ,there is a function called initview(), it's taking the id from the route params, so $routeParams.id is considering the first opened content, and the second content(has childs as listview) we open as Infinite Editor, so the Id won't change because the params are not changed in the URL($routeParams), when we disable the infinite editor option, then it will work, because of the URL change! ($routeParams).

I am not sure if this is the correct finding! , maybe some relation is there :) , but the weird issue is, by using the wrong button(showing the wrong doctype) we can create the wrong content :(, even if we are not allowed as a child!

mvennevold added a commit to mvennevold/Umbraco-CMS that referenced this issue Nov 26, 2024
AndyButland pushed a commit that referenced this issue Jan 21, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@AndyButland
Copy link
Contributor

Fixed in #17637 and expected for release in 13.7.

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

No branches or pull requests

7 participants