Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add Inventory item, Image upload failed...
09-08-2019, 10:10 AM, (This post was last modified: 09-08-2019, 10:13 AM by ALEXSHEN.)
#1
Add Inventory item, Image upload failed...
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
Reply
09-08-2019, 11:28 AM, (This post was last modified: 09-08-2019, 11:32 AM by TurboPT.)
#2
RE: Add Inventory item, Image upload failed...
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?
Reply
09-08-2019, 06:50 PM,
#3
RE: Add Inventory item, Image upload failed...
(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


.php   Stocks.php (Size: 59.73 KB / Downloads: 2)
Reply
09-08-2019, 10:44 PM,
#4
RE: Add Inventory item, Image upload failed...
Hi, Tim and Paul,

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

Alex
Reply
09-09-2019, 12:18 AM,
#5
RE: Add Inventory item, Image upload failed...
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
Reply
09-09-2019, 07:21 AM,
#6
RE: Add Inventory item, Image upload failed...
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
Reply
09-09-2019, 08:20 AM, (This post was last modified: 09-09-2019, 08:28 AM by TurboPT.)
#7
RE: Add Inventory item, Image upload failed...
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?
Reply
09-09-2019, 08:27 AM,
#8
RE: Add Inventory item, Image upload failed...
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
Reply
09-09-2019, 04:55 PM,
#9
RE: Add Inventory item, Image upload failed...
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
Reply
09-09-2019, 07:40 PM,
#10
RE: Add Inventory item, Image upload failed...
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)