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 2017-11-08 06:19:08

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

corrupt db?

There's something strange going on. I'll create a new album "Test" in an existing publisher instance within LR, adding 3 photos. When I publish it, I end up with a set of Test albums, Test, Test1, Test2.

When I try to delete the Test albume in LR, it generates an error saying LR could not be deleted from the service.

Checking on the web site, sure enough the three albums are still there.

Checking in the web site's Publisher admin page, Backlight > Publisher> Top-level Galleries, sure enough there are three albums called Test only one of them contains photos.

The first one, "Test" is the slug, does not photos. Test1 also did not, but I found the photos in Test2.

I tried creating a new Publisher instance in LR, and one album with two photos. After publishing that, I found two albums at the location on the web site. The first album at slug Test had no photos. The second album with the same name was at slug Test1 and contained the two photos.

Again, deleting the album in LR also generated the error the it could not be deleted from the service.

Attempting to remove the publisher instance in LR fails, or at least it did the first three times I tried. Closing the LR Publishing Manager dialog and then trying to delete the instance a fourth time worked.

I then quit LR and restarted. Created a new TTG publisher instance, and added a couple photos to the default album. Tried to publish this, but it hangs. I suspect it's the same bug I'm running into with my LUA script, but I can't explain how/why it didn't hang before I restarted.

So I delete the LUA script from the template in Backlight. Restart LR and attempt to publish. This time LR completes with no errors. I go to Backlight and find the new top level gallery containing one album, with two photos. Yet when I view the album there's only one photo.

Going back to LR I do see there are the two photos in the test album. I click on the one within LR of the missing one on the web page, and choose "go to published photo." it takes me to the right album, but the photo is still missing. Going back to LR the missing photo is now marked as modified to be re-published.

This problem of photos I've just published jumping back to being flagged as modified to be re-published is happening in other albums. Also I have one album "Patterns" where if I click "go to published photo" it always takes me to the wrong album on the site, within the "Places" album (instead of Patterns).


It's all really strange.

I found this after trying to debug the LUA problem. I should also note that I ran into some really odd problems while migrating all my albums from CE4 to Backlight. Lots of albums and slugs were strange. I also found albums in the wrong sets. Lots of strange things.


I have over 100 albums, and they average over a dozen images in each album. Re-building all of this would be a major undertaking.

So I'm wondering if my database and/or sync between LR and Backlight on my server has been corrupted, and how to fix it.

Where do I begin to fix the problems?


--Jim

Offline

#2 2017-11-08 06:33:39

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

Re: corrupt db?

Hmm, I just saw the note about Backroom and Nginx. Indeed my server is running Nginx, and I'm wondering if my strangeness is related.

The docs for adding the Nginx code doesn't explain where to add that code, or exactly how to add it.

Another thing that has me confused is how there are .htaccess files in several directories, but I thought Nginx didn't use them. Yet when I ask my hosting service's tech support how to add the configuration code for Nginx I was told to add it to my .htaccess file.

I had another strange problem where my WordPress page (about my photos) wouldn't appear under my Photos directory. Photos is controlled by Backllight (templates, album sets, albums, and photos), while the WordPress about page is generated by WordPress. I was getting a 404 error that I couldn't explain. Then I found that if I deleted the .htaccess in /photos/ it all worked.

So now I'm further down the rabbit hole, asking about .htaccess files on my Nginx installation and if they have anything to do with Backlight. If so, where do I go next to understand how to get Backlight working on my Nginx server.

UPDATE: consulting with my hosting service about their Nginx I'm told it's Nginx on top of Apache (acting as a proxy). They do support htaccess files. So everything in htaccess should work. Still, I'm finding problems and when I delete the Backlight rules from htaccess it solves mysterious problems. All I can say right now is something in htaccess generated by Backlight is causing problems.

Last edited by JimR (2017-11-08 09:32:13)


--Jim

Offline

#3 2017-11-08 07:01:09

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

Re: corrupt db?

Wow - I just noticed another thing

All those test albums I created are directories still sitting on my server. That's ever LR failed to delete them, and I went into Backlight admin and deleted them. Backlight no longer shows them but looking with my FTP client I find the directories, and all their contents, are still there. That explains some of the strangeness, like why LR was creating slugs like test1, test2, test3, etc.

Now I'm wondering if some/all of the problems I'm seeing are due to Nginx.


--Jim

Offline

#4 2017-11-08 07:25:35

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

Re: corrupt db?

JimR wrote:

I had another strange problem where my WordPress page (about my photos) wouldn't appear under my Photos directory. Photos is controlled by Backllight (templates, album sets, albums, and photos), while the WordPress about page is generated by WordPress. I was getting a 404 error that I couldn't explain. Then I found that if I deleted the .htaccess in /photos/ it all worked.

