plone / plone/plone.patternslib
Traceback with `andSelf` while trying to initialize leaflet pattern (Plone 6)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 5
- Avg merge
- 7h 25m
- Merged PRs (30d)
- 2
Description
On Plone 6 (buildout.coredev), we have a traceback when trying to use leaflet (because of andSelf removal in jQuery > 3):
patterns.pat.leaflet: Failed while initializing 'leaflet' pattern. TypeError: $el.parents().andSelf is not a function
Replacing it by addBack() works like a charm ... for this pattern.
I don't know how jQuery versions are handled between the different Plone packages / patterns, so I would like to have inputs on the best way to fix that everywhere without breaking code still using old jQuery version(s).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the leaflet pattern code that calls $el.parents().andSelf, then inspect how supported jQuery versions are handled across the pattern packages. Reproduce leaflet initialization on Plone 6 and verify the pattern works with the supported versions without breaking older jQuery compatibility.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100