sonata-project / SonataPageBundle

This bundle provides a Site and Page management through container and block services
https://docs.sonata-project.org/projects/SonataPageBundle
MIT License
219 stars 210 forks source link

BC break because of tree view #638

Closed Neodork closed 4 years ago

Neodork commented 8 years ago

The following code is BC break with Sonata Admin Bundle and Sonata Block Bundle introduced by 2fbd2e105f70c5bc1d1e48292ccbeb595527b9a2. Linked entities (with sonata_type_model_list form type) in blocks or admins now go to the Tree view page as default. The tree page however has no "Select" feature and a click on the name redirects to the edit page admin menu.

Note: Did not test admin, did test blocks.

   //PageAdminController.php

    /**
     * @return \Symfony\Component\HttpFoundation\Response
     */
    public function listAction()
    {
        if (!$this->getRequest()->get('filter')) { // <--- BC break
            // Redirects us to tree view, tree view has no SELECT feature
            return new RedirectResponse($this->admin->generateUrl('tree'));
        }

        return parent::listAction();
    }

Not sure what to do with it, what does Sonata think of this? @core23

OskarStark commented 8 years ago

for now it looks as a BC break to me, too!

Neodork commented 8 years ago

@core23 Should I separate https://github.com/sonata-project/SonataAdminBundle/issues/3863 from this issue? They are not fully the same. Because even when the filtering is fixed the sonata_type_model_list will still not be able to operate with the treeview as default.

So I was thinking keep the filter in the code. Then filtering can be fixed in https://github.com/sonata-project/SonataAdminBundle/issues/3863 and we will have the sonata_type_model_list functionality working.

Your thoughts?

core23 commented 8 years ago

We should fix the admin issue first and test, if this will (partial) solve the other issue. After that we could have a look at this bundle.

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.