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-30 11:28:27

Eric_H_Johnson
Member
Registered: 2017-07-09
Posts: 14

Errors publishing image to gallery with Backlight-Pages-123-Release2

(1) I updated to Backlight-Pages-123-Release2 as instructed and tried adding an image to a gallery via TTG Publisher and got this message.

Can’t update this collection.
Unable to perform action: uploadRendition
Message: Unexpected error: Undefined index: id in PublisherDelegate.php on line 598

Attempting to add an image to a different gallery fails with a different message.

Can’t update this collection.
Unable to perform action: uploadRendition
Message: move_uploaded_file(/home/erichjoh/public_html/galleries/Cars/photos/EHJ_150918_181A0518.jpg): failed to open stream: Permission denied in PublisherDelegate.php on line 628

Thinking this might be a permissions issue, I changed the permissions to 777 for Backlight/Publisher and all its contents but the errors persist.

Updated images that already exist in the gallery publish just fine.

============

(2) Right-clicking on any collection within TTG Publisher provides a menu that includes the option, Go To Published Album.  While this option yields that gallery for some collections for other collections it produces:

Paradox 404!
You've found a page that does not exist.

The galleries do exist and can be navigated to using the same page that displays the 404 error.   I’ve never before used this Go To Published Album option, so I’m fine that it doesn’t work perfectly.  So this is just FYI.

Last edited by Eric_H_Johnson (2017-11-30 12:29:11)

Offline

#2 2017-11-30 11:45:35

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

Re: Errors publishing image to gallery with Backlight-Pages-123-Release2

did you also update the Publisher plug-in in Lightroom?


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 2017-11-30 12:19:00

Eric_H_Johnson
Member
Registered: 2017-07-09
Posts: 14

Re: Errors publishing image to gallery with Backlight-Pages-123-Release2

Yes.

Offline

#4 2017-11-30 14:14:10

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Errors publishing image to gallery with Backlight-Pages-123-Release2

Hi Eric,

Can you please re-download the latest version, then remove (delete) and re-upload the backlight/publisher folder currently running on your site?

After this, log in to Backlight. In the menu, go Backlight => Publisher. I'd just like you to visit this page once before attempting to publish. Then try pushing some images from Lightroom.


Matt

The Turning Gate, http://theturninggate.net

Offline

#5 2017-11-30 15:29:10

Eric_H_Johnson
Member
Registered: 2017-07-09
Posts: 14

Re: Errors publishing image to gallery with Backlight-Pages-123-Release2

I re-downloaded Backlight-Pages-123-Release2, deleted backlight/publisher from my server and replaced it with the re-downloaded backlight/publisher.  I logged in to http://erichjohnson.com/backlight/admin/?a=login and accessed the Publisher page making no changes. 

Nevertheless, I still get this for one gallery:

Can’t update this collection.
Unable to perform action: uploadRendition
Message: Unexpected error: Undefined index: id in PublisherDelegate.php on line 598.

and this message for another gallery when trying to add a different image:

Can’t update this collection.
Unable to perform action: uploadRendition
Message: move_uploaded_file(/home/erichjoh/public_html/galleries/Cars/photos/EHJ_150918_181A0518.jpg): failed to open stream: Permission denied in PublisherDelegate.php on line 628

I also replaced TTG-Publisher.lrplugin  and verified via Lightroom’s Plug-in Manager that TTG Publisher 3.3.3 is enabled and re-loaded it and quit and restarted Lightroom only to get the same error messages.

The permissions for backlight/publisher were 755.  I changed backlight/publisher to 777 along with all that it enclosed.  I still got the same errors.

Offline

#6 2017-11-30 16:17:43

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Errors publishing image to gallery with Backlight-Pages-123-Release2

Thanks, Eric. That should rule out corrupt or incomplete upload during the update. Ben will probably need to take a look, as this is more his wheelhouse than mine.

One other possible thing to check out in the meantime, though, we've seen similar errors occur either when hitting the storage ceiling for your hosting, or when attempting to upload files larger than your maximum allowable upload size. If you're able to easily do so, could you check in with your hosting to ensure you're not running out of space?

I'll shoot Ben an email asking him to check in on this thread when he's able.


Matt

The Turning Gate, http://theturninggate.net

Offline

#7 2017-11-30 17:22:05

Eric_H_Johnson
Member
Registered: 2017-07-09
Posts: 14

Re: Errors publishing image to gallery with Backlight-Pages-123-Release2

Thanks for looking at this!

I have have an "unmetered" server account so I assume I'm not over my storage limit.  I did try deleting one image and then tried publishing again to add another image and I still got:

Can’t update this collection.
Unable to perform action: uploadRendition
Message: move_uploaded_file(/home/erichjoh/public_html/galleries/Cars/photos/EHJ_150918_181A0518.jpg): failed to open stream: Permission denied in PublisherDelegate.php on line 628

