PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro Bug Reports (http://www.photopost.com/forum/photopost-pro-bug-reports/)
-   -   Altering existing checkbox custom fields (http://www.photopost.com/forum/photopost-pro-bug-reports/114454-altering-existing-checkbox-custom-fields.html)

Wild Texas June 15th, 2005 03:11 PM

Altering existing checkbox custom fields
 
1 Attachment(s)
(Post refers to a site in development. I can provide login details to admins, though the site is undergoing heavy mod work, hence the caveat "Bug?" I've reverted showphoto.php & tmpl, editphoto.php & tmpl, pp-inc.php and other crucial files and the error is still evident.)

In PP 5.1x, I am now using several of the new custom (category) fields, and all work as desired except for the checkbox field(s). An example of a checkbox custom field I'm using, as defined in the relevant category, is:

Title/Description:
Print Sizes to Offer

Type:
Checkbox

Values:
4x6||5x7||8x10||11x14||16x20||18x24||20x30||Wallets||Greeting Cards

During photo uploads, my selections to this custom field are applied correctly to photos. For instance, if I select that the photo's available in print sizes 8x10 and 18x24, that is indeed what gets saved to the db and displayed on subsequent views of the photo (showphoto).

However, in a very specific instance (outlined below in bold), if I _EDIT_ the photo, the _ORIGINAL_ values I chose for this custom field are prefilled, and no amount of de-selecting them and resaving the photo make the changes stick. When I look in the DB, the values confirm they aren't being modified -- they're stuck to their original settings when I uploaded the photo.

This occurs in all categories using the same custom field (same content, obviously different id's in the database). And it only seems to occur to checkboxes in one specific but notable scenario -- Select at LEAST one of the checkboxes (check it off) on initial upload. Now, on edit, delete it so there are _NO_ selected checkboxes for that option. In this instance, it seems, PP doesn't pick up on the change. Whereas if I simply change my selection from one checkbox value (say 8x10) to toggling that off and selecting another (say 18x24), that change gets picked up fine -- 8x10 no longer is selected, and 18x24 is selected. But if _NONE_ of the values are selected on the edit, PP seems to just stay/revert to the originally selected values.

It should be noted that the dropdown and radio button custom fields behave as expected, accepting changes from original (set at time of upload) values to changes made upon editing the photo in PP.

Bug? If not a bug, that's fine. I'll have to figure it out myself and move this over to photopostdev. But in the off chance it's a bug, I'd like to hear if anyone else has experienced or reported this issue. I welcome someone with a fresh, unadulterated copy of PP 5.1x to test this as described above and report that it works fine for them. Follow the directions exactly, however. Simpling toggling one of the checkbox options off and enabling another doesn't cause the bug... having one initially toggled when the image is uploaded and deciding to deselect ALL checkboxes for that option is what causes the "stuck" values.

Chuck S June 16th, 2005 03:42 PM

Hello

Well If a photo has an extra field it can certainly be changed. I beleive the issue here is you can not change the entry if editing a photo in the category that does not have an custom extra defined CORRECT?

The problem being there is you cant run an update on something thats empty it would need to be an insert. So one of two things needs to happen here. We need to do an explicit check on the photoextras table and if there are no entries do not display those fields on edit or if the photoextra table is empty add the ability to inser an entry not upgrade query

Chuck S June 16th, 2005 03:58 PM

<removed>

Wild Texas June 28th, 2005 05:13 PM

Has this change been applied to the 5.12 release? I'll be upgrading to that, and I assume this code fix was incorporated?

Addendum: This doesn't appear to address the issue. Currently running 5.11 on the site with the issue. Issue is, as described, limited to editing checkbox custom fields such that NONE of the checkbox options for a particular field are checked, after having initially uploaded the image with one or more checkboxes selected in a particular field. Occurs on all checkbox fields.

If this is addressed/resolved in 5.12, let me know. That would save a chunk of time as this issue has remained outstanding on the site I was upgrading to 5.11.

Chuck S June 28th, 2005 06:36 PM

Hello

This is in 5.12 and I surely am able to edit and change extra fields with the code I provided above where as before you could not.

Wild Texas June 28th, 2005 08:01 PM

Check your PM here. I've sent you login details for a stock install of 5.12 that exhibits exactly the problem I'm referring to. In my PM I repeat the issue for you to walk through the stock install and recreate the error for yourself.

- Shannon

Michael P July 25th, 2005 02:07 PM

The problem, which still exists is specific to having checkboxes selected and then unselecting ALL of the items (to clear out any checkboxes). Because the POST doesn't send us any info because nothing is checked, we don't know to clear out all the data. It's something that we are still looking into as it may require an addition field to check for clearing all options.

Wild Texas July 25th, 2005 10:26 PM

Thanks for the update, Michael. I'll keep my fingers crossed. :)


All times are GMT -5. The time now is 06:13 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97