In pull request 780 we implemented a Photoswipe library to make it possible to make the image bigger.

This library works fine on the post teaser in the streams, but does currently not work for the post detail page where you get this error after clicking on the image:

js_FBEpSrvAR1BvqZgsWbA2Dd4SHdi83iib1GOI_JBndcU.js:3889 Uncaught TypeError: Cannot read property 'split' of null
    at js_FBEpSrvAR1BvqZgsWbA2Dd4SHdi83iib1GOI_JBndcU.js:3889
    at n (js_FBEpSrvAR1BvqZgsWbA2Dd4SHdi83iib1GOI_JBndcU.js:3889)
    at HTMLDivElement.i (js_FBEpSrvAR1BvqZgsWbA2Dd4SHdi83iib1GOI_JBndcU.js:388

Solution

Currently the image is linking to the original image, causing a double link:

<div class="photoswipe-gallery" itemscope="" itemtype="http://schema.org/ImageGallery" data-pswp-uid="1">
     <a href="/sites/default/files/23.jpg" data-med="/sites/default/files/23.jpg" data-med-size="800x400" data-size="800x400">
       </a><a href="https://distro.getopensocial.net/sites/default/files/23.jpg">
 <img src="/sites/default/files/styles/social_post_photo/public/23.jpg?itok=rDGvnYqp" width="714" height="357" alt="23.jpg" class="img-responsive">
</a>    
 </div>

We need to change the default display mode to not include the link to the image anymore.

Comments

jaapjan created an issue. See original summary.

jaapjan’s picture

Status: Active » Needs review

  • 37d1bb6 committed on 8.x-1.x
    Merge pull request #842 from goalgorilla/feature/2962434
    
    Issue #2962434...
  • jaapjan committed 8c497d6 on 8.x-1.x
    Issue #2962434 by jaapjan: Not able to click on a post image on the post...
bramtenhove’s picture

Status: Needs review » Fixed

Now added in 1.15.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.