Many strange things going on. If you don't mind, I would suggest to share your ftp login with Ben so he can have a closer look.

You gallery directory and your wordpress installation belong into separate directories. Maybe something like

/photos
/blog

Otherwise you run into issues as both Backlight and Wordpress depend on .htaccess for proper operation.


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

Offline

#5 2017-11-08 09:05:36

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: corrupt db?

As we don't provide support for nginx, this isn't something I can spend much time on.  With the plethora of issues, I doubt I would be able to discover much without spending many hours on this.

On migration, Publisher does a wholesale copy of the database file, leaving albums and sets in-place without attempting to move them around.

There is a post on one strategy to re-create albums and sets on the server: http://community.theturninggate.net/vie … hp?id=6828  I would strongly suggest to back up any files before trying this, such as your galleries directory, and the files under backlight/data/

Offline

#6 2017-11-08 09:38:43

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

Re: corrupt db?

Ben wrote:

As we don't provide support for nginx

Understood. There's just something really strange going on. And the more I poke around, the more strange it gets.

I contacted my host's sr technical staff and they tell me it's pretty much an Apache server. They have Nginx running as a proxy for static caching, antibot, and other things. It should just be a normal Apache server. The htaccess files are supported too.

And there's something odd about the htaccess files. I'm findin if I just delete them, things start working (or at least somethings start working).

I think I'm also running into conflicts with the anti hotlinking protection in the cpanel, as well as with the iThemes Security WP plugin. Both of those are writing rules into htaccess.

Let me try and get things clean up as much as possible. Then try to find a basic failure. Right now I think i've gotten myself tied in knots.

Still, there is something really strange going on and I'll need help, once I can clean things up.

One thing for the time being, where can I learn about what Backlight wants in the htaccess file? Which directories does it want to find this?

I migrated from CE4 to Backlight, keeping all my directories. I wonder if older htaccess files/rules are causing conflicts.

Last edited by JimR (2017-11-08 09:42:53)


--Jim

Offline

#7 2017-11-08 09:49:57

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: corrupt db?

Hi Jim, it does sound like you're on Apache then.  Do you think you could find a steps that can be easily reproduced?  That would help make it straightforward to diagnose.

Offline

#8 2017-11-08 09:56:34

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

Re: corrupt db?

Ben wrote:

Hi Jim, it does sound like you're on Apache then.  Do you think you could find a steps that can be easily reproduced?  That would help make it straightforward to diagnose.

Understood. I need to step away for today. I've gotten myself too confused, and will approach it with a fresh start. Too much banging my head on the desk for one day.

Something in the Backlight htaccess files are causing some problems. But I don't think that explains the problems with trying to create/delete albums in LR, such as getting one album creating multiple directories (e.g. test, test1, test2...) and then when deleting that album seeing errors in LR. Then going to Backlight to find the odd series of albums, deleting them, and then finding they still exist while browsing with FTP.

I don't think that's htaccess, but let me clean up today's mess and find a straightforward problem to describe.


I just found this page, http://backlight.theturninggate.net/doc … cess_files

That helped explain a couple things, but there's still a big mystery going on.


--Jim

Offline

#9 2017-11-08 10:04:54

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: corrupt db?

A quick reply on test1/2/3.  The Lightroom SDK provides no facility for us to receive the result back from the server upon album creation.  Publisher has no idea whether the album exists or not after attempting to add one.  What we do then is check whether the album exists upon editing the album or publishing, and create it if needed.  At those points, any error can be intercepted and displayed to the user.
One possible way to debug this would be to check the new log entries in ttg.log when creating an album.  The information returned may shed some light on what's going on.  Since your ttg.log file is large, it would be a good idea to rename the existing file so that a new one is created that is more manageable to view.

Offline

#10 2017-11-12 05:50:26

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

Re: corrupt db?

I can't explain it. I tried replicating all the strange problems I was having originally, but now it's all working. I can't reproduce the duplicate albums, the failed deletions, etc. Everything is normal.

I can only say I was having a bad day with Lightroom. Seems it, Backlight, and my server were out of sync somehow.

I still suspect I have some oddities with htaccess, but will start a new thread for things as I find them.

Let's call this thread closed. I'd rather forget all this. I just gives me a headache, and I wasn't even drinking.


--Jim

Offline

#11 2017-11-12 20:18:37

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: corrupt db?

That all sounds promising.  Hopefully that's the end of it, and the next time you have a headache will be accompanied by the enjoyment of a drink rather than the pain of battling websites.

Offline

Board footer

Powered by FluxBB