Laravel-Backpack / community-forum

A workspace to discuss improvement and feature ideas, before they're actually implemented.
28 stars 0 forks source link

[Bug] show view delete button keep entry open after deletion. #207

Open ghost opened 2 years ago

ghost commented 2 years ago

Bug report

What I did

  1. List view: click Preview link in actions column
  2. Preview view: click the delete link at bottom of the fields

What I expected to happen

I expect the system to delete the row from the DB. Then redirect back to the List view.

What happened

It deleted the row from the DB. but did NOT redirect. So, now I'm sitting on a deleted view. If you refresh you get a 404

What I've already tried to fix it

??

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

PHP VERSION:

PHP 8.1.9 (cli) (built: Aug 4 2022 14:00:20) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.9, Copyright (c) Zend Technologies with Zend OPcache v8.1.9, Copyright (c), by Zend Technologies

LARAVEL VERSION:

v9.26.0@53e20ba7c4df1d1628102811f5b7119e138247f8

BACKPACK VERSION:

5.3.5@0f1f05f917db8da7f3ae415bbada8474095b85df

Operating System and Server Setup

Mac serving from the CLI serve command

I encountered the problem above on my [Windows 10 / Mac OS / Linux / ...] machine, and my web server is set up using [WAMP / XAMPP / Valet / Homestead / ...].

pxpm commented 2 years ago

Hello @rhdevelopmentorg thanks for the report.

I bumped into this sometime ago, and by that time this is what me and @tabacitu discussed https://github.com/Laravel-Backpack/CRUD/pull/3780

I still think the current behavior is not natural, you delete the entry and keep seeing it ? weirdo.

@tabacitu do you still think the behavior is somewhat expected ? I think this is a bad experience, maybe I am wrong, dunno! Atleast now we are two persons wrong, me and @rhdevelopmentorg 🙃

Let me know what present @tabacitu thinks about this!

Cheers

pxpm commented 2 years ago

One thing I would like to add that I didn't remember last time:

Maybe there is nothing to change in behavior, but atleast we could disable the buttons and show a red message with: This entry has been deleted. ?

Cheers

ghost commented 2 years ago

I think maybe we are actually now at two "NOT weirdos"!

I agree, I it's wonky. It offended my sensibilities! haha... I don't think I've ever been on a website, or software for that matter, that didn't redirect to the the list view after deleting an entry.

Maybe gather consensus via a single question poll?

All that said, it is a really slight bug. You guys do a great job on this application and I'm sure you're looking at much bigger issues.

welcome[bot] commented 2 years ago

Hello there! Thanks for opening your first issue on this repo!

Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.

Backpack communication channels:

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.

Thank you!

-- Justin Case The Backpack Robot

tabacitu commented 2 years ago

Yeah... we should probably do something about this. But let's do it in v6 - the behaviour changes, so it's "kind of" a breaking change. I've tagged this appropriately, and moved to the v6 project.

Thanks @rhdevelopmentorg !