danielbrendel / hortusfox-web

Self-hosted collaborative plant management and tracking system for plant enthusiasts
https://www.hortusfox.com
MIT License
674 stars 34 forks source link

500 Internal Server Error when image resource not found #258

Closed afyounie closed 3 months ago

afyounie commented 3 months ago

Describe the bug 500 Internal Server Error Exception at /var/www/html/vendor/danielbrendel/asatru-php-framework/src/helper.php:199 Reported error: Resource "img/52b3f17378688b1d57e3ba393e03a319_thumb.jpg" not found on server. Refresh Stack trace:

6 /var/www/html/app/modules/UtilsModule.php(535): asset ( 'img/52b3f17378688b1d57e3ba393e03a319_thumb.jpg' )

5 /var/www/html/app/helper/AppHelper.php(102): UtilsModule::absolutePhoto ( '52b3f17378688b1d57e3ba393e03a319_thumb.jpg' )

4 /var/www/html/vendor/danielbrendel/asatru-php-framework/src/view.php(416) : eval()'d code(444): abs_photo ( '52b3f17378688b1d57e3ba393e03a319_thumb.jpg' )

3 /var/www/html/vendor/danielbrendel/asatru-php-framework/src/view.php(416): eval

2 /var/www/html/vendor/danielbrendel/asatru-php-framework/src/view.php(764): Asatru\View\ViewHandler::out

1 /var/www/html/vendor/danielbrendel/asatru-php-framework/src/bootstrap.php(124): HandleView ( Asatru\View\ViewHandler )

0 /var/www/html/public/index.php(25): require_once ( '/var/www/html/vendor/danielbrendel/asatru-php-framework/src/bootstrap.php' )

To Reproduce Steps to reproduce the behavior:

  1. Create a plant
  2. Add an image using external URL
  3. Clone the plant
  4. See error

Expected behavior I expected it to clone the plant with the same exact resources and then allow me to replace them without breaking the UI.

Screenshots Screenshot_2024-08-18_18-01-44

Software:

Desktop (please complete the following information):

Smartphone (please complete the following information):

afyounie commented 3 months ago

I want to add that I am unable to delete the problem plant. It isn't available from the dashboard, but if I go to directly to it's page, I get what you see in the screenshot. There are no buttons to remove the plant. Screenshot_2024-08-18_18-06-00

danielbrendel commented 3 months ago

Hi, thanks for reporting that bug. I'll add a fix for this asap.