The simpler media website CMS
Prior to 1.6, when I uploaded an image to an album, the Date field would be filled with the date/time of the upload. As I sorted my albums by descending date, newest images would appear at the top.
However, since updating to 1.6, when a new image is uploaded, the Date field is left blank, so new images are placed at the end of albums. I have to manually go in to each new image and set the Date field to get this to work.
I've combed through the Options menus and haven't seen anything that looks like a setting to turn this back on again. Is there something I'm missing that would auto-fill the Date field with the current date upon upload?
Thank you in advance!
Actually nothing changed here since 1.5.x. (despite some date formatting stuff that is still buggy because of some PHP 8+ changes) If you have no enabled meta date field for import, the standard date field normally reflects the file date or the discovery date.
Please reviewe your debug log for any related errors.
Just to mention that I cannot reproduce that the date field is empty.
Maybe this is what's missing. Do you know where this is set?
On the options. But either way there should be a date.
Again, what does the debug log say?
When I upload an image, I get this warning in my debug log:
WARNING: Cannot modify header information - headers already sent by (output started at /home/USER/mysite.com/zp-core/zp-extensions/uploader_jQuery/class-uploadhandler.php:1210) in /home/USER/mysite.com/zp-core/zp-extensions/uploader_jQuery/uploader.php on line 63
header called from uploader.php 
At least a hint although I have no idea right now… We'll try to investigate it…
On the Options - Image screen under Metadata, "Date Created" is marked Show. There's no plain "Date" available to check.
Is there another spot in the options I should be looking?
No, that only applies to meta data. The standard date is always used as mentioned. I would suspect that you perhaps have a file/folder permission issue. Take a look here: https://www.zenphoto.org/news/permissions-for-zenphoto-files-and-folders/
I went through and set the file/folder permissions as described in that help file (0644 files/0755 directories), but it didn't fix the problem.
I checked the debug log again and saw the same type of warnings that I posted previously. Based on the files mentioned in the warnings, I went in and changed file permissions for the files listed below from 644 to 755:
All found in the directory/zp-core/zp-extensions/uploader_jQuery/
Did a test upload, and something strange happened. It DID fill in that Date field. However, the date it filled in is December 6, 2022! The test file doesn't have that date listed as either the created, modified, or accessed date. I don't know where it pulled that from.
So it's working better than before, but still not fixed.
Yes the permissionss do also apply to the zp-core files. It is generally a recommendation that should work but not all servers behave the same.
Did you check the exif values of that image?
It's just a tiny jpg avatar image I made in Photoshop in 2010 that I grabbed for testing purposes, so it doesn't have any exif values.
Update: I might have this fixed. I switched the graphics library in the Options - Image screen to GDlibrary and the date is being set correctly. The combination of the wrong permissions and the wrong graphics library must've been the course.
Thank you for all your help, acrylian!!
I’ve been having the same issue, and it ties into a bug report I already filed-
“The one thing I have noticed is that most of the files having the issues, though not all, are not from digital cameras; meaning screenshots, scanned images, and animated GIFs, along with video files. Things that might have different metadata than images with EXIF info from a digital camera. So maybe this makes it less of a priority, or gives you an area to focus on.”
So like Ben523769, most of my problems with dates started with Zenphoto 1.6, on images that do not have EXIF data, and my Zenphoto is set to use Imagick instead of GDlibrary. Unfortunately, for my images, GD is not an option.
This might be related to the already mentioned date formatting issues cause by PHP 8.1+ core changes. We are on that.
Turns out I didn't fix it after all.
I guess I'll just manually set dates until the next update.