Skip to content
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]"Error in donation system when deleting packages that have already been donated" #4277

Closed
2 tasks done
bilboss02 opened this issue Oct 25, 2024 · 1 comment · Fixed by #4301
Closed
2 tasks done
Labels
Bug Fund https://polar.sh

Comments

@bilboss02
Copy link

bilboss02 commented Oct 25, 2024

UNIT3D Version

8.3.2

PHP & Platform

PHP 8.3.12 Database 8.0.39-0ubuntu0.20.04.1

Laravel verion

11.28.1

Have you done this?

  • I am willing to share my stack trace and logs
  • I can suggest a fix as a Pull Request

Expectation

display the page correctly
/dashboard/donations

The problem is that packages you donated no longer exist. Basically, you can edit the package, but if you delete a package that someone donated before, you will get an error.

once you removed from the the database donations to packages that don't exist anymore the problem was solved

Description

STAFF DONATION PAGE DOES NOT LOAD
/dashboard/donations

Stack trace & logs

Attempt to read property "cost" on null {"view":{"view":"/var/www/html/resources/views/Staff/donation/index.blade.php","data":[]},"userId":3,"exception":"[object] (Spatie\\LaravelIgnition\\Exceptions\\ViewException(code: 0): Attempt to read property \"cost\" on null at /var/www/html/resources/views/Staff/donation/index.blade.php:55)
[stacktrace]
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(123): require('...')
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(124): Illuminate\\Filesystem\\Filesystem::Illuminate\\Filesystem\\{closure}()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(58): Illuminate\\Filesystem\\Filesystem->getRequire()
#3 /var/www/html/vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php(22): Illuminate\\View\\Engines\\PhpEngine->evaluatePath()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(74): Livewire\\Mechanisms\\ExtendBlade\\ExtendedCompilerEngine->evaluatePath()

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@bilboss02 bilboss02 added Bug Fund https://polar.sh labels Oct 25, 2024
@HDVinnie
Copy link
Collaborator

Ideally here if a package has been used in a donation it should fail validation to delete and instead make package active column to false. Or better yet we add soft deletes to packages and cover withTrashed packages on donations index.

HDVinnie added a commit that referenced this issue Nov 1, 2024
@HDVinnie HDVinnie linked a pull request Nov 1, 2024 that will close this issue
@HDVinnie HDVinnie closed this as completed Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fund https://polar.sh
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants