Problem/Motivation
It throws error when when I press keyboard left-right button. (It works so I can slick the images with keyboard but I got error at every keypress)
Uncaught TypeError: this.slick is undefined
slideSlick slick-lightbox.min.js:204
bindEvents slick-lightbox.min.js:185
Steps to reproduce
Create a custom content type
Create a field "field_images" (Unlimited images)
Create a dummy content with images
Go to field settings and display (/admin/structure/types/manage/YOUR_TYPE/display)
Change your images formatter to "Slick Image"
Set the Optionset: default
Set the Media switch: slick_lightbox
Save and View the Node
Click to image and press right
Error happening at every keypress (left/right)
Debugging
Issue at:

Debugging:


My composer.json
Packages:
{
"type": "package",
"package": {
"name": "kenwheeler/slick",
"version": "1.8.0",
"type": "drupal-library",
"source": {
"url": "https://github.com/kenwheeler/slick",
"type": "git",
"reference": "1.8.0"
}
}
},
{
"type": "package",
"package": {
"name": "mreq/slick-lightbox",
"version": "v0.2.12",
"type": "drupal-library",
"source": {
"url": "https://github.com/mreq/slick-lightbox",
"type": "git",
"reference": "v0.2.12"
}
}
},
{
"type": "package",
"package": {
"name": "dinbror/blazy",
"version": "1.8.2",
"type": "drupal-library",
"source": {
"url": "https://github.com/dinbror/blazy",
"type": "git",
"reference": "1.8.2"
}
}
}
require:
"dinbror/blazy": "^1.8",
"drupal/slick": "^2.3",
"drupal/slick_lightbox": "^1.3",
"kenwheeler/slick": "^1.8",
"mreq/slick-lightbox": "^0.2.12",
Any idea to fix this issue?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3240904-missing-slick-return-4.patch | 8.17 KB | kecsot |
| #3 | 3240904-missing-slick-return-3.patch | 8.58 KB | gausarts |
| issue.png | 34.8 KB | kecsot | |
| debugging.png | 51.71 KB | kecsot | |
| console.png | 50.96 KB | kecsot |
Comments
Comment #2
kecsotComment #3
gausarts commentedThank you.
You are correct. My mistake, I didn't give what it wants :)
Let me know if this fixed it.
Comment #5
gausarts commentedCommitted. Thank you for contribution!
Comment #6
kecsotWorks well.
I'm really happy because 1.4.0 version released with this fix. It was so fast :)
Thank you for your work!
Comment #7
kecsotThere is a minified js inside your patch.
When you create a patch then you generate a new slick-lightbox.load.min.js.
Maybe you did this patch after another patch.
So basically I can't apply this .js to the released 1.3.0 version.
If someone wants to apply 2 patches from this project, then it's impossible. (If patches affect the same js)
I suggest to remove the minified js from the project.
Here is a patch for 1.3.0 release.
Comment #8
gausarts commentedThis was already included in release 1.4.
No need to include these patches at 1.3.
Be sure to start with full releases when available, not backwards, else headaches :)
Dev version is fine, but not backwards.
Must move forwards.