Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
I'm using Pages for my home page and have recently updated it using Lr Publisher using a Stage fullscreen-flip gallery template. Now the home page no longer contains proper links for the image sources in the social media links.
For example ...
<link rel="image_src" href="http://johnbishopimages.com/photos/Full-Bloom-0389_v1.jpg"/> should now point to
<link rel="image_src" href="http://johnbishopimages.com/galleries/pages-gallery/photos/Full-Bloom-0389_v1.jpg"/>
Likewise these are also bad ...
<meta property="og:image" content="http://johnbishopimages.com/photos/Full-Bloom-0389_v1.jpg"/>
<meta name="twitter:image" value="http://johnbishopimages.com/photos/Full-Bloom-0389_v1.jpg"/>
<meta name="twitter:image:src" value="http://johnbishopimages.com/photos/Full-Bloom-0389_v1.jpg"/>
Note that prior to replacing the home page gallery for the first time, the links are OK. But once updated using Publisher, the links no longer point to the right place so this breaks Twitter cards, etc.
I've had to jerry-rig this by FTP copying the new updated images to the old referenced location (/photos/) and things work OK. Note that the old images are left behind as are the thumbnails but for my purposes that doesn't seem to be a problem. It might be for other gallery types.
John
;-j
Offline
Ah, probably due to .htaccess hyjinx getting the page URL ... the gallery actually exists in /galleries, but is being used at / ... off the top of my head, I'm not sure. Will have to think on it, or maybe talk to Ben. It's a bit of a tricky thing we're doing, allowing publisher to take over the Home page.
Offline
Hi John, this requires a code change in the generated templates, and hence an update to the web plugins. We have some working code to solve this. If you'd like to try it out in advance, the changes are to the template_index.php and template_mobile.php.
Substituting all occurrences of:
<?php echo currentPageLocation(); ?>/photos
With:
<?php echo $album->getURL(); ?>photos
Note that the slash following the closing ?> is removed in the new code, as it's already provided by the getURL() function.
Offline
Hi Ben,
I've updated my 3 ttg-be templates (1 CE4 Gallery and 2 variants of CE4 Stage), 4 lines in each and that seems to have fixed the problem. However I also find 4 occurrences of the same string inside the CE4 Gallery template_single.php file. Shouldn't this be updated as well?
;-j
Offline
Hi John, I'm glad that solved it. There's no need to change the code in template_single.php, other than for coding consistency. The single pages should open in the location of the gallery, e.g. http://yoursite.com/galleries/pages-gal … oto01.php, so don't suffer from the broken social media links in the same way that the home page gallery does.
Offline