Skip to content

Conversation

wachterjohannes
Copy link
Member

@wachterjohannes wachterjohannes commented Dec 9, 2019

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets part of #190
Related issues/PRs #190, sulu/sulu#4935
License MIT

What's in this PR?

This PR add an admin for dynamics form list.

Why?

This is a missing feature for 2.0 compatability.

Example Usage

sulu_form:
    dynamic_lists:
        sulu_page.page_edit_form:
            form:
                property: form
                type: page

BC Breaks/Deprecations

Parent configuration is new in the config tree.

To Do

  • Update CHANGELOG.md
  • Update documentation
  • Add line to UPGRADE.md

@alexander-schranz
Copy link
Member

@wachterjohannes is sulu/sulu#4935 required for this PR?

@wachterjohannes
Copy link
Member Author

@alexander-schranz yes it is required - will give you a hint when it is merged

@alexander-schranz
Copy link
Member

@wachterjohannes min requirement need to be "sulu/sulu": "^2.1", then

@wachterjohannes
Copy link
Member Author

let us discuss that in the team - we should merge this back to 2.0 i think - otherwise form-bundle wont be released before we release sulu 2.1

@wachterjohannes
Copy link
Member Author

@alexander-schranz sulu PR is merged to release/2.0

@niklasnatter
Copy link
Contributor

niklasnatter commented Jan 14, 2020

This leads to a ParentViewNotFoundException if a user does not have sufficient permissions to see the parent page.

For example, if a user does not have any webspace permissions, there is no sulu_page.page_edit_form view present and therefore the config request fails with a ParentViewNotFoundException: https://github.com/sulu/sulu/blob/master/src/Sulu/Bundle/PageBundle/Admin/PageAdmin.php#L172

One possible solution here would be adding a priority/order for Admin classes. The we could execute the DynamicListAdmin in the end and check if the $viewCollection contains the requested parent view.

Another possible solution would be adding something like a ignoreOnInvalidParent flag on the ViewBuilderInterface.

A third possibility would be changing the behaviour of sulu to always add every view and just hide it in the frontend.

@wachterjohannes
Copy link
Member Author

@alexander-schranz ready to review again

@nnatter we will discuss that tomorrow and fix this in a following PR

@alexander-schranz alexander-schranz merged commit 86d93d3 into sulu:develop Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants