partkeepr / PartKeepr

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

Error by adding Distributor to an item #817

Closed dersch81 closed 7 years ago

dersch81 commented 7 years ago

If i add a Distributor or self created Part Parameters to an Item i get an error:

System Information

An error occurred

Details

Catchable Fatal Error: Argument 1 passed to Proxies__CG__\PartKeepr\PartBundle\Entity\PartManufacturer::setManufacturer() must be an instance of PartKeepr\ManufacturerBundle\Entity\Manufacturer, null given, called in /var/www/partkeepr/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php on line 556 and defined

Request

PUT /api/parts/2?_dc=1487170544662

[object Object]

Response Status Code

500

Response

{"@context":"\/api\/contexts\/Error","@type":"Error","hydra:title":"An error occurred","hydra:description":"Catchable Fatal Error: Argument 1 passed to Proxies\CG\PartKeepr\PartBundle\Entity\PartManufacturer::setManufacturer() must be an instance of PartKeepr\ManufacturerBundle\Entity\Manufacturer, null given, called in \/var\/www\/partkeepr\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/PropertyAccess\/PropertyAccessor.php on line 556 and defined"}

Server Configuration

doctrine_orm_version: 2.5.4 doctrine_dbal_version: 2.5.2 doctrine_common_version: 2.6.0-DEV php_version: 5.6.21-1+donate.sury.org~trusty+4 auto_start_session: true maxUploadSize: 4294967296 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

Please attach files, for example, screenshots to describe your issue. If you can, create a screenshot ob View->System Information.

partkeepr system information

Drachenkaetzchen commented 7 years ago

I just tried to reproduce on the demo system, but I don't receive an error. Please provide steps to reproduce, if you can reproduce it on the demo system to allow me to analyze the issue.

dersch81 commented 7 years ago

I'm sorry. I did no evaluate it in detail. It just happend with one single part. Now i deleted it and did it again. It works without any error. I also can add Distributors for other parts. So it seems it was just a one time error with one part where the database saving was corrupted... maybe... Just an idea. Therefore you can close or delete this issue. Many thanks for you quick reply.