-
Notifications
You must be signed in to change notification settings - Fork 898
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
[Bug] Not hide and not redirect after delete record #5718
Comments
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! -- |
Thank you for reporting this issue. Based on the information provided, it appears you're experiencing a bug related to the delete functionality in Backpack CRUD. Let me address this based on the available knowledge sources. This issue seems to be a known bug that has been reported and discussed in several GitHub issues for Backpack. The behavior you're experiencing - where the modal window doesn't close and doesn't redirect after deleting a record - is consistent with what others have reported. In a GitHub issue discussing a similar problem, it was noted that after deleting an entry from the preview view, the system doesn't redirect back to the list view as expected. Instead, it leaves the user on a deleted view, which results in a 404 error if refreshed. The development team has acknowledged this as an issue. In the same discussion, a Backpack team member commented:
Your suggestion to modify the // Hide the modal, if any
$('.modal').modal('hide'); However, it's important to note that modifying core Backpack files directly is not recommended, as these changes may be overwritten during updates. As for a solution, since you're using Backpack CRUD version 6.7.41, which is part of the v6 series where this issue was supposed to be addressed, it seems the fix hasn't been fully implemented or there might be some regression. For now, you might want to consider:
Remember, modifying core package files is not recommended. If you need to customize this behavior, it's better to extend or override the functionality in your own code. Relevant sources: Github Issue (closed): [Bug] Delete on preview page don't redirect to list |
Hey @zivarg Thanks for reporting the BUG. I have assigned my colleague to fix it. |
Bug report
What I did
After deleting a record, the modal window (dtr-modal) does not close and does not redirect to the list.
What I expected to happen
Close the window or redirect to the previous tab.
What happened
A window with the deleted record data is displayed after the record is deleted.
What I've already tried to fix it
I think the modal window can be fixed in delete.blade.php by adding $('.modal').modal('hide');
Is it a bug in the latest version of Backpack?
After I run
composer update backpack/crud
the bug... is it still there?Yes
Backpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is:PHP VERSION:
8.2.12
PHP EXTENSIONS:
Core, bcmath, calendar, ctype, date, filter, hash, iconv, json, SPL, pcre, random, readline, Reflection, session, standard, mysqlnd, tokenizer, zlib, libxml, dom, PDO, bz2, SimpleXML, xml, xmlreader, xmlwriter, openssl, curl, fileinfo, gettext, mbstring, exif, mysqli, pdo_mysql, pdo_sqlite, Phar, ftp
LARAVEL VERSION:
11.15.0.0
BACKPACK PACKAGE VERSIONS:
backpack/basset: 1.3.4
backpack/crud: 6.7.41
backpack/generators: v4.0.5
backpack/pro: 2.2.24
backpack/theme-tabler: 1.2.10
The text was updated successfully, but these errors were encountered: