Forum
Gallery Album Cover Images Missing
Just recently when adding a new album to our photo gallery, the album cover image no longer appears on the main photo gallery page the listing all the albums. The previously added albums still retain their cover images.
When I check the source code I see that the "img src" reference for the new album is empty. See code below.
<li class="album">
<a href="album.php?s=citymusic-midori-friends-jazz-at-lincoln-center-showcase-may-2015"><img src="" alt="01-1" height="" width=" "/></a>
<div><a href="album.php?s=citymusic-midori-friends-jazz-at-lincoln-center-showcase-may-2015">CityMusic: Midori & Friends' Jazz at Lincoln Center Showcase - May 2015</a></div>
</li>
Not sure what caused the issue to happen suddenly but we have not done any updates or changes to the core files.
Our template for the album based on the original "c_album-image.html" file follows along with our diagnostic summary.
Our Diagnostics Report
Summary information
Perch: 2.6.6, PHP: 5.4.42, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.6.6), assets (2.6.6), categories (2.6.6), perch_blog (4.5.2), perch_events (1.9), perch_gallery (2.8.5), perch_backup (1.2)
App runtimes: <?php include(PERCH_PATH.'/core/apps/content/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_gallery/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_events/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_blog/runtime.php'); ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: /homepages/30/d198354976/htdocs/perch
PERCH_CORE: /homepages/30/d198354976/htdocs/perch/core
PERCH_RESFILEPATH: /homepages/30/d198354976/htdocs/perch/resources
Image manipulation: GD
PHP limits: Max upload 40M, Max POST 8M, Memory: 120M, Total max file upload: 8M
Resource folder writeable: Yes
HTTP_HOST: midoriandfriends.org
DOCUMENT_ROOT: /kunden/homepages/30/d198354976/htdocs
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Our album template
<li class="album">
<a href="album.php?s=<perch:gallery id="albumSlug" />"><img src="<perch:gallery id="medium" />" alt="<perch:gallery id="imageAlt" />" height="<perch:gallery id="medium-h" />" width="<perch:gallery id="medium-w" /> "/></a>
<div><a href="album.php?s=<perch:gallery id="albumSlug" />"><perch:gallery id="albumTitle" /></a></div>
</li>
SCREENSHOT OF MISSING ALBUM COVER IMAGE https://killyman.com/perchforums/missingalbumcoverimage.jpg
The first thing to do is ensure Perch and your addons are up to date. You are currently pretty out of date.
Once you have upgraded, let us know if the problem still exists.
Okay.
So based on my diagnostic report, do I just overwrite the current core folder with the latest version?
For the addons, do I overwrite the entire addon folder with the latest one?
Yes - the instructions are here: https://grabaperch.com/update
I updated Perch core and Gallery app to latest versions. Still no album cover image being displayed.
What error are you now getting?
Never got an error message before or now. The album cover image just stopped getting displayed on new albums.
Link to live Photo Gallery page below.
https://www.midoriandfriends.org/eventsgallery.php
The latest album titled "CityMusic: Midori & Friends' Jazz at Lincoln Center Showcase - May 2015" has no cover image. The HTML source code for that album has the necessary "img src" tag, but unlike the previous albums, the first image in the photo album itself is not getting referenced as the cover image.
Before the problem started, when we'd add a new album and then add images to that album, the first image in the album would automatically become the album cover image as you can see with the older albums on our website.
We've just updated the Blog and Events apps as well and still no luck. See diagnostics below.
Do the images otherwise appear to upload correctly?
Do they appear in the album?
Yes to both questions.
https://www.midoriandfriends.org/eventsgallery.php
Going back to basics - do the examples included with the app work for you?
I solved the issue. Something must have gotten corrupted with the image.html template file in the following location:
I changed my original custom image template tag key name in image.html from the following
to the following
Then I updated the MAF_c_album-image.html file with the new reference to the image ID "mediumsize" as shown below
and then re-uploaded the first image for the album in question and now the album cover image is displaying as desired.
All is well now.
Thanks for your insight!