Community @ The Turning Gate

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.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2019-11-24 00:10:31

richam
Member
From: Preveza, Greece
Registered: 2013-01-06
Posts: 143
Website

Map embed with pym

I followed instructions to install pym, and got it to display an active Google map:

http://www.michaelrichardsphotography.c … ap-tester/

(This is a test album; the garish colors are for troubleshooting)  I have made no changes to the pym elements as downloaded.  I am using backlight with TTG publisher and special page and album templates to test pym map embedding.

The main content area is 1280 px wide, and pallet 01 is 350 px wide.  I can't seem to control the height of the map, and want to have it displayed in Pallet 01 on the right rather than below the main content area.  Is this possible?

Last edited by richam (2019-11-24 00:15:03)

Offline

#2 2019-11-24 01:41:42

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Map embed with pym

About displaying it in the pallet. You may be able to do that simply by using the Google map embed html.
But if you do, the map will not display on mobile devices unless the viewer knows to click on the mobile menu icon.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2019-11-24 02:39:31

richam
Member
From: Preveza, Greece
Registered: 2013-01-06
Posts: 143
Website

Re: Map embed with pym

Rod, thanks.  I was having trouble using the iframe html from Google.  Whenever I try to publish the Google provided html in Tray 01 (copy), I get an error message returned from Lightroom: "Can't rename the published collection.  Error performing function. (Code: 406)"  This happens only when I try to use iframe html in an album, otherwise the album publishes normally.  And I was not trying to rename anything.  I even tried to publish other albums, some with names I never used before anywhere.  I still got the error message.  Here's a typical Google html, and I've tried different html with other maps:

<iframe src="https://www.google.com/maps/d/embed?mid=1ykplgKvev-BFGpW6910nXHIahsQ" width="640" height="480"></iframe>

Anyway because of the error, I decided to try the pym approach.  Apparently, that won't work for what I want to do.  If there's a way to do it with iframe, that's OK.  But I need to know how to avoid the error problem.  If you have any ideas, please advise.

Offline

#4 2019-11-24 08:38:16

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Map embed with pym

you could bypass Lightroom Publisher and just enter the code in the album directly in Backlight.
In Backlight go to Publisher, then click on albums for the album set that contains the album. Then click on the name of the album and then Edit.
Click on the Page Copy tab and place the code where needed.
If you're placing it in the pallet, you'll probably want to change the width and height settings in the code.

I don't know what other side-effects adding an iframe in the copy might have on your site though. But it seems to work in my initial testing (placing the iframe in the main copy or in the pallet copy), but I haven't tried looking at it on a mobile device.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2019-11-24 16:52:33

richam
Member
From: Preveza, Greece
Registered: 2013-01-06
Posts: 143
Website

Re: Map embed with pym

Rod, that works:  http://www.michaelrichardsphotography.c … of-actium/

On mobile devices the map appears below the bottom of the navigation menu.  OK with me.

One problem: once the map is added, there is no more updating the album with any changes since any "publish now" produces the dreaded error message.  To make changes, need to remove the map iframe in Backlight, make and publish the changes, and then put the iframe back in Backlight.  A bit inelegant, but it works.

Offline

#6 2019-11-24 22:58:50

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Map embed with pym

I’ve not tried this in a album to see if I can reproduce the problem yet, but I’ll give it a go when I get a chance


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#7 2019-11-29 16:10:46

richam
Member
From: Preveza, Greece
Registered: 2013-01-06
Posts: 143
Website

Re: Map embed with pym

Rod, I originally thought that there might have been a proprietary issue between Adobe and Google on this that prevented use of iframe in the LR publisher plugin.  If there's no such issue, then it seems to be a bug that it would be nice to have fixed.
I don't think this has anything to do with it, but I do have two LR plugins activated -- one for all my travel galleries, and one for all the others.  They are located on my site in "travel" and "galleries" folders, respectively.

Offline

#8 2019-11-29 23:39:20

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Map embed with pym

I get no errors when adding the iframe html to a content area in an album in Lightroom Publisher


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#9 2019-11-30 01:35:28

richam
Member
From: Preveza, Greece
Registered: 2013-01-06
Posts: 143
Website

Re: Map embed with pym

Rod, thanks for the feedback.  I'll do some more troubleshooting, but I suspect corrupted LR catalog(s).

Offline

#10 2019-11-30 14:08:09

richam
Member
From: Preveza, Greece
Registered: 2013-01-06
Posts: 143
Website

Re: Map embed with pym

Rod, I ran a test as follows and still got the dreaded error message.  I set up a new folder at the root of my site, named "bed".  Then started a new empty LR catalog named "Test".  Installed LR publisher for location "bed".  Then set up a first album with a few images and published OK.  Then tried to add an iframe command to the main copy, and got the error message.  I'm using Mac OS Catalina 10.15.1 and the latest 2019 version of Lightroom Classic.
If you have any other ideas or suggestions, please advise.  And thanks for sticking with me this far.

Offline

#11 2019-11-30 23:51:11

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Map embed with pym

What was the exact html code you added to the copy area?


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#12 2019-12-01 02:47:20

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Map embed with pym

I just tried with a new top-level gallery page, and a new instance of publisher. I'm getting no Lightroom errors
I'm on Windows 10, though I doubt the OS should make any difference.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#13 2019-12-01 17:40:29

richam
Member
From: Preveza, Greece
Registered: 2013-01-06
Posts: 143
Website

Re: Map embed with pym

rod barbee wrote:

What was the exact html code you added to the copy area?

A couple of examples:

<iframe src="https://www.google.com/maps/d/embed?mid=1t2A1GisxyC6NA7IwY_613Kr-NEXM1hh0&z=11" width="350" height="480"></iframe>
<iframe src="https://www.google.com/maps/d/embed?mid=1WVOEFU4Jsmngr3v_ytu0s53lyf9SxdaQ&z=9" width="350" height="480"></iframe>
<iframe src="https://www.google.com/maps/d/embed?mid=1ETfMW8JRX9g_Oa51DQd0ZoPzBrBkvMdv&z=7" width="350" height="480"></iframe>

These are currently working OK as long as I paste them directly in Backlight Publisher/Albums/[Album Name]/Edit/Page Content.  But always get the error message if I try to publish via LR.

I might add that after directly pasting in Backlight Publisher, the new iframe HTML shows up in the LR "Edit Album (or Edit Album Set)" dialog in the Page Content tab.   But any changes made anywhere in the dialog won't take -- get the error message when trying to update anything.  In order to make changes, have to remove the iframe HTML in Backlight Publisher, make the changes, and then re-paste the HTML.

Last edited by richam (2019-12-01 17:52:36)

Offline

#14 2019-12-01 17:43:55

richam
Member
From: Preveza, Greece
Registered: 2013-01-06
Posts: 143
Website

Re: Map embed with pym

rod barbee wrote:

I just tried with a new top-level gallery page, and a new instance of publisher. I'm getting no Lightroom errors
I'm on Windows 10, though I doubt the OS should make any difference.

I wonder if the Mac OS X 64 bit Catalina operating system might have something to do with it.  I've had problems with other software that doesn't run well or not at all on the new Catalina operating system.

Offline

#15 2019-12-02 19:12:24

richam
Member
From: Preveza, Greece
Registered: 2013-01-06
Posts: 143
Website

Re: Map embed with pym

More troubleshooting but probably no help.

I have an old Mac using High Sierra operating system (2 previous to Catalina).  I installed Backlight 2 and Lightroom, all the latest versions.  Set up a test album, and got the same error message when I tried to publish an iframe HTML.  By elimination, I don't think Catalina or any Mac operating system is the problem, as you said.

One thing I noticed.  It takes some seconds, maybe 4 or 5, between issuing the "Publish" command and return of the error message -- like something timed out.  I tried the API Requests Delay, but it didn't help.

Wish I had more helpful news.

Offline

#16 2019-12-02 22:09:50

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Map embed with pym

Maybe someone with a Mac can try reproducing the problem.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#17 2019-12-03 01:06:16

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Map embed with pym

I created an album and an album set and used the html code for the iframe in the description field. Published without error and the maps show on my page.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#18 2019-12-03 01:08:55

richam
Member
From: Preveza, Greece
Registered: 2013-01-06
Posts: 143
Website

Re: Map embed with pym

Daniel Leu wrote:

I created an album and an album set and used the html code for the iframe in the description field. Published without error and the maps show on my page.

Are you using a Mac?  If so, please provide details -- OS version, LR version, etc.

Offline

#19 2019-12-03 01:58:04

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Map embed with pym

richam wrote:
Daniel Leu wrote:

I created an album and an album set and used the html code for the iframe in the description field. Published without error and the maps show on my page.

Are you using a Mac?  If so, please provide details -- OS version, LR version, etc.

I'm on Mojave 10.14.6 with Lr Classic 8.4.1.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#20 2019-12-03 16:56:25

richam
Member
From: Preveza, Greece
Registered: 2013-01-06
Posts: 143
Website

Re: Map embed with pym

Daniel and Rod, Thanks for your help on this.  I'll recap in hopes that you could suggest something I haven't tried.  First, the error message looks like this:
Error Message
This occurs anytime I try to publish iframe HTML via LR Publisher plug-in.  The plug-in is 4.0.9.  LR Classic is 9.0.

I can bypass LR and paste the iframe HTML via Backlight 2 Publisher in a browser.  This works, but If I do it, I get the error anytime I try to change anything, even minor, in the LR "Edit Album" dialog.  Although I can edit the photos and publish OK.

I have two LR Publish services running on my main computer (Catalina), but everything else works ok except the iframe HTML.

I installed LR and the backlight plug-in in an old computer running High Sierra.  I set up only one Publish service with a test album using names I've never used anywhere.  Again I got the identical error message problems whenever I added an iframe HTML in any of the Page Copy windows.

I reinstalled all Backlight Modules:  Backlight 2, Galleria, Theater, and WP Theme.

I ran the update Album Files and Backlight Index files several times.

PS:  Same error message if I use a URL other than Google, e.g. one of my site pages.

Several time I tested albums with names I've never used anywhere before.

I even changed the API key, and the delay API requests option; again no help.

So, I'm stumped.  If you have any ideas, please let me know.  And thanks again.

Last edited by richam (2019-12-03 18:32:29)

Offline

#21 2019-12-03 23:22:55

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Map embed with pym

Sorry, I don't know what's going on. But you might try to use phplugins to insert your iframe code in the target album(s). Not as elegant, but might be a workaround until the cause of your issue is found.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#22 2019-12-03 23:59:06

richam
Member
From: Preveza, Greece
Registered: 2013-01-06
Posts: 143
Website

Re: Map embed with pym

Daniel Leu wrote:

Sorry, I don't know what's going on. But you might try to use phplugins to insert your iframe code in the target album(s). Not as elegant, but might be a workaround until the cause of your issue is found.

Could you elaborate a bit?  I had always figured phplugins were attached to a page template and pertained to any album using that page template, e.g. the script that enables FontAwesome.  You seem to imply a different iframe HTML can be inserted on individual albums, even though many albums could use the same page template. Are you saying I can insert a phpplugin script on a per-album basis?  Where and how could I make this happen?

Offline

#23 2019-12-04 03:31:20

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Map embed with pym

Yes you can! In your phplugin function, you can check on which page you are and insert your code as desired. An example is shown on this blog post where I insert breadcrumbs on non-gallery pages.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#24 2019-12-06 00:19:01

richam
Member
From: Preveza, Greece
Registered: 2013-01-06
Posts: 143
Website

Re: Map embed with pym

Daniel Leu wrote:

Yes you can! In your phplugin function, you can check on which page you are and insert your code as desired. An example is shown on this blog post where I insert breadcrumbs on non-gallery pages.

Daniel, I tried to set up php for this, but not able to get to square one.  In it's simplest form, I tried this:

function ttg_pallet01_bottom() {
    echo "pallet01";   
} // END

or

function pallet01_bottom() {
    echo "pallet01";   
} // END

Could not get anything to show up in pallet 01.

I think I can get the if-else-end statement working later, but could you give me something to start with?  In the end, I want to insert iframe snippets based on album title or slug.

Offline

#25 2019-12-06 02:39:40

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Map embed with pym

I would try with album_bottom() and albumset_bottom() instead. Please post a link when you did it and it's still not working.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

Board footer

Powered by FluxBB