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.

#26 Re: Backlight 2 Support » iframe Error problem » 2019-12-17 16:35:44

Matthew wrote:

So the point of the thing is just to open the link in a new window. Try instead:

<a href="..." target="_blank" rel="noopener">...</a>

Thanks for the code idea, it seems to work.  But the actual point was why iframe and onclick won't publish via the LR plugin, but will publish OK using Backlight publisher in a browser.  I have trouble getting my head around this -- how can this be a BlueHost problem?  Maybe it can, but I can't see it.

#27 Re: Backlight 2 Support » iframe Error problem » 2019-12-17 02:27:52

Rod, I just tried publishing your onclick code in a test album.  After about 4-5 seconds, it came back:

"Can’t rename the published collection.
Error performing function. (Code: 406)"

#28 Re: Backlight 2 Support » Iframe center with html code? - Iframe is not responsive » 2019-12-17 02:22:37

I've been using &z= for zoom and &ll= for lat, long.  Seems simple.  To get the lat, long select an existing map pin or place a pin where you want the center to be.  Then edit the pin and copy the lat, long.  The put it in the iframe snippet for embed that you get from Google.  Example:
<iframe src="https://www.google.com/maps/d/embed?mid=1rPtVRR-80ow9vWIjmYXoNx-VISUsA5Dl&z=12&ll=21.36659, -157.95168" width="350" height="480"></iframe>

#29 Re: Backlight 2 Support » iframe Error problem » 2019-12-17 01:43:44

Rod,
The onclick had been working ok on my site (with the closing </a> which I inadvertently omitted here).  I had published it about 2 years ago from the LR plugin.  Everything fine until I recently tried to publish a photo update through LR plugin.  That's when I got the error.  It seems the old LR and plugin versions were more tolerant of code in the text content blocks.  It's only with the latest versions of LR Classic and the plugin that I get the errors.

#30 Re: Backlight 2 Support » iframe Error problem » 2019-12-17 00:21:10

Ben wrote:

Thanks.  The key point here seems to be Bluehost.  It is rejecting the requests with iframes and onclick in the contents.  I've been able to replicate it with my own Bluehost account.  It's likely to be a security layer called mod_security.  This intercepts requests on the server before they reach Backlight. I haven't yet found a way to disable mod_security, to verify that it's the cause.

Strange that it generates an error if publishing via LR, but with Backlight publisher in a browser, no error.

#31 Re: Backlight 2 Support » iframe Error problem » 2019-12-16 17:18:47

Ben wrote:

Looking into this, this looks to be a server issue.  Perhaps a security layer that is balking at receiving submissions that contain JS and iframes, which could be construed as a cross-site scripting attack.  Are you running a security layer on your server, such as mod_security?  If so, can you look for errors in the security logs, or if you're able to, temporarily disable the security service.

On that, who are you hosting with?

Note that we only classify something as a bug after triaging it.  A failure on your setup doesn't necessarily make it a bug in our code.  As this can't be replicated by others then that does seem to be the case.  It works without issue with me, using LR on a Mac.

As Matt has suggested, we strongly recommend other approaches when trying to add code to pages, irrespective of the cause of this particular problem.

I use BlueHost and as far as I know, no security layer.  Perhaps you could advise me how to double check it.
I'm a user, not a developer, so sorry for my mis-use of the term "bug."  Just assume I meant anomaly.
I got around the iframe anomaly with php and help from Rod and Daniel.  Much appreciated.

#32 Re: Backlight 2 Support » iframe Error problem » 2019-12-16 17:06:41

Ben wrote:

Can you post the onclick code here.

<html>
<a onclick="window.open(this.href); return false;" href="http://www.michaelrichardsphotography.com/galleries/personal/shs1957/"><i class="icon-external-link"></i>
</html>

#33 Re: Backlight 2 Support » Error in Lightroom Publisher » 2019-12-16 02:41:15

Ben wrote:

These are two distinct issues. 

The minimise metadata issue is caused by our code trying to print a value that's invalid.  I have never seen this happen, and can only surmise  that this is triggered by publishing multiple albums, under certain values for metadata.  I'll put in a fix for this.

The stack overflow error is caused by what looks to be a bug in LR when it attempts to publish multiple albums in parallel.  This should only happen if you start publishing to one album while another publish is in process.  This should not happen if you trigger a single publish action by instructing LR to publish all albums in an album set.  In that case, LR will publish to each album one by one.

Ben,  I'll try to summarize what I've been experiencing in hopes it will help.

I get the minimize metadata error whenever I try to publish any content text that has an iframe or onclick statement in it.  It's possible to implement iframe or onclick by by-passing LR publisher and using Backlight publisher in a browser.  But when this is done, it's no longer possible to run updates from within LR publisher until the offending text is removed to be re-installed later.  (It took a little work, but Rod and Daniel helped me with a php workaround that allows LR publisher to operate normally).  I still don't know if anyone else has the iframe or onclick problem.  I use Mac Catalina, LR classic, and LR publisher plug-in, all updated to the latest versions.  I also tested this on an older Mac with High Sierra OSX, with identical results.

If I try to publish several albums at the same time, it's possible with a few albums.  More than 4-5 albums at a time, and it likely will produce a metadata or stack overflow error.  If I try to publish from the album set level, and there are actual photos or thumbnails to upgrade, then it hangs on a metadata error, usually when it tries to switch albums after a reasonably successful update of the first album.  I say reasonably since often it fails to upgrade a page or two of the first album before hanging on the error.  So, damned if I do, damned if I don't.  The only way is to publish albums individually or a few at a time, and then checking and re-publishing any that missed a page or two.  After all the albums are fully re-published, then I can push things like multiple metadata updates to albums by re-publishing the parent album set.

I haven't done extensive upgrading for perhaps a year or so, but I remember that previous versions of LR and the plug-in did not produce the publish from album sets problem.

I have workarounds for all these problems, so not complaining.  But it seems like these are bugs that are worth fixing for the convenience of everyone.  Appreciate your effort on this.

#34 Re: Backlight 2 Support » Error in Lightroom Publisher » 2019-12-15 19:42:21

FWIW, I ran into the same problem.  I'm revamping my site (10,000+ images) with new thumbnail sizes, panorama displays, other upgrades.  I finally resorted to republishing albums first, then working up to the album sets levels.  I ran into the same error message that you're getting and sometimes "stack overflow."  I found I could republish maybe 4-5 albums at a time by selecting them individually and "Publish Now", but any more than that ended up with an error.

#35 Re: Backlight 2 Support » iframe Error problem » 2019-12-14 16:03:25

Rod,  Yes.  Latest plugin downloaded and installed.

#36 Backlight 2 Support » iframe Error problem » 2019-12-13 20:00:54

richam
Replies: 18

Just more troubleshooting information.  When I tried to update an album that used "onclick" to open a new window, I got the same error as I did when using iframe.

Please take it as a bug report; not looking for reply.

#37 Re: Backlight 2 Support » Invoke css by album » 2019-12-10 00:19:34

Ben, Rod, thanks again.  I got the desired result by using content width rather than padding:

.slug-links div.content.content_width {
     max-width: 1000px;
}

Now armed and dangerous with css.  Have to be careful.

#38 Re: Backlight 2 Support » Invoke css by album » 2019-12-09 14:21:05

Ben, appreciate the info, but need to know the rest of the story.  Can a if-then statement be set up in css?  Or should it be in php?  If the latter, could it change a css parameter directly? Or should it just change to an alternate css file?  For a specific example, I would like to increase the paddding on my Links page so that it's more centered.  And it's the only page or album that I want changed, and don't want an alternate page template.  How would I set it up?
http://michaelrichardsphotography.com/links/

#39 Backlight 2 Support » Invoke css by album » 2019-12-08 18:27:10

richam
Replies: 4

Suppose you prefer a minor style modification to a particular album, but don't want to establish a separate page template just to call a different css file.  How would you go about it?  E.G. suppose I have 20 albums but want a purple background on just one.  Is is possible to set up a if-then-else statement based on the name of the album slug, within the css or with a separate php function?  Maybe there's an easier way?

#40 Re: Backlight 2 Support » Map embed with pym » 2019-12-08 18:16:22

Rod and Daniel, Thanks again for your help.  Since we are on a bit of a tangent here, I'll ask a related question in a new post.

#41 Re: Backlight 2 Support » Map embed with pym » 2019-12-07 23:07:32

Daniel Leu wrote:

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, I got it working with pallet01_bottom().  I borrowed your snippet (strtolower($this->slug) to get the slug and then echo the iframe command.  I got a few albums working, still many to go.  Here's a couple of examples:

http://michaelrichardsphotography.com/g … t-battles/

http://www.michaelrichardsphotography.c … -varennes/

Appreciate the help.

#42 Re: Backlight 2 Support » Map embed with pym » 2019-12-06 00:19:01

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.

#43 Re: Backlight 2 Support » Map embed with pym » 2019-12-03 23:59:06

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?

#44 Re: Backlight 2 Support » Map embed with pym » 2019-12-03 16:56:25

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.

#45 Re: Backlight 2 Support » Map embed with pym » 2019-12-03 01:08:55

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.

#46 Re: Backlight 2 Support » Map embed with pym » 2019-12-02 19:12:24

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.

#47 Re: Backlight 2 Support » Map embed with pym » 2019-12-01 17:43:55

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.

#48 Re: Backlight 2 Support » Map embed with pym » 2019-12-01 17:40:29

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.

#49 Re: Backlight 2 Support » Map embed with pym » 2019-11-30 14:08:09

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.

#50 Re: Backlight 2 Support » Map embed with pym » 2019-11-30 01:35:28

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

Board footer

Powered by FluxBB