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: JavaScript in some gallery settings #6638

Closed
jeherve opened this issue Mar 13, 2017 · 5 comments
Closed

Carousel: JavaScript in some gallery settings #6638

jeherve opened this issue Mar 13, 2017 · 5 comments
Assignees
Labels
[Feature] Carousel A fullscreen modal appearing when clicking on an image in a gallery or tiled gallery. [Pri] BLOCKER [Type] Bug When a feature is broken and / or not performing as intended
Milestone

Comments

@jeherve
Copy link
Member

jeherve commented Mar 13, 2017

In #6306, we made some changes to the way carousels are loaded. Unfortunately, in some situations it now creates the following JavaScript error:
Uncaught TypeError: Cannot read property 'split' of undefined
On line 451 of modules/carousel/jetpack-carousel.js

You can reproduce the issue here. I unfortunately haven't been able to reproduce the issue on my end. It seems to happen in some cases in in-page galleries, sometimes in slideshows.

Reported here:

@jeherve jeherve added [Feature] Carousel A fullscreen modal appearing when clicking on an image in a gallery or tiled gallery. [Pri] High [Type] Bug When a feature is broken and / or not performing as intended labels Mar 13, 2017
@jeherve jeherve added this to the 4.7.1 milestone Mar 13, 2017
@jeherve
Copy link
Member Author

jeherve commented Mar 13, 2017

cc @thingalon; I'm hoping you might be able to help with this since you touched that code last month :)

Thanks!

@stoyan0v
Copy link
Contributor

stoyan0v commented Mar 13, 2017

I've checked the page link provided in this ticket and it seems that the issue is not related to jetpack-carousel.js

The client is using the gallery shortcode and the Carousel, but its gallery is located in bottom right side. The issue is that there are some images wrapped in an a > div tags ( for example "Ash 318-62-721", "Saddle 318-62-720" etc).
I am not sure that they have been added using shortcodes and it looks like they have been added manually. The Image parent is a div tag and since it doesn't have href attribute we see this error.

cc @jeherve maybe we should check if the parent is an a tag first?

@stoyan0v
Copy link
Contributor

stoyan0v commented Mar 14, 2017

UPDATE: I was able to reproduce this issue here, but using Text editor. Here is the code. I still think that such code can't be added using shortcodes or site builder, but only manually.

Note that you should remove html5 support for caption.

@jeherve
Copy link
Member Author

jeherve commented Mar 14, 2017

I am not sure that they have been added using shortcodes and it looks like they have been added manually.

They used a gallery shortcode, but their outside container is indeed custom. That shouldn't stop them from using galleries though.

maybe we should check if the parent is an a tag first?

Yes, I think we should add an additional check for these edge cases.

@richardmtl
Copy link
Contributor

Noting that in 3165784-t the user said they still had the same bug even with 4.8.2, but I don't have further info from them because they've decided to turn off the Carousel module to solve their problem. Noting here regardless just in case it continues to crop up.

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. [Pri] BLOCKER [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

4 participants