Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Disappearing Item Image #3954

Open
1 task done
odiea opened this issue Mar 23, 2024 · 2 comments
Open
1 task done

[Bug]: Disappearing Item Image #3954

odiea opened this issue Mar 23, 2024 · 2 comments
Labels

Comments

@odiea
Copy link
Collaborator

odiea commented Mar 23, 2024

Bug Description?

Add Item pic to Item form. Save open then save Item form. Item pic disappears.

Steps to Reproduce?

Same as above

Expected Behavior?

Item pic should stay.

OpensourcePOS Version

development (unreleased)

Php version

Php 8.2

What browsers are you seeing the problem on?

Chrome

Server Operating System and version

Wamp Server

Database Management System and version

Mysql 8.2.0

Web Server and version

Wamp Server

System Information Report (optional)

System Information Report

Unmodified copy of OpensourcePOS

  • I agree this copy has not been modified
@odiea odiea added the bug label Mar 23, 2024
@odiea
Copy link
Collaborator Author

odiea commented Mar 23, 2024

controller/Items line 685 I changed $item_data['pic_filename'] = !empty($upload_data['orig_name']) && $upload_data['raw_name']? $upload_data['raw_name'] . '.' . $upload_data['file_ext']: null
to.
if(!empty($upload_data['orig_name']))
{
if($upload_data['raw_name'])
{
$item_data['pic_filename'] = $upload_data['raw_name'];
}
}
And now the previous avatar is not removed.

@objecttothis
Copy link
Member

There are a couple of issues with Item save right now. Namely Attributes are not saving consistently, locale is not being respected with floats and the issue you reported. They may be related or they may be independent errors. I'm working on getting barcodes working properly everywhere, then the locale issue with floats. If someone wants to work on this issue before then, great. Otherwise I will work on it when I finish those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants