Edits not taking - intermittent

Edit: apologies if this has ended up in the wrong forum. I did not realize there were different categories until it was too late as they're all the way at the bottom of the page. Sorry about that - feel free to move this to a more appropriate category.

----

Hi folks,

I'm having some trouble with edits to image titles & description not sticking. In other words, I try to make an edit, but the edit disappears, and the original wording of the title & description is still there. This is happening intermittently on two different installations - one is running 1.2.4, the other running 1.2.5. Both are on the same server.

If I have error suppression off, I get errors like this:

----
Notice: Undefined index: 8-filename in /home/dorothyg/public_html/portfolio/zp-core/admin-edit.php on line 150

Notice: Undefined index: 9-filename in /home/dorothyg/public_html/portfolio/zp-core/admin-edit.php on line 150

Warning: Cannot modify header information - headers already sent by (output started at /home/dorothyg/public_html/portfolio/zp-core/admin-edit.php:150) in /home/dorothyg/public_html/portfolio/zp-core/admin-edit.php on line 303

----

If I add error suppression to the config file - i.e. the line

`error_reporting(E_ALL ^ E_NOTICE);`

...as someone suggested in another thread - the errors don't display. What happens instead is that I get the usual "Changes saved" message on the green background, but the changes in fact haven't been saved.

This doesn't happen consistently, so I can't figure out what the common denominator is. Logging in and out doesn't help.

I've searched the forums and seen this bug reported from time to time over the last several years. In most cases, it's stated that this bug will be fixed in the next release, but it's still happening over here.

Any help is most appreciated. Thanks very much in advance!

Kathryn

p.s. this is my first time using ZenPhoto and it's awesome! Love the multi-lingual capability. My client requested a bilingual gallery in the middle of development and it was so easy to turn on that functionality - really great.

Comments

  • Of course, supressing the error message never actually fixes the original problem!

    The errors are an indication of a problem with the posting data for the save. How many images are there on the page? There may be some kind of POST data size restriction that is truncating the data being sent.

    You say it happens intermittently. We will really need to figure out the common denominator. One possibility would be the amount of text in the descriptions (of all the images on the page.) Anything else which might increase the POSTing data. Also check for special characters which might be in the descriptions, other text, or filenames.
  • kp Member
    Hi there - thanks so much for your quick reply.

    Yes, it would certainly be nice to figure out the common denominator!

    In one album where it's happening, there are 16 images in total, and on the admin side, they're paginated into 10 images per page.

    I'll give you an example of a title & description that we're having problems with:

    Original:

    title: 09-talking-hands-3-please-listen

    Trying to change that to: Talking Hands 3 - Please Listen

    No special characters that I can see, and 7 images just before it worked fine.

    Description: Talking Hands 3 - Please Listen - 41x29? - oilstick/collage

    Trying to bold Talking Hands 3 - Please Listen doesn't stick.

    Would it help if I let you log into the admin area to take a peek?

    thanks again,

    kp
  • kp Member
    I've just been doing some testing in one album, and it seems like there's no problem editing any of the first 7 images on the first page. As soon as it gets to the 8th image and beyond, the edits stop sticking. That would seem to make sense, given that the error mentions 8:

    `Notice: Undefined index: 8-filename in /home/dorothyg/public_html/portfolio/zp-core/admin-edit.php on line 150`

    Is that a clue?
  • kp Member
    OK, I've been continuing to test and I have some new information.

    On any given page of any given album, things start to go haywire at around image 8 on each page.

    I looked around the settings to see if I could get the admin area to display fewer images than 10 per page, but didn't see anything, so maybe that's not something I can change easily.

    I can set the images to display in reverse and that allows me to edit a different set of images before reaching the 8th one that's causing issues. This gives me a workaround for now, but it would be great to get a permanent fix before I turn over the system to my very un-tech-savvy artist/client!

    Thanks so much,

    kp
  • Actually, it is quite easy to reduce the number of images on a page. Find the line that reads `define('IMAGES_PER_PAGE', 10);` in admin-edit.php and change the number to, say 7.

    What we would really need to see is a dump of the $_POST array from the edit. If you could put this code following where you find that define we can see what is getting posted on the save.
    `echo '
    $_POST ';var_duimp($_POST);echo '
    ';`
    This will print out the array being submitted by the browser. My guess, though, is that for some reason the POST array is being truncated. Of course, do this print-out before you change the define.
  • kp Member
    Hi there, thanks for showing me where to change the no. of images displayed per page! That's helpful.

    I added in the print statement but got the same errors as earlier on a blank white page - no array printout.

    Then I turned on error suppression, tried a test edit on the 10th photo, and got:

    `$_POST array(0) { } `

    ...and of course the attempted edits didn't stick.

    Does this provide a clue?

    Thanks so much!
  • That says that the POST is not being properly processed when there are 10 images. Probably a memory limit on your server. But that is just a guess. You would probably have to talk to the Service Provider technical support about this.
  • kp Member
    Thanks very much, Stephen. We actually run our own server and have never encountered this before with other scripts, so it may take some investigating. In the meantime, reducing the number of images displayed on the admin side is a great workaround. If anyone else ever reports the same issue and finds a solution, I'd appreciate if you'd let me know!

    Thanks again for a great gallery system.
Sign In or Register to comment.