- ๐ซ๐ทFrance rondev
The same for me.
Drupal 10 installation with PHP 8.1I got from console:
"Uncaught TypeError: $(...).once is not a function"
It comes from taxonomy_manager \ js \ tree.js:Drupal.behaviors.TaxonomyManagerTree = { attach: function (context, settings) { var treeSettings = settings.taxonomy_manager.tree || []; if (treeSettings instanceof Array) { for (var i = 0; i < treeSettings.length; i++) { $('#' + treeSettings[i].id).once('taxonomy-manager-tree').each(function () { var tree = new Drupal.TaxonomyManagerFancyTree(treeSettings[i].id, treeSettings[i].name, treeSettings[i].source); }); } }
- ๐ซ๐ทFrance rondev
Should be related to: https://www.drupal.org/node/3158256 โ
Hi, I observe the same problem on D10 (php 8.2.1) : taxonomy tree is not showing. I did not understand how to solve this problem. Any help appreciated.
- ๐ณ๐ฌNigeria chike Nigeria
Is there a solution or workaround for this yet?
Fixed this by modifying 2 lines in tree.js:
12: $(once('taxonomy-manager-tree', '#' + treeSettings[i].id)).each(function () {
and
$(once('input', '.ui-autocomplete'), once('input', context)).on('click', function (e) {
based on this: https://www.drupal.org/node/3158256 โ
and changing the dependencies in
- core/jquery.once to -core/once
It worth analyzing and creating a patch to be included in the next versions.- First commit to issue fork.
- ๐ณ๐ฟNew Zealand Gold 20 minutes in the future
The solution from @klevyke did the trick for me as well.
I've cut an issue branch and pushed a patch to it.
If others want to check that branch that'd be appreciated. For those of us using cweagans/composer-patches you can add the following to your composer file.
"extra": { "enable-patching": true, "patches": { "drupal/taxonomy_manager": { "Issue 3331822: Taxonomy tree is not showing": "https://git.drupalcode.org/issue/taxonomy_manager-3331822/-/commit/e6d88a9ff59efd8b45e7155109b329ac8efa7273.patch" } } }
- @gold opened merge request.
- ๐ณ๐ฟNew Zealand Gold 20 minutes in the future
Hmm... When I last worked with Drupal the Gitlab integration wasn't quite there. :) I'm feeling like it's still not quite there. Or, I may just need to spend more time working with it to get the hang of things.
Either way, MR!16 has a working patch on the 2.0.x branch. For those testing, this is the repo to clone.
https://git.drupalcode.org/issue/taxonomy_manager-3331822/-/tree/3331822...
- ๐ฉ๐ชGermany carp-enter
Solution at #6 is not working with Drupal 10.0.9, PHP 8.1.6 and MySQL 5.7.39
- ๐ณ๐ฌNigeria chike Nigeria
@carp-enter Yes I was surprised yesterday to find that #6 was no longer working. It was working initially.
I tested MR!16 and it is working.
- ๐ฉ๐ชGermany carp-enter
I downloaded the diff that can be found under the MR!16, swapped the 3 lines of code in the tree.js and traced the changes to the taxonomy_manager.libraries.yml.
Unfortunately it still does not work. - ๐ณ๐ฌNigeria chike Nigeria
@carp-enter you can download the module from the issue fork instead of the main repo.
You can follow the guide here, https://www.mediacurrent.com/blog/how-fix-catch-22-problem-drupal-9-fixe...
- ๐ฉ๐ชGermany carp-enter
@chike: I followed the advice, deleted the manually edited module and following the instructions "how to fix catch 22" installed the module with the composer in version dev-3331822-taxonomy-tree-once. Thanks for the tip.
The installation went without errors, I also checked the code of the new installation, everything correct.Unfortunately the error is not fixed.
- ๐ณ๐ฌNigeria chike Nigeria
Crosscheck composer.json that you have these:
1.
"exclude": ["drupal/taxonomy_manager"]
excluding downloading from main repo.This should make the main repo look like this,
{ "type": "composer", "url": "https://packages.drupal.org/8", "exclude": ["drupal/taxonomy_manager"] },
2. You added this repo:
, { "type": "git", "url": "https://git.drupalcode.org/issue/taxonomy_manager-3331822.git" }
3. In the require section you have this:
"drupal/taxonomy_manager": "dev-3331822-taxonomy-tree-once",
4. Then run
composer update drupal/taxonomy_manager
again. - ๐ฉ๐ชGermany carp-enter
This is exactly how I proceeded, the MR!16 was also loaded. But it does not work.
I also moved the project to the staging environment, because pHP and database have a different version there. Also there it does not work.
- ๐ช๐ธSpain psf_ Huelva
Hi, with the composer plugin
cweagans/composer-patches
we can apply the path in MR.For example, adding this in "extra":
"patches": { "drupal/taxonomy_manager": { "Issue 3331822 - Taxonomy tree is not showing": "https://git.drupalcode.org/project/taxonomy_manager/-/merge_requests/16/diffs.patch" } }
Note that the patch URL is the diff URL plus
.patch
- Status changed to RTBC
over 1 year ago 8:52am 23 May 2023 - ๐ช๐ธSpain psf_ Huelva
#11 work for me : )
I applied the MR!16 patch over taxonomy_manager 2.0.8.
- ๐ฉ๐ชGermany carp-enter
Please don't ask me why, but now it works.
I didn't touch the composer.json anymore, only the updates that have occurred in the meantime were executed. M!16 now works for me too. - ๐ณ๐ฑNetherlands deneus18
I applied the MR!16 patch over taxonomy_manager 2.0.8 and it fixes the problem for me.
- ๐ณ๐ฑNetherlands tadas.rimkus
tadas.rimkus โ made their first commit to this issueโs fork.
- @tadasrimkus opened merge request.
- ๐ณ๐ฑNetherlands tadas.rimkus
I have made a new branch to avoid causing any conflicts for anyone using MR!16.
I'm still new to patching and I sometimes get problems patching from editor, but for some reasons patches from mer
My change simply updates the version to 2.x which invalidates CDN cache for tree.js.
We had a problem in our deployment where we would either need to explicitly clear cache to get updated tree.js. - ๐ฉ๐ชGermany Anybody Porta Westfalica
Any active maintainer here? The module is broken with D10 and Drupal 9 EOL is close. This needs a merge and new tagged release, please. :)
- First commit to issue fork.
-
VladimirAus โ
committed 8edaf95b on 2.0.x
Issue #3331822 by Gold, tadas.rimkus, VladimirAus, rondev, chike, carp-...
-
VladimirAus โ
committed 8edaf95b on 2.0.x
- Status changed to Fixed
over 1 year ago 1:27pm 9 August 2023 - ๐ฆ๐บAustralia VladimirAus Brisbane, Australia
Thank you! Committed! ๐ป
Automatically closed - issue fixed for 2 weeks with no activity.