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
216 stars 209 forks source link

On block delete in page composer redirect to that page composer not to BlockAdmin list #1601

Closed haivala closed 1 year ago

haivala commented 2 years ago

Now it redirects to BlockAdmin list that is not usable and not shown anywhere else.

Edit: This is problem with 3.x and 4.x.

  1. you go to /admin/app/sonatapagepage/1/compose
  2. select block to delete in the composer
  3. delete it
  4. you are redirected to /admin/app/sonatapageblock/list?composer=1&filter[_page]=1&filter[_per_page]=25&filter[page][value]=1 not back to /admin/app/sonatapagepage/1/compose
VincentLanglet commented 2 years ago

Now

The current stable branch is 3.x. I assume you're talking about 4.x but it's not even clear in you one-line-issue. The more it's described, it's even better with screenshot and url, the more it will be solved.

Also for 4.x "bugs", I recommend to report them in https://github.com/sonata-project/SonataPageBundle/issues/1495 and @eerison will add it into his list https://github.com/sonata-project/SonataPageBundle/issues/1495#issue-1318060076

eerison commented 2 years ago

Exactly, for small issues I'm grouping them into #1495

But as @VincentLanglet says, try to describe better the issues, specially with screenshot or even better a small video with the reproduction (it's quickly and help a lot to undestand how you reproduce the issue)

haivala commented 2 years ago

This is problem with 3.x and 4.x.

  1. you go to /admin/app/sonatapagepage/1/compose
  2. select block to delete in the composer
  3. delete it
  4. you are redirected to /admin/app/sonatapageblock/list?composer=1&filter[_page]=1&filter[_per_page]=25&filter[page][value]=1 not back to /admin/app/sonatapagepage/1/compose
haivala commented 2 years ago

As this is problem with both 3.x and 4.x I thought it would be better to have new issue about it and not require it in 4.x release.

VincentLanglet commented 2 years ago

As this is problem with both 3.x and 4.x I thought it would be better to have new issue about it and not require it in 4.x release.

I agree. But I don't know a lot this bundle, it was hard to me to understand this.

This is problem with 3.x and 4.x.

  1. you go to /admin/app/sonatapagepage/1/compose
  2. select block to delete in the composer
  3. delete it
  4. you are redirected to /admin/app/sonatapageblock/list?composer=1&filter[_page]=1&filter[_per_page]=25&filter[page][value]=1 not back to /admin/app/sonatapagepage/1/compose

This is better ; I added to the first message.

eerison commented 2 years ago

Well as I can see the problem is just the redirect, I agree that it need be fixed in 3.x but as it's not a critical issue, I would say that it has less priority then 4.x release.

VincentLanglet commented 2 years ago

Well as I can see the problem is just the redirect, I agree that it need be fixed in 3.x but as it's not a critical issue, I would say that it has less priority then 4.x release.

Yeah. We try to fix the bug in 4.x that we introduced (and which were working in 3.x) first. So a specific issue for this issue is meaningful ; it wasn't clear to me before in which situation we were.

eerison commented 2 years ago

Hey @haivala could you test it again please.

I tested using the last version of 4.x and it's working as expected!

haivala commented 2 years ago

It does not work. I'm using 4.x-dev.

I have block with id 18 and I want to delete it. I open the composer and edit the block. There is buttons Update or Delete. Delete button redirects me to /admin/app/sonatapageblock/18/delete?composer=1 and asks Are you sure you want to delete the selected.... When I click yes it redirect me to BlockAdmin list at admin/app/sonatapageblock/list?composer=1&filter[_page]=1&filter[_per_page]=25 I'm guessing you used the ajax version of block delete? button says remove and can be found at composer when you hover on a block. That does work as expected.

haivala commented 2 years ago

What we could do is just remove the delete button in composer as the same thing can be done with the ajax remove.

eerison commented 2 years ago

Then it's not in composer page, because after delete it's redirecting to anywhere. it made a ajax request

are you sure that is it in composer page?

haivala commented 2 years ago

I just explained that you need to open the block edit dialogue in composer page

haivala commented 2 years ago

2022-09-28_154050-area

eerison commented 2 years ago

sorry I didn't follow you!

eerison commented 2 years ago

https://user-images.githubusercontent.com/6358755/192785187-7990e41b-ce18-4b1d-bde1-d24196495417.mov

as I said , remove block from composer page works ☝🏼

haivala commented 2 years ago

Again, open the block edit and then push delete button which is next to the update button Don't use the remove button. That works

eerison commented 2 years ago

1- Your ticket description is wrong then, you are saying that this issue is in composer page. 2- It's working in block list also 👇🏼

https://user-images.githubusercontent.com/6358755/192805724-9018efca-26a5-4121-98a0-d76bc66b2442.mov

if it's not the page, please provider a better description with screenshots and what exactly urls it's happening, if it's possible record your screen with this issue.

haivala commented 2 years ago

2022-09-28_172941-area

haivala commented 2 years ago

can you see the delete button now?

eerison commented 2 years ago

Ok know it's clear where is the issue!