partkeepr / PartKeepr

Open Source Inventory Management
http://www.partkeepr.org
GNU General Public License v3.0
1.38k stars 401 forks source link

Error When Saving Manufacturer With Logo #814

Open WickedAx opened 7 years ago

WickedAx commented 7 years ago

System Information

mammoth_electronics savemanufacturerwithlogoerror

How to reproduce

  1. Save the Mammoth Electronics logo (pasted above in this bug report) to your desktop with the filename "mammoth.png"
  2. Open a browser instance (I'm using Chrome)
  3. Open the PartKeepr demo site by navigating to https://demo.partkeepr.org
  4. If the "Message of the day" popup appears, dismiss it by clicking the "OK" button.
  5. Select the Edit->Manufacturers menu item.
  6. Click the "Add Manufacturer" button.
  7. Enter the following information for the new manufacturer: Manufacturer Name: Mammoth Electronics Address: Website: http://www.mammothelectronics.com Email: sales@mammothelectronics.com Phone: (405) 254-4112
  8. In the "Manufacturer Logo" section, click the "Add Logo" button.
  9. In the popup that appears, click the "Select Image..." button.
  10. In the file selector dialog, select the "mammoth.png" image file you saved to your desktop in step 1 above and click "OK".
  11. Click the "Upload" button in the "Image Upload" tool.
  12. If the image uploaded successfully, the "Image Upload" popup should close and should return you to the manufacturer window, which should show the listing for Mammoth Electronics. You should also see the Mammoth logo in the "Manufacturer Logos" section.
  13. Click the "Save Manufacturer" button, which results in the following error (full error report) being thrown (also shown in the screenshot pasted above):

Details

Type error: Argument 1 passed to PartKeepr\ManufacturerBundle\Entity\Manufacturer::removeIcLogo() must be an instance of PartKeepr\ManufacturerBundle\Entity\ManufacturerICLogo, instance of Proxies__CG__\PartKeepr\ImageBundle\Entity\TempImage given, called in /home/demo.partkeepr.org/PartKeepr/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php on line 616

Request

POST https://demo.partkeepr.org/api/manufacturers?_dc=1486869767103

[object Object]

Response Status Code

500

Response

{"@context":"\/api\/contexts\/Error","@type":"Error","hydra:title":"An error occurred","hydra:description":"Type error: Argument 1 passed to PartKeepr\ManufacturerBundle\Entity\Manufacturer::removeIcLogo() must be an instance of PartKeepr\ManufacturerBundle\Entity\ManufacturerICLogo, instance of Proxies\CG\PartKeepr\ImageBundle\Entity\TempImage given, called in \/home\/demo.partkeepr.org\/PartKeepr\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/PropertyAccess\/PropertyAccessor.php on line 616"}

Server Configuration

doctrine_orm_version: 2.5.4 doctrine_dbal_version: 2.5.2 doctrine_common_version: 2.6.0-DEV php_version: 7.0.14-2 auto_start_session: true maxUploadSize: 2097152 isOctoPartAvailable: true availableImageFormats: JPG,GIF,PNG autoLoginUsername: admin autoLoginPassword: admin motd:

Welcome to the PartKeepr demo site

Notes:

max_users: unlimited authentication_provider: PartKeepr.Auth.HTTPBasicAuthenticationProvider tip_of_the_day_uri: https://partkeepr.org/tips/%s password_change: true

SigEpBlue commented 7 years ago

Same problem and error codes here, running partkeepr-1.2.0.

Drachenkaetzchen commented 7 years ago

Thanks for the bug report, scheduled for 1.2.1

christianlupus commented 4 years ago

Can you @WickedAx please verify that it is still an open issue on the demo page?

baradhili commented 4 years ago

Running on my local install, followed steps get this error `An error occurred

Details

Expected argument of type "PartKeepr\ManufacturerBundle\Entity\ManufacturerICLogo", "Proxies__CG__\PartKeepr\ImageBundle\Entity\TempImage" given

Request

POST http://kamaji/api/manufacturers?_dc=1579676903329

[object Object]

Response Status Code

500

Response

{"@context":"\/api\/contexts\/Error","@type":"Error","hydra:title":"An error occurred","hydra:description":"Expected argument of type \u0022PartKeepr\ManufacturerBundle\Entity\ManufacturerICLogo\u0022, \u0022Proxies\CG\PartKeepr\ImageBundle\Entity\TempImage\u0022 given"}

Server Configuration

doctrine_orm_version: 2.5.4 doctrine_dbal_version: 2.5.2 doctrine_common_version: 2.6.0-DEV php_version: 7.2.24-0ubuntu0.18.04.2 auto_start_session: true maxUploadSize: 2097152 isOctoPartAvailable: false availableImageFormats: JPG,GIF,PNG max_users: unlimited authentication_provider: PartKeepr.Auth.HTTPBasicAuthenticationProvider tip_of_the_day_uri: https://partkeepr.org/tips/%s password_change: true patreonStatus: defaultGridPresets: [] `

hhumas commented 2 years ago

i am also getting error , while adding manufacturer logo