Envira Gallery Pagination Not Working in Metabox Custom Field

Support MB Custom Post Type Envira Gallery Pagination Not Working in Metabox Custom Field

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #48593
    saintsaint
    Participant

    Hi Team,

    I am using Envira Gallery to display a list of thumbnails and a lightbox to display the corresponding image and running into an issue where when paginate to the next page, two issues occur:

    1.) When I paginate back to "page 1", the thumbnails do not refresh/reflect the thumbnails in that group. It just continues to show the thumbnail on "page 2"

    2.) When I click on a "page 1" thumbnail, it opens the lightbox gallery just fine, and I can scroll back-and-forth between the images.

    When I navigate to "page 2", and click on the thumbnail image. It just takes me directly to the image URL.

    I've went ahead and:

    a.) Turned off my caching plugin temporarily to test (Perfmatters)
    b.) Flushed all Envira cache
    c.) Cleared all Envira transients

    GIF if issue:
    https://share.zight.com/ApuWpmoj

    And as it turns out, it seems the issue appears when adding the Envira Gallery Shortcode in a Custom Field of a CPT via the Meta Box AIO plugin.

    If the Envira Shortcode is added to a normal page, the pagination looks fine. The images open on the lightbox, and when paginated back to Page 1, the page is refreshed.

    Confirmation GIF available if interested.

    Thank you.

    #48605
    PeterPeter
    Moderator

    Hello,

    Thanks for reaching out.

    I'm afraid that supporting the issue comes from a third-party plugin is beyond our scope of support. I recommend contacting Envira Gallery to ask for more information.

    Refer to our support policy https://support.metabox.io/topic/support-policy/

    #48607
    saintsaint
    Participant

    Hi Peter,

    Thanks for your note. Actually, I started this thread after working with Envira support because it appears the pagination for the Envira gallery shortcode, when added to a normal page looks fine.

    But when added in a Metabox custom field, that is when it displays the abnormal behavior.

    That's why I went ahead and created this ticket. Do you know if there's something that Metabox adds to it's custom fields that may be causing conflict with their gallery?

    Thank you.

    #48631
    saintsaint
    Participant

    Hi @peter, checking in to see if you have any thoughts on this. Thank you.

    #48639
    PeterPeter
    Moderator

    Hello,

    Sorry for the late reply. I don't have any idea why the issue happens. I suggest you use some fields like Custom HTML or Textarea to add the gallery shortcode and output it in the frontend without being affected by any JavaScript code of Meta Box.

    Let me know how it goes.

    #48693
    saintsaint
    Participant

    Hi Peter,

    No problem, thank you for your reply. I just tried both suggestions:

    1.) For the Textarea, it doesn't seem to have any effect and had the same result.

    GIF: https://share.zight.com/nOuOelmQ

    2.) For the Custom HTML area, I added the shortcode in there as well - however, I couldn't find a way to display that on the frontend.

    It was added to the Custom HTML area in the Custom Fields group settings/config, but I didn't see it in the CPT record itself, or was able to find a way to output that out.

    Given that Envira support was able to properly render the gallery directly, but once in a Metabox field it breaks, I suspect something in the output process of a metabox field is interrupting this process?

    #48699
    PeterPeter
    Moderator

    Hello,

    You can use the shortcode to output the field value in the builder https://docs.metabox.io/shortcode/
    or use the PHP code to output the field value in the theme template https://docs.metabox.io/displaying-fields-with-code/

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.