Opened 2 years ago
Closed 2 weeks ago
#59991 closed defect (bug) (worksforme)
Included imagesLoaded libary broken
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 6.4 |
| Component: | External Libraries | Keywords: | needs-test-info |
| Focuses: | javascript | Cc: |
Description
On the current WordPress release version, the included imagesLoaded javascript file is broken. The minified file appears to include two minified versions of the actual script and breaks functionality. To reproduce, see wp-includes/js/imagesloaded.min.js.
Change History (14)
#2
follow-up:
↓ 4
@
2 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 6.5
- Version changed from trunk to 6.4
Looks like this was changed in https://core.trac.wordpress.org/changeset/56393, see https://core.trac.wordpress.org/ticket/56731#comment:21
#3
@
2 years ago
- Keywords needs-patch removed
- Version changed from 6.4 to trunk
Hi @adamsilverstein , lovely to meet you.
I believe you should be able to reproduce the error. Just create a simple masonry layout and include imagesLoaded as a condition, like described here. It's producing the usual xyz-is-not-a-function error when a required script hasn't loaded. You can compare functionality by including your own imagesLoaded instead.
I hope this helps!
#4
in reply to:
↑ 2
@
2 years ago
Replying to adamsilverstein:
Looks like this was changed in https://core.trac.wordpress.org/changeset/56393, see https://core.trac.wordpress.org/ticket/56731#comment:21
imagesLoaded had been updated to 5.0, but obviously included in a way that breaks the script, hence my report :) .
#5
follow-up:
↓ 6
@
2 years ago
- Keywords needs-patch added
- Version changed from trunk to 6.4
Hey @physalis - thanks for the details about reproducing.
Reviewing the NPM library upstream the built file we bundle looks correct: https://unpkg.com/imagesloaded@5.0.0/imagesloaded.pkgd.min.js
So the issue may not actually be with the built file but rather with how we are using it or some breaking change in the library.
I believe you should be able to reproduce the error. Just create a simple masonry layout and include imagesLoaded as a condition
Ok, that sounds like a bit of a challenge! Do you have a live site or demo plugin that reproduces the issue?
#6
in reply to:
↑ 5
@
2 years ago
Replying to adamsilverstein:
Ah, you're right, I could have sworn the packaged file was different from the version I then downloaded from the creator of the script. Just by switching to the file (from the link you posted above) in my theme made my script work again. Before 6.4.x it was working fine.
Ok, that sounds like a bit of a challenge! Do you have a live site or demo plugin that reproduces the issue?
Well, it's a live site, so if you could just ping me when you could identify the issue, I'd love to revert it back to a functioning version :) . Just see here. If you replace the URL for imagesLoaded to https://www.zukunft-des-engagements.de/wp-content/themes/nes/js/imagesloaded.pkgd.min.js, the masonry block is working again.
Just for explanation: It's a custom block that uses imagesloaded and masonry, loading both scripts through the viewScript line in block.json:
"viewScript": [ "nes-accordion", "imagesloaded", "masonry", "nes-eventfeedback" ]
This ticket was mentioned in Slack in #core by oglekler. View the logs.
21 months ago
#9
@
21 months ago
- Keywords needs-testing-info added; needs-patch removed
This ticket was discussed during bug scrub.
We need steps to reproduce the bug and/or reports that it is happening and how. It can include function which arrows the issue or description what needs to be done step by step.
Add props to @hellofromTonya
This ticket was mentioned in Slack in #core by nhrrob. View the logs.
21 months ago
#11
@
21 months ago
- Milestone changed from 6.6 to 6.7
Looks like it doesn't have enough movement and we are 1 week away from RC1.
Moving to next milestone 6.7
#12
@
17 months ago
- Milestone changed from 6.7 to Future Release
As this doesn't have clear reproduction steps, I've moved it off the 6.7 milestone.
@physalis Are you able to provide a minimal version of the block you are using to allow folks to reproduce the issue?
#14
@
2 weeks ago
- Keywords dev-feedback removed
- Milestone Future Release deleted
- Resolution set to worksforme
- Status changed from new to closed
It's been some time since this one received any attention and it's still unclear what can be done to reproduce.
I'm going to close this one out as worksforme. @physalis if you are still see experiencing this issue, please feel free to reopen with more detailed steps to reproduce on a default install of WordPress.
Hi @physalis - thanks for the bug report.
Looking at the file, it does appear to have some duplication although the code blocks are not the same. This is a built file, so we need to look into the build process to see if there is an issue.
How can you tell this is broken, what issue does this cause? are you seeing console errors/failed functionality?
Can you please provide steps to reproduce any issue you see?