Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carousel: image meta data not added to image when image is loaded via AJAX #11151

Closed
abhijitrakas opened this issue Jan 16, 2019 · 3 comments · Fixed by #11195
Closed

Carousel: image meta data not added to image when image is loaded via AJAX #11151

abhijitrakas opened this issue Jan 16, 2019 · 3 comments · Fixed by #11195
Assignees
Labels
[Feature] Carousel A fullscreen modal appearing when clicking on an image in a gallery or tiled gallery. [Type] Bug When a feature is broken and / or not performing as intended
Milestone

Comments

@abhijitrakas
Copy link

This filter not working on ajax call. It's perfectly working on page load and carousel also working fine.

I have Load more button to load images, on click of that button I am fetching images using ajax call. But during this ajax call the filter doesn't get called and the image data attribute doesn't load.

Because data attribute doesn't load for all newly added images the carousel doesn't work for those images.

@jeherve jeherve added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Carousel A fullscreen modal appearing when clicking on an image in a gallery or tiled gallery. [Pri] Low Good For Community labels Jan 16, 2019
@jeherve jeherve changed the title Filter not working on Ajax call Carousel: image meta data not added to image when image is loaded via AJAX Jan 16, 2019
@jeherve
Copy link
Member

jeherve commented Jan 16, 2019

I'm afraid Carousel wasn't built for this use-case. This is not something we plan on implementing right now, but if you want to contribute a PR to add this feature, we'll happily review it!

Thanks for the feedback.

@abhijitrakas
Copy link
Author

@jeherve After digging in the code, I found that wp hook not gets called on REST-API call. Hence this action not get called.

Changes in this PR creates an issue. Probably this action should call on init hook like it was before. But, I think if we revert it back then, it creates issues for AMP pages.

@jeherve jeherve added this to the 7.0 milestone Jan 17, 2019
@jeherve jeherve added [Type] Bug When a feature is broken and / or not performing as intended and removed Good For Community [Pri] Low [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it labels Jan 17, 2019
@jeherve
Copy link
Member

jeherve commented Jan 17, 2019

That makes sense indeed, nice catch! That PR has created other issues, so we'll see what we can do to fix this.

Related: #10945

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Carousel A fullscreen modal appearing when clicking on an image in a gallery or tiled gallery. [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants