- Issue created by @biarr
- ๐ช๐ธSpain JoseFran
I ran into this problem today. With drupal 10.0.4 and Client-side Hierarchical Select v4.0.0
- ๐จ๐ฆCanada WiredEscape
Also experiencing this problem. No function, no errors displayed.
Drupal 10.0.4
PHP 8.1.17
Client-side Hierarchical Select v4.0.0 - First commit to issue fork.
- Merge request !13Issue #3347581: Module is not working in fresh Drupal 10. (php 8.1) โ (Merged) created by ignaciolflores
- ๐ช๐ธSpain ignaciolflores
It seems that on the once library has beed updated, the function has changed the signature.
- Status changed to Needs review
over 1 year ago 6:59am 29 March 2023 - ๐บ๐ฟUzbekistan biarr
Thank you @ignaciolflores
Code in Merge requests 13 solves the problem. - ๐ณ๐ฌNigeria chike Nigeria
Thanks @ignaciolflores
MR !13 got the module working in Drupal 10.
- ๐บ๐ธUnited States tyler-durden
Any way to get this to a 4.0.1 version? Without this update, this module doesn't actually work in Drupal 10 so I think it's a critical issue.
Thanks for everyone's work on this module, glad we have this available for d10 as other similar mods don't seem to be moving forward.
- Status changed to RTBC
over 1 year ago 3:36pm 1 May 2023 - ๐บ๐ธUnited States smustgrave
Ran into this issue myself and the MR solves the problem for me.
Was affecting a taxonomy field and the menu selection.
Updating to critical because this module seems to cease to work in D10.
- ๐ญ๐บHungary peter_serfozo
The most recent patch file generated from the MR if someone needs persistent patch content
- ๐ฆ๐ทArgentina hanoii ๐ฆ๐ทUTC-3
The patch can be referenced as https://git.drupalcode.org/project/cshs/-/merge_requests/13.patch or https://git.drupalcode.org/project/cshs/-/merge_requests/13.diff if anyone needs it.
- ๐จ๐ทCosta Rica maxmendez
Tested merge request #13 and works perfectly. Thanks @hanoii for your work!.
Thanks for all the effort. Will there also be a new version released?
I tried to install the patch mentioned in #13, but I'm getting an error that the patch cannot be applied.
If there's any other way of doing this, I would appreciate it if someone could give some tips.- ๐จ๐ทCosta Rica maxmendez
In my case, i'm using "drupal/cshs": "^4.0" an the patch work without problems. Did you use the stable package or dev?
same here, also using "drupal/cshs": "^4.0"
fyi I never used a patch before, so no experience...I added this to composer.json:
"enable-patching": true,
"patches": {
"drupal/cshs": {
"patch mr13": "https://git.drupalcode.org/project/cshs/-/merge_requests/13.patch"
}
},and I get the error: "Could not apply patch! Skipping. The error was: Cannot apply patch https://git.drupalcode.org/project/cshs/-/merge_requests/13.patch"
Not sure if this is relevant, but I'm working in a local WAMP environment.
- ๐จ๐ฆCanada smulvih2 Canada ๐
#12 worked for me on core 10.0.10 and cshs 4.0.0. +1 RTBC.
Had to hard refresh page to get working after applying #12.
- ๐ง๐ชBelgium tim-diels Belgium ๐ง๐ช
Experienced the same issue. Normal dropdown before patch, hierarchical dropdown after patch from MR13. Good Work.
+1 RTBC - ๐ฆ๐บAustralia mfuggle
I have applied the MR13 patch to cshs without success. I am using Drupal 10.1.2 and Php 8.1.18. I have created a content type to test cshs and as soon as I create content using the test I get the errors shown below. Unfortunately I 'configure' things but am not a 'coder' so I am not sure where to start looking for the fix to the issues below:
drupal.js?v=10.1.2:64 Uncaught TypeError: $(...).once is not a function at Object.attach (cshs.ts:14:10) at drupal.js?v=10.1.2:166:24 at Array.forEach (<anonymous>) at Drupal.attachBehaviors (drupal.js?v=10.1.2:162:34) at big_pipe.js?v=10.1.2:118:10 at big_pipe.js?v=10.1.2:138:3 attach @ cshs.ts:14 (anonymous) @ drupal.js?v=10.1.2:166 Drupal.attachBehaviors @ drupal.js?v=10.1.2:162 (anonymous) @ big_pipe.js?v=10.1.2:118 (anonymous) @ big_pipe.js?v=10.1.2:138 setTimeout (async) Drupal.throwError @ drupal.js?v=10.1.2:63 (anonymous) @ drupal.js?v=10.1.2:168 Drupal.attachBehaviors @ drupal.js?v=10.1.2:162 (anonymous) @ big_pipe.js?v=10.1.2:118 (anonymous) @ big_pipe.js?v=10.1.2:138 drupal.js?v=10.1.2:64 Uncaught TypeError: $(...).once is not a function at Object.attach (cshs.ts:14:10) at drupal.js?v=10.1.2:166:24 at Array.forEach (<anonymous>) at Drupal.attachBehaviors (drupal.js?v=10.1.2:162:34) at HTMLUListElement.<anonymous> (ajax.js?v=10.1.2:1362:20) at Function.each (jquery.min.js?v=3.7.0:2:3129) at ce.fn.init.each (jquery.min.js?v=3.7.0:2:1594) at Drupal.AjaxCommands.insert (ajax.js?v=10.1.2:1360:21) at ajax.js?v=10.1.2:1034:41 attach @ cshs.ts:14 (anonymous) @ drupal.js?v=10.1.2:166 Drupal.attachBehaviors @ drupal.js?v=10.1.2:162 (anonymous) @ ajax.js?v=10.1.2:1362 each @ jquery.min.js?v=3.7.0:2 each @ jquery.min.js?v=3.7.0:2 insert @ ajax.js?v=10.1.2:1360 (anonymous) @ ajax.js?v=10.1.2:1034 setTimeout (async) Drupal.throwError @ drupal.js?v=10.1.2:63 (anonymous) @ drupal.js?v=10.1.2:168 Drupal.attachBehaviors @ drupal.js?v=10.1.2:162 (anonymous) @ ajax.js?v=10.1.2:1362 each @ jquery.min.js?v=3.7.0:2 each @ jquery.min.js?v=3.7.0:2 insert @ ajax.js?v=10.1.2:1360 (anonymous) @ ajax.js?v=10.1.2:1034 Promise.then (async) (anonymous) @ ajax.js?v=10.1.2:1027 Drupal.Ajax.commandExecutionQueue @ ajax.js?v=10.1.2:1024 Drupal.Ajax.success @ ajax.js?v=10.1.2:1081 processReplacement @ big_pipe.js?v=10.1.2:83 checkMutationAndProcess @ big_pipe.js?v=10.1.2:99 (anonymous) @ big_pipe.js?v=10.1.2:111 processMutations @ big_pipe.js?v=10.1.2:110 drupal.js?v=10.1.2:64 Uncaught TypeError: $(...).once is not a function at Object.attach (cshs.ts:14:10) at drupal.js?v=10.1.2:166:24 at Array.forEach (<anonymous>) at Drupal.attachBehaviors (drupal.js?v=10.1.2:162:34) at HTMLAnchorElement.<anonymous> (ajax.js?v=10.1.2:1362:20) at Function.each (jquery.min.js?v=3.7.0:2:3129) at ce.fn.init.each (jquery.min.js?v=3.7.0:2:1594) at Drupal.AjaxCommands.insert (ajax.js?v=10.1.2:1360:21) at ajax.js?v=10.1.2:1034:41 attach @ cshs.ts:14 (anonymous) @ drupal.js?v=10.1.2:166 Drupal.attachBehaviors @ drupal.js?v=10.1.2:162 (anonymous) @ ajax.js?v=10.1.2:1362 each @ jquery.min.js?v=3.7.0:2 each @ jquery.min.js?v=3.7.0:2 insert @ ajax.js?v=10.1.2:1360 (anonymous) @ ajax.js?v=10.1.2:1034 setTimeout (async) Drupal.throwError @ drupal.js?v=10.1.2:63 (anonymous) @ drupal.js?v=10.1.2:168 Drupal.attachBehaviors @ drupal.js?v=10.1.2:162 (anonymous) @ ajax.js?v=10.1.2:1362 each @ jquery.min.js?v=3.7.0:2 each @ jquery.min.js?v=3.7.0:2 insert @ ajax.js?v=10.1.2:1360 (anonymous) @ ajax.js?v=10.1.2:1034 Promise.then (async) (anonymous) @ ajax.js?v=10.1.2:1027 Drupal.Ajax.commandExecutionQueue @ ajax.js?v=10.1.2:1024 Drupal.Ajax.success @ ajax.js?v=10.1.2:1081 processReplacement @ big_pipe.js?v=10.1.2:83 checkMutationAndProcess @ big_pipe.js?v=10.1.2:99 (anonymous) @ big_pipe.js?v=10.1.2:111 processMutations @ big_pipe.js?v=10.1.2:110 drupal.js?v=10.1.2:64 Uncaught TypeError: $(...).once is not a function at Object.attach (cshs.ts:14:10) at drupal.js?v=10.1.2:166:24 at Array.forEach (<anonymous>) at Drupal.attachBehaviors (drupal.js?v=10.1.2:162:34) at HTMLUListElement.<anonymous> (ajax.js?v=10.1.2:1362:20) at Function.each (jquery.min.js?v=3.7.0:2:3129) at ce.fn.init.each (jquery.min.js?v=3.7.0:2:1594) at Drupal.AjaxCommands.insert (ajax.js?v=10.1.2:1360:21) at ajax.js?v=10.1.2:1034:41 attach @ cshs.ts:14 (anonymous) @ drupal.js?v=10.1.2:166 Drupal.attachBehaviors @ drupal.js?v=10.1.2:162 (anonymous) @ ajax.js?v=10.1.2:1362 each @ jquery.min.js?v=3.7.0:2 each @ jquery.min.js?v=3.7.0:2 insert @ ajax.js?v=10.1.2:1360 (anonymous) @ ajax.js?v=10.1.2:1034 setTimeout (async) Drupal.throwError @ drupal.js?v=10.1.2:63 (anonymous) @ drupal.js?v=10.1.2:168 Drupal.attachBehaviors @ drupal.js?v=10.1.2:162 (anonymous) @ ajax.js?v=10.1.2:1362 each @ jquery.min.js?v=3.7.0:2 each @ jquery.min.js?v=3.7.0:2 insert @ ajax.js?v=10.1.2:1360 (anonymous) @ ajax.js?v=10.1.2:1034 Promise.then (async) (anonymous) @ ajax.js?v=10.1.2:1027 Drupal.Ajax.commandExecutionQueue @ ajax.js?v=10.1.2:1024 Drupal.Ajax.success @ ajax.js?v=10.1.2:1081 processReplacement @ big_pipe.js?v=10.1.2:83 checkMutationAndProcess @ big_pipe.js?v=10.1.2:99 (anonymous) @ big_pipe.js?v=10.1.2:111 processMutations @ big_pipe.js?v=10.1.2:110 drupal.js?v=10.1.2:64 Uncaught TypeError: $(...).once is not a function at Object.attach (cshs.ts:14:10) at drupal.js?v=10.1.2:166:24 at Array.forEach (<anonymous>) at Drupal.attachBehaviors (drupal.js?v=10.1.2:162:34) at drupal.init.js?v=10.1.2:32:12 at HTMLDocument.listener (drupal.init.js?v=10.1.2:20:7)
- ๐ง๐ชBelgium tim-diels Belgium ๐ง๐ช
@mfuggle looks like the patch from the MR isn't applied successfully on your code. As otherwise the error would be gone.
Can you check the code in your project and see the code is changed to what is in the MR?And make sure you cleared the site cache but also the browser cache...
- ๐จ๐ฆCanada joseph.olstad
we're using Drupal 10.0.10 , I've tried both the MR13 and the patch 12 , both have the same errors as described in #22
Uncaught TypeError: $(...).once is not a function
coming from cshs.js / cshs.tsI'm not familiar with the compiling methods used here.
Hopefully an improved patch will come soon. - Status changed to Needs work
about 1 year ago 11:55pm 23 August 2023 - Status changed to RTBC
about 1 year ago 11:59pm 23 August 2023 - ๐จ๐ฆCanada joseph.olstad
Sorry , my bad, as mentioned by @smulvih2 hard reset was needed, the browser was greedily caching, the patch #12 works great thanks so much!
- ๐บ๐ธUnited States joshuami Portland, OR
+1 on the RTBC. I also had the caching issue, and I *think* it is related to https://www.drupal.org/project/drupal/issues/3370828 ๐ Ensure that edge caches are busted on deployments for css/js aggregates Fixed .
As of Drupal 10.1.2, the cache tag on CSS and JS libraries are only going to get updated if there is a library version change. If the libraries file were updated to have a set version per release (or included in a patch for future release) it should make the cache tag parameter resetโwhether for a local build with aggregation turned off or for a production environment with aggregation turned on.
I was able to get around this by including the patch in a build that also updated to Drupal 10.1.3โwhich has version changes that trigger the new cache tag.
- ๐บ๐ธUnited States alfattal Minnesota
Patch in #12 fixed the issue for me. +1 on the RTBC.
- ๐จ๐ฆCanada mandclu
+1 for RTBC. I agree that the Drupal version compatibility should be updated to reflect when Drupal's once library was added, so my vote would be for MR13.
- Status changed to Needs work
about 1 year ago 12:37pm 7 October 2023 - Status changed to Needs review
about 1 year ago 4:21pm 8 October 2023 - ๐ฆ๐ทArgentina hanoii ๐ฆ๐ทUTC-3
I fixed it but apparently I can't resolve the thread. @jwilson3 maybe you can?
- ๐ช๐จEcuador jwilson3
The instructions here do not work for me:
https://docs.gitlab.com/ee/user/discussions/#resolve-a-thread
It appears that the only people who can resolve the thread are:
- the original person who created the MR (i.e. @ignaciolflores), or
- a person with commit access on the project (i.e. one of the maintainers).
https://drupal.slack.com/archives/CGKLP028K/p1681419829313849
- Status changed to RTBC
about 1 year ago 3:03pm 19 October 2023 - ๐ฆ๐บAustralia timfletcher
Any word on when this fix will be merged to 4.x? I'm planning a D10 rollout and want to know if it's worth holding off.
Thanks for fixing! - ๐จ๐ฆCanada joseph.olstad
@timfletcher
I'm guessing the maintainers all need to be contacted. Find them on the project page, copy a link to this issue and ask them to please take action and also tag/release a fix.
Meanwhile mamy have reported success with #12
#3347581-12: Drupal 10 proper once dependency โ
https://www.drupal.org/files/issues/2023-05-22/3347581-module-is-not-wor... โIf you want a patch from the MR (merge request) then please try this:
https://git.drupalcode.org/project/cshs/-/merge_requests/13.patch - ๐บ๐ธUnited States kwfinken Lansing, MI
It has been over 6 months without a merge, is this an abandoned project?
- ๐จ๐ฆCanada joseph.olstad
@kwfinken
Opportunity knocks, here's the process โ . - ๐ฌ๐งUnited Kingdom fonant
Patch #12 works to fix the problem for me.
- ๐ฎ๐ณIndia vishal.kadam Mumbai
Patch #12 works for me to fix the problem.
+1 on the RTBC.
- ๐ฎ๐ธIceland drupalviking
I can concurr that the module breaks in D10 and this patch fixes the problem.
- ๐ฟ๐ฆSouth Africa matthew gibbon South Africa KZN
As a site builder. I have tried following relevant instructions. Still unable to get this patch and module to work. Any advice appreciated.
In composer.json
"extra": {
"composer-exit-on-patch-failure": true,
"patchLevel": {
"drupal/core": "-p2",
"drupal/contrib-module1": "-p1",
"drupal/contrib-module2": "-p1"
},
"patches": {
"drupal/core": {
"3212792: Views button hover effect is odd": " https://www.drupal.org/files/issues/2023-05-22/3347581-module-is-not-wor... โ "
}
}, - ๐ฎ๐ณIndia vishal.kadam Mumbai
@Matthew Gibbon Replace โdrupal/coreโ with โdrupal/cshsโ
- ๐ฟ๐ฆSouth Africa matthew gibbon South Africa KZN
Thank you. I have succeeded after learning about installing patches with composer and added the following after "installer-paths": { * }
"patches":{
"drupal/cshs":{
"Fix cshs in D10":"https://git.drupalcode.org/project/cshs/-/merge_requests/13.diff"
}
},That being said Chrome holds the problems in client-side still and ignores the patch. I had to CLI into my mac after deleting chrome and many folders deep in library delete cache. This then solved the problem and patch worked.
I am now trying to see if their is a way server side to renew/invalidate/delete client-side cache to simplify problem resolution. I am not this smart yet, so open to ideas?
-
joseph.olstad โ
committed b3bbfaa8 on 4.0.x authored by
ignaciolflores โ
Issue #3347581 by hanoii, ignaciolflores, peter_serfozo, biarr: Drupal...
-
joseph.olstad โ
committed b3bbfaa8 on 4.0.x authored by
ignaciolflores โ
- Status changed to Fixed
10 months ago 10:12pm 8 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.