You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Select image A which is a photo of an inscription.
Select image B which is a photo of the bench.
Click "Share Bench" button.
Click "Add new Bench" button.
Select image C which is a photo of an inscription.
Select image B for whatever reason. Accidents happen.
Click "Share Bench" button.
Expected (? Desired?) results:
The bench does not get submitted. Some sort of message appears informing that image B has already been submitted and the user has a chance to correct the issue.
Actual results:
The bench is successfully submitted without any indication of there being a problem. Image B doesn't show up on the bench page. User probably wonders why there's only one photo on their submission instead of two.
I haven't experienced this issue, I suspected it's existence whilst reading the code and then confirmed it using a local instance of the OpenBenches code.
The new version of the code will allow the same photo to be uploaded to multiple benches. The reduces the number of errors users see, and makes the logic a lot easier. If they notice they've made a mistake they can delete the bench and start again.
I occasionally run a check to see an image has been attached to multiple benches. It only happens rarely.
Steps to recreate:
Expected (? Desired?) results:
The bench does not get submitted. Some sort of message appears informing that image B has already been submitted and the user has a chance to correct the issue.
Actual results:
The bench is successfully submitted without any indication of there being a problem. Image B doesn't show up on the bench page. User probably wonders why there's only one photo on their submission instead of two.
I haven't experienced this issue, I suspected it's existence whilst reading the code and then confirmed it using a local instance of the OpenBenches code.
The
save_image()
function returns some text if asked to save a duplicate image, but inadd.php
that text isn't assigned to a variable for three of the calls tosave_image()
https://github.com/edent/openbenches/blob/8ea9be3cc73a5b503f181226cfffb7cf2b0c8ed3/www/add.php#L54
https://github.com/edent/openbenches/blob/8ea9be3cc73a5b503f181226cfffb7cf2b0c8ed3/www/add.php#L67
https://github.com/edent/openbenches/blob/8ea9be3cc73a5b503f181226cfffb7cf2b0c8ed3/www/add.php#L74
By contrast, in
edit.php
the output ofsave_image()
is always assigned and an error message built up and displayedhttps://github.com/edent/openbenches/blob/8ea9be3cc73a5b503f181226cfffb7cf2b0c8ed3/www/edit.php#L56
https://github.com/edent/openbenches/blob/8ea9be3cc73a5b503f181226cfffb7cf2b0c8ed3/www/edit.php#L95
Possibly the fix is do what
edit.php
does inadd.php
. 🤷♂️The text was updated successfully, but these errors were encountered: