webERP Forum
Add Inventory item, Image upload failed... - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (http://www.weberp.org/forum/forumdisplay.php?fid=8)
+--- Thread: Add Inventory item, Image upload failed... (/showthread.php?tid=8357)

Pages: 1 2


Add Inventory item, Image upload failed... - ALEXSHEN - 09-08-2019

Hi!

Now I want to add new inventory item, but image upload failed, I checked the size of the image less than the 300k, format is jpg.

After added new inventory item, all data loaded, but image can't and there are no error codes and error messages.

I checked folder "part_pics" are right, permission is also right, I also found brand logo files in this folder what I loaded from the brand funtion.

Now I don't know where maybe I set not so right?

Alex


RE: Add Inventory item, Image upload failed... - TurboPT - 09-08-2019

If you run ls -l webERP/companies/<company> (whatever path you have before the part_pics directory)

...can you paste the full output line for the part_pics directory here?


RE: Add Inventory item, Image upload failed... - falkoner - 09-08-2019

(09-08-2019, 11:28 AM)TurboPT Wrote: If you run ls -l webERP/companies/<company> (whatever path you have before the part_pics directory)

...can you paste the full output line for the part_pics directory here?

Alex: I have added a check for the file permissions to Stocks.php. Assuming you are using the latest webERP you should be able to just add the attached script straight in. Can you run it and check if it gives an warning about the permissions?

Paul: Even if this isn't Alex's problem it is worthwhile having this extra check so I have sent you a pull request.

Tim

[attachment=970]


RE: Add Inventory item, Image upload failed... - ALEXSHEN - 09-08-2019

Hi, Tim and Paul,

Thanks for your help, When I return to office, I will check and report to you.

Alex



RE: Add Inventory item, Image upload failed... - ALEXSHEN - 09-09-2019

Hi Tim,

I tried Stocks.php, haven't any error code and message yet, but problem also still there.
[attachment=971]

And I also used "ls -l order" to check folder "part_pics",
[attachment=972]

here enclosed the two screenshots.

Alex


RE: Add Inventory item, Image upload failed... - ALEXSHEN - 09-09-2019

Tim and Paul,

Now I am back to this thread.

I tried this image loading step again, and now I have found two different results for different steps.
1- If I add a new inventory item with a photo, the image loads successfully.
2- But if I added the inventory text data before, loading the image again will fail.

So the question now is how to add images again after entering text data?

Alex


RE: Add Inventory item, Image upload failed... - TurboPT - 09-09-2019

Do you show any error(s) in the server logs?

I'm running out of ideas, as I'm not seeing the same behavior that you do.
Can you provide specific steps that you do so we can try the same steps to reproduce the issue?

Not sure if mentioned somewhere, but which webERP version do you have?


RE: Add Inventory item, Image upload failed... - ALEXSHEN - 09-09-2019

Hi Tim and Paul,

I think I found the reason for the unsuccessful, because of the "/" symbol problem.
[attachment=974]
Now I am facing a big problem, because we have already entered a lot of inventory data into the system, purchase orders and sales orders, as well as payment, some have been executed or in the process of implementation. If want to modify the inventory product number a lot now, it will be catastrophic.

So do you have good methods and suggestions?

Thanks!!!

Alex


RE: Add Inventory item, Image upload failed... - falkoner - 09-09-2019

Ah yes, I should have picked that up. Sorry!

There is a utility script called Z_ChangeStockCode.php that should change a code throughout the system. You should test this out first on a copy of your database, but it *should* work.

Alternatively if it is only the stock image that is affected then it should be possible to do some fudge with the code to save and display them. Of course then that change would need to be replicated each time you update the code, so if it woks OK then the first option is best.

Tim


RE: Add Inventory item, Image upload failed... - falkoner - 09-09-2019

Paul: We have a function called ContainsIllegalCharacters() which checks part codes for any characters that shouldn't be there (I don't really like this function but that's another story). Should we look to include the '/' in that function as a banned character?

Tim