Then on my web site I see that the previously-published image I tried to delete is still there.  So I deleted from the collection the new image I was trying to add—leaving just the previously-published image to delete as the only thing to update with Publish—and tried again.  That worked—the previously-published image is gone from my web site presumably freeing up space for a new image.

I then tried adding a different image to that gallery and tried Publishing that one but still got:

Can’t update this collection.
Message: move_uploaded_file(/home/erichjoh/public_html/galleries/Cars/photos/EHJ_150918_181A0524.jpg): failed to open stream: Permission denied in PublisherDelegate.php on line 628

Offline

#8 2017-11-30 20:02:43

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

Re: Errors publishing image to gallery with Backlight-Pages-123-Release2

Hi Eric,  solving the error for line 598 has been very tricky.  I like to be able to replicate errors so that I can verify they've been solved.  I can see where it is happening but have been unable to see the error within Lightroom.  I suspect that the behaviour of PHP in handling this error is specific to the version of PHP being run.  To cut a long story short, can you try making a change to this file:

/backlight/publisher/application/delegates/PublisherDelegate.php

Changing line 598 from this:

$destFilename = $valbum->createNameForVirtualCopy($photo['id'], $_FILES['file']['name']);

to this:

$destFilename = $valbum->createNameForVirtualCopy($photo_id, $_FILES['file']['name']);

FYI, this error would only have occurred on first publish of Virtual Copies.

I am interested in seeing what your server is returning.  Can you locate and email me the file ttg.log under your Documents directory on your PC or Mac?


For the error on line 628, can you try changing the permissions of /galleries/ and all files within it?  755 is a good starting point.

Offline

#9 2017-12-01 05:34:22

Eric_H_Johnson
Member
Registered: 2017-07-09
Posts: 14

Re: Errors publishing image to gallery with Backlight-Pages-123-Release2

Hi Ben,

I made the edit to PublisherDelegate.php  and now attempting to publish a new original image and a virtual copy both result in a error on line 628.  I have emailed the TTG.log files of both before and after the edit to PublisherDelegate.php as well as the FTP access to my web site.  I also changed the permissions to 755 of /galleries/ and all files within it.

Thank you for looking into this!

Eric

Offline

#10 2017-12-01 09:01:20

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

Re: Errors publishing image to gallery with Backlight-Pages-123-Release2

Thanks for the logs.  Interesting.  Your log files have entries like this:

{"status":"error","message":"Unexpected error: Undefined index: id in PublisherDelegate.php on line 598"}

This is reporting the error as I had intended.  My Backlight test server responds to the error like this (scroll to the right to see the full response):

{"status":"success","upload":{"filename":"20081211-0014_v1.jpg","type":"application\/octet-stream","size":113401},"asset":{"album_id":19086,"is_complete":"no","filename":"20081211-0014_v1.jpg","url":"http:\/\/backlight.local\/galleries\/album\/","title":"20081211-0014_v1.jpg","id":"19086_67254"},"photoId":"19086_67254"}{"status":"error","message":"Unexpected error: Undefined index: id in PublisherDelegate.php on line 598"}

It may be hard to see, but the difference is that my server responds with a 'successful' result, followed by an 'error' result.  Lightroom only sees the first part, completely overlooking the error.  My efforts to get my server to operate in the way that yours does haven't been successful.

Can you log into Backlight, click on the PHP Info on the Backlight landing page and let me know the version of PHP you are running?

For the remaining error, this still looks like a permissions issue.  Can you provide me with an FTP login so that I can try and find the problem?

Offline

#11 2017-12-01 09:33:40

Eric_H_Johnson
Member
Registered: 2017-07-09
Posts: 14

Re: Errors publishing image to gallery with Backlight-Pages-123-Release2

I'll email the PHP and FTP stuff to you.

Offline

#12 2017-12-01 15:49:56

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

Re: Errors publishing image to gallery with Backlight-Pages-123-Release2

Thanks Erich.  This is the same problem you had earlier in November: The directories and files under galleries are owned by 'erichjoh', which your web server is trying to create files as 'nobody'. 

As it stands, you should be able to create new galleries under 'galleries', but not make changes to existing ones.  A good long term solution would be to ask your host to change the ownership of all files under galleries to 'nobody' (but not to galleries itself).   A less than ideal solution would be to set 777 permission on everything under galleries.

The one potential problem to the above advice is if your host changes the files ownership back to 'erichjoh' again at a later date.  They shouldn't.

Offline

#13 2017-12-02 04:42:55

Eric_H_Johnson
Member
Registered: 2017-07-09
Posts: 14

Re: Errors publishing image to gallery with Backlight-Pages-123-Release2

Thanks!   I'll contact my web host.

Offline

Board footer

Powered by FluxBB