Search…

X3 Photo Gallery Support Forums

Search…
 
Eightkiller
Experienced
Topic Author
Posts: 116
Joined: 15 Jul 2012, 14:34

X3.23 Images linked via Social Media not opening in the popup

26 Jun 2017, 05:13

Hy,

The images linked in social medias are not linked in a pop up like it is said in the patch list. I have to click on the magnifying glass "+" icon on the image to get to the pop up.

Is it normal ? My update went well I had no errors.

Image
Thanks in advance.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: X3.23 Images linked via Social Media not opening in the popup

26 Jun 2017, 08:54

Just tried it from here, and it works exactly as it should, as announced.
  1. Go to https://demo.photo.gallery/galleries/landscapes/
  2. Click to view an image
  3. Share the image on Facebook (you can share in private message to yourself for testing https://d.pr/i/jYgl4P).
  4. Click the shared link from facebook.
  5. .... which points to https://demo.photo.gallery/galleries/la ... antarctica
  6. Works nicely http://d.pr/i/vXneVB
Your screenshot doesn't work. And perhaps you have a link so I can test it from here?
 
Eightkiller
Experienced
Topic Author
Posts: 116
Joined: 15 Jul 2012, 14:34

Re: X3.23 Images linked via Social Media not opening in the popup

26 Jun 2017, 09:12

You can test with this picture for example try to share it and see :

https://www.insightspirit.com/galerie/r ... pirit-0171

I tested it with different pictures and I always end up as I said on my previous post, I dont get why.

Thanks for your help.

P.S. The only modification I've made to the page is in my custom CSS with a : 
Code
.x3-file .meta {
  display: none;
}
 To hide the EXIF info.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: X3.23 Images linked via Social Media not opening in the popup

26 Jun 2017, 12:39

You have an ERROR in some custom javascript you have added, which is blocking the X3 javascript process from completing and opening the image in popup:
Image
Code
Uncaught (in promise) TypeError: Cannot set property 'textContent' of null
    at (index):40
    at <anonymous>
Image

Not quite sure what you are trying to achieve with that code ...
 
Eightkiller
Experienced
Topic Author
Posts: 116
Joined: 15 Jul 2012, 14:34

Re: X3.23 Images linked via Social Media not opening in the popup

28 Jun 2017, 04:29

Hy,  I deleted all the js and cleared my browser cache to see, the problem still persists. You can check again !

Thanks for your help.

P.S. (Yet , I'll have to modify the code and still have some ServiceWorker code, it is used for users to be able to "add to homescreen"  my website as it was an application on their smartphone (with a service-worker.js empty file and a manifest.json file, it is the basics of progressive webp apps), so I have to register an empty ServiceWorker to do it).
But for the sake of the debugging, for now I removed it completely to see if we can get the pop-up working properly then I'll add it again with no errors (further questions will come then ^^)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: X3.23 Images linked via Social Media not opening in the popup

28 Jun 2017, 17:14

Hi. Yes you are right. It's something to do with _underscores vs -dashes vs cAsE in your image names, and a bug in X3 with some related combination. You will see that it works for images without _underscore.

Sorry, Im away for two days, but will reply in more detail within Friday.
 
Eightkiller
Experienced
Topic Author
Posts: 116
Joined: 15 Jul 2012, 14:34

Re: X3.23 Images linked via Social Media not opening in the popup

29 Jun 2017, 12:51

No problemo ;-)

Indeed, I renamed all my files with only low cases and dashes, and it's working perfectly. Nevertheless, a bug seems to persist :

- When I share a landscape picture on facebook for example, it's working flawlessly with a preview image
- But when I share a portrait one, there is no preview picture in the shared link ?? (I have tested with several portraits and landscapes and it's always the same)

→ Image

Thanks for your help :). I'm working quite hard on finding stealth bugs xD
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: X3.23 Images linked via Social Media not opening in the popup

29 Jun 2017, 14:17

Eightkill wrote:Indeed, I renamed all my files with only low cases and dashes, and it's working perfectly.
Will look into this, but will have to be next main release, as it requires fixes to the core X3 javascript. You shouldn't have to rename files to get it working correctly.
Eightkill wrote:Nevertheless, a bug seems to persist :

- When I share a landscape picture on facebook for example, it's working flawlessly with a preview image
- But when I share a portrait one, there is no preview picture in the shared link ?? (I have tested with several portraits and landscapes and it's always the same)
This is Facebook, not X3, and it's just a coincidence that your tests showed landscapes working but not portraits. Portraits work fine also:

The problem is that Facebook doesn't load the image for the "first" request. I don't know why Facebook works shitty like this, but I assume they are greedy about speed, and want to display the link ASAP to visitor, without waiting for their bots to visit the shared link to extract the image. You will find that if you share a link AGAIN, that you previously tried to share earlier, second time it will have the image loaded, because Facebook have sent their bots over to grab the preview image.

You can also use Facebook debugger, input the link to be shared, and click "scrape again":
https://developers.facebook.com/tools/debug/

Point is, if I try to share an URL that is not already cached on Facebook, it will look like this:

But hey, let's try to share that same link a minute later:

Works fine ...

You can use the FAcebook debugger to force-refresh a shared page:
https://developers.facebook.com/tools/debug/
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: X3.23 Images linked via Social Media not opening in the popup

25 Nov 2017, 11:22

TWO issues here have been resolved since release of X3.24.0.
https://forum.photo.gallery/viewtopic.php?f=51&t=9445
  • Issue with cAsE and _underscore in image names when sharing is resolved.
  • Facebook will now always show preview image correctly on first share.