Lightbox not working for some locally stored images

I recently setup a spaces bucket on Digital Ocean. Currently I have a mix of locally stored images on a DO droplet along with that spaces bucket. After initially not configuring the S3 CDN for spaces, I went back and did that and rebaked all posts so the images would have CDN links. Since then it looks like a portion of the locally stored images are not getting lightboxed, everything on spaces seems fine. In Sidekiq the posts associated with these local images pile up in the retries queue and cycle through with the following error below. Clearing out the queue then choosing the rebuild html option in the admin tools for the post reproduces the same problem. The puzzling thing is it only effecting some posts, typically those with multiple images within one post. Have all the latest updates and have done the use update/rebuild to ensure latest code. Thanks in advance for any pointers as to how this might be fixed.

Arguments: {"post_id"=>952, "bypass_bump"=>true, "cooking_options"=>nil,

Error: "current_site_id"=>"default"} Jobs::HandledExceptionWrapper: Wrapped NoMethodError: undefined method 'id' for nil:NilClass

There is no automatic migration when you switch settings.

You have to run a rake task.

./launcher enter app
rake uploads:migrate_to_s3
rake posts:rebake

Hi Sam, thanks for the follow up. To clarify I have a mix of locally stored images being used in existing posts that predated setting up a spaces bucket for image uploads, along with newer posts post image upload settings change containing images uploaded to a spaces bucket.

Any posts containing images stored in the spaces bucket are being lightboxed properly, anything that is still stored locally for posts that predated setting up the spaces bucket for uploads are a mix, some are being lightboxed properly and others are not. Is the expected behavior that images should lightbox properly regardless of where they are stored or should those be migrated migrated to ensure all images will lightbox properly?

Just as a followup for future reference, migrating all images to spaces bucket fixed the problem and everything is now lightboxed after a long rebake. If you want the lightbox to work properly you can’t have a mix of local and remote.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.