WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] Found a Bug? - Media - Lightbox isn't working (21 posts)

  1. klartext-ne
    Member
    Posted 1 year ago #

    Hi, i try my best to explain this in English.

    At first I'm using a Lightbox to show my pictures. I tried several, now i use WP Slimbox2. After I've updated from 3.4.2 to 3.5.1 i found a very strange behavior. My Lightbox wasn't working anymore. But only when I tried to open a picture form a gallery. A single pic worked fine.

    So when i click to open a gallery picture the attachment side opens, exact with that picture. But the Lightbox should do so. I was confused.
    But if i click the picture (attachment side) the Lightbox works again. Ooops???

    Ok, enough small talk.

    I fond out:
    Usually the picture link contains this: rel="lightbox[12345]"

    It's so if you upload only 1 picture.
    But if you upload a gallery it isn't!! This part is missing.

    As i wrote before i tried several Lightbox plugins. And it works fine until 3.5.X update. So i think this must be WP bug!

    To find out if this is a plugin fault I've installed WP 3.5.1 totally new, no other plugins and tried it again. Same error again!

    See here: http://www.klartext-ne.de/2013/02/03/grevenbroich-balluebergabe-in-der-mobilen-jugendarbeit/

  2. klartext-ne
    Member
    Posted 1 year ago #

    Ok tried 3.4.2

    It works fine!

    This is a 3.5.x Bug !!

  3. WordPress out of the box doesn't do lightbox so I'm not sure how that can be considered a 3.5.1 bug.

    Which lightbox plugin are you using that works in 3.4.2 but not 3.5.1? That information will probably help others assist you in finding a fix.

  4. klartext-ne
    Member
    Posted 1 year ago #

    Hi Jan,
    as i wrote it's WP-Slimbox2. But i tries several. All the same.
    Check out the link I've posted. Click the single picture and the lightbox opens.

    Try the gallery pictures (3) and you'll see what happens. No lightbox and redirected to the picture site. And then click again and voila: Lightbox.

    No problem in 3.4.2

  5. klartext-ne
    Member
    Posted 1 year ago #

    In the gallery link you won't find: rel="lightbox[12345]". But you'll do in the single picture link.

    This happens several times in every lightbox plugin i tried (4). So this is a WP 3.5.1 Bug.

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    It's more likely that the plugin(s) has a compatibility problem (probably javascript) with 3.5.1 -- note that it has not been updated in some time:

    http://wordpress.org/extend/plugins/wp-slimbox2/

  7. klartext-ne
    Member
    Posted 1 year ago #

    Could be. But I've tried:

    Fancy Box - Compatible up to: 3.5.1
    WP Lightbox 2 - Compatible up to: 3.5.1
    Lightbox Plus ColorBox - Compatible up to: 3.6-alpha

    All the same problem!

    Don't try to blame the plugins. There is something wrong in WP 3.5.1.

  8. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Do those problems happen in the default WP theme (twentytwelve) with all other plugins deactivated?

  9. @klartext-ne said:

    Don't try to blame the plugins. There is something wrong in WP 3.5.1.

    No, there is not a bug in WP 3.5.1 concerning lightbox.

    This happens several times in every lightbox plugin i tried (4).

    This happens several times in every lightbox plugin i tried. That's the operative word here: plugin.

    This is simply a plugin issue with a plugin that is not maintained and/or updated for WP 3.5+.

    This could also be an issue with your third party there. This where you got your theme: http://www.der-prinz.com/branfordmagazine-wordpress-magazine-style-theme/ Check to see if there is an update.

  10. klartext-ne
    Member
    Posted 1 year ago #

    No nothing is wrong - its all about the plugins or themes.

    Guess:
    WP 3.5.1 - Twenty Twelve
    NO plugins except WP-Slimbox2

    check here

    Nothing happens. No Lightbox - no rel="lightbox[12345]" in the link.

    And now??

  11. Nothing happens. No Lightbox - no rel="lightbox[12345]" in the link.

    And now??

    Hi klartext-ne,

    I just tested WP-Slimbox2 on a 3.5.1 test build with Twenty Twelve and got it to work fine with a gallery.

    Two things:

    1. When selecting gallery options, be sure to select Link to Media file
    2. If the [gallery ids="----"] shortcode doesn't contain link="file", make sure it does. Such as [gallery link="file" ids="----"]

    There's a bug with link="file" not being correctly added to gallery shortcodes in 3.5.1. See here: #23298

  12. Edit: I'm pretty sure Drew is right. On my test install it took me 2 or 3 tries to get the gallery to actually link to the media instead of the attachment page. Once it started working then it stayed working for me.

    - - - - - -

    I don't think it's not a bug exactly, can you confirm how you are adding those images?

    Visit this link as an example.

    http://dixie.dembowski.net/?p=4382

    See the first image (*COUGH* of the amazingly confident looking person *COUGH!*) on top? Click that and you'll see the link goes to the attachment page. That link is this one.

    http://dixie.dembowski.net/?attachment_id=14

    See the second image (of the lady who has infinite patience with me)? That brings up the lightbox and that link is this one.

    http://dixie.dembowski.net/wp-content/uploads/2013/01/not-smug.jpg

    It uses the lightbox for me because I've activated the same plugin you are using which is WP-Slimbox2.

    Looking at your example page I see that the images are referring to the following URLs.

    http://neu.klartext-ne.de/?attachment_id=29
    http://neu.klartext-ne.de/?attachment_id=28
    http://neu.klartext-ne.de/?attachment_id=26
    http://neu.klartext-ne.de/?attachment_id=27
    http://neu.klartext-ne.de/2013/02/03/36/2013-02-02_ne_muellaktion_danach_012-2/
    http://neu.klartext-ne.de/2013/02/03/36/2013-02-02_ne_muellaktion_danach_013-2/

    None of which are the media URL and will not work for that plugin.

    Can you post a simple single image and confirm that it's pointing to the media such as this URL:

    http://neu.klartext-ne.de/wp-content/uploads/2013/02/2013-02-02_Ne_Muellaktion_danach_013.jpg

    That should work with that plugin if you can get it to link to the straight image URL like that.

  13. klartext-ne
    Member
    Posted 1 year ago #

    Thank you all. I'm writing from Germany so we have differed time zones.

    This is what i found out. I've installed WP 3.4.2 and WP-Slimbox2 (or one of the others). Uploaded a gallery choosing Media file as target (as I always do). No problems, lightbox is working fine.

    Next i updated to 3.5.1. Lightbox is working fine (oops?). After this I've uploaded a new gallery. Same problem! NO lightbox. So i think there should be something wrong.

    @Drew
    I'm only a user. I don't have any further knowledge about coding.
    1. I always do so.
    2. How can i do this?

    @Jan
    the neu.xxx is only my testing site.

    Check this pls:
    http://www.klartext-ne.de/2013/02/03/grevenbroich-balluebergabe-in-der-mobilen-jugendarbeit/

    The single pic is working fine, as usual. Then try the gallery (3 files). No lightbox function. Uploaded after update to 3.5.1.

    Pic Link (gallery):
    http://www.klartext-ne.de/2013/02/03/grevenbroich-balluebergabe-in-der-mobilen-jugendarbeit/2013-02-01_gv-jugendarbeit_010/
    ------
    Try this:
    http://www.klartext-ne.de/2013/01/31/kaarst-pkw-brand-35-einsatz-der-ffw-kaarst/
    Pic Link (gallery):
    http://www.klartext-ne.de/2013/01/31/kaarst-pkw-brand-35-einsatz-der-ffw-kaarst/2013-01-31_kaa_pkw-brand_011/

    Same problem
    ------
    But then here:
    http://www.klartext-ne.de/2013/02/02/neuss-aktive-buerger-sammelten-muell/

    Pic Link (gallery):
    http://www.klartext-ne.de/wp-content/uploads/2013/02/2013-02-02_ne_muellaktion_010.jpg

    The last link is pointing to a *.jpg. In the last two galleries not. All these galleries where uploaded after the update.

    Here i had some problems. First i tried to build two galleries. Separate before/ after pics. This doesn't worked. One gallery had a lightbox the other not. So i joined both and, i don't know how, the lightbox appears.
    -----

    I think this (wrong/ incomplete links) could be the problem. How can i fix this??

    Is this "my" problem?
    There's a bug with link="file" not being correctly added to gallery shortcodes in 3.5.1. See here: #23298

    I've tried this here:
    http://core.trac.wordpress.org/attachment/ticket/23298/23298.patch

    No, same problem

  14. klartext-ne
    Member
    Posted 1 year ago #

    Ok, maybe this fixes the problem. At testing site the link seems to be correct now.
    http://neu.klartext-ne.de/2013/02/04/neuen-beitrag-erstellen-2-2/

    I'll try this now in main page

    HEUREKA!!! Fixed!!!!

  15. klartext-ne
    Member
    Posted 1 year ago #

    Well done.

  16. liquidblue
    Member
    Posted 1 year ago #

    I agree possible bug...

    1. When we add a new post and Create A Gallery upload 3 images
    the default is MEDIA FILE 3 columns.

    2. When inserted in TEXT view the code doesn't contain link="file"
    (So by default its not working)

    Simple fix is to toggle to Attachment page insert
    then go back and toggle back to Media File and update.

    and it places the correct link="file" in code.

    Please fix. see here as well
    http://wordpress.stackexchange.com/questions/83145/gallery-set-to-media-file-showing-as-attachment-page

  17. klartext-ne
    Member
    Posted 1 year ago #

  18. liquidblue
    Member
    Posted 1 year ago #

    Thank you... I am working this patch now.

    Question: the patch uses "Post" selected.
    We would prefer the default to be File.
    when I do this below it still doesn't initially insert.

    <option value="post">
       <?php esc_attr_e('Attachment Page'); ?>
    </option>
    <option value="file" selected>
       <?php esc_attr_e('Media File'); ?>
    </option>

    but still by default inserted gallery still will not add link="file"
    unless I pull down the select menu and toggle it.

    Kinda need it to default and insert without user intervention?

  19. susafri
    Member
    Posted 1 year ago #

    @klartext: could you please tell me how you got this to work?
    Thanks!

  20. klartext-ne
    Member
    Posted 1 year ago #

    Hi, you've to change two files.

    1. wp-includes/js/media-editor.js
    2. wp-includes/media-template.php

    Follow this instructions:
    http://core.trac.wordpress.org/attachment/ticket/23298/23298.patch
    red means: delete this part
    green means: this is new

  21. susafri
    Member
    Posted 1 year ago #

    Thank you! I just discovered this. and it did fix the issue with diplaying the image instead of the page. However isn't the slideshow functionality supposed to automatically start in 3.5.1? If I click on the thumbnail it opens but I cannot navigate to the next imnage.

Topic Closed

This topic has been closed to new replies.

About this Topic