Closed (fixed)
Project:
Permissions by Term
Version:
3.1.33
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 May 2024 at 14:10 UTC
Updated:
19 Mar 2025 at 09:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
_kash_ commentedI encountered this error while the autocomplete is being populated with text.
The error does not happen with core 10.2.5 installed.
I only see it when I update to 10.2.6.
Module version "drupal/permissions_by_term": "3.1.31"
It looks like the screenshot from someshver also shows the version at 10.2.6 https://www.drupal.org/files/issues/2024-05-13/Untitled.png
Comment #3
_kash_ commentedFull js error output
bundle.js?v=10.2.6:8 Uncaught TypeError: this[{(intermediate value)(intermediate value)(intermediate value)}[r]] is not a function
at u.computeTids (bundle.js?v=10.2.6:8:10308)
at n (bundle.js?v=10.2.6:1:101244)
at HTMLInputElement. (bundle.js?v=10.2.6:1:101687)
at HTMLInputElement.dispatch (jquery.min.js?v=3.7.1:2:40035)
at v.handle (jquery.min.js?v=3.7.1:2:38006)
u.computeTids @ bundle.js?v=10.2.6:8
n @ bundle.js?v=10.2.6:1
(anonymous) @ bundle.js?v=10.2.6:1
dispatch @ jquery.min.js?v=3.7.1:2
v.handle @ jquery.min.js?v=3.7.1:2
bundle.js?v=10.2.6:8 Uncaught TypeError: this[{(intermediate value)(intermediate value)(intermediate value)}[r]] is not a function
at u.computeTids (bundle.js?v=10.2.6:8:10308)
at n (bundle.js?v=10.2.6:1:101244)
at HTMLInputElement. (bundle.js?v=10.2.6:1:101687)
at HTMLInputElement.dispatch (jquery.min.js?v=3.7.1:2:40035)
at v.handle (jquery.min.js?v=3.7.1:2:38006)
u.computeTids @ bundle.js?v=10.2.6:8
n @ bundle.js?v=10.2.6:1
(anonymous) @ bundle.js?v=10.2.6:1
dispatch @ jquery.min.js?v=3.7.1:2
v.handle @ jquery.min.js?v=3.7.1:2
bundle.js?v=10.2.6:8 Uncaught TypeError: this[{(intermediate value)(intermediate value)(intermediate value)}[r]] is not a function
at u.computeTids (bundle.js?v=10.2.6:8:10308)
at n (bundle.js?v=10.2.6:1:101244)
at HTMLInputElement. (bundle.js?v=10.2.6:1:101687)
at HTMLInputElement.dispatch (jquery.min.js?v=3.7.1:2:40035)
at v.handle (jquery.min.js?v=3.7.1:2:38006)
u.computeTids @ bundle.js?v=10.2.6:8
n @ bundle.js?v=10.2.6:1
(anonymous) @ bundle.js?v=10.2.6:1
dispatch @ jquery.min.js?v=3.7.1:2
v.handle @ jquery.min.js?v=3.7.1:2
Comment #4
brunoalmeida commentedComment #6
brunoalmeida commentedThis issue happens when the Drupal field wrapper has a select and an input field. That's the typical scenario when using the "chosen" library, 'cos it will have the select default field plus the "chosen" html inputs. The DomClient._getInputType is getting lost 'cos it will find first a select and after an input, which will make the function return 'undefined' causing the error mentioned above. I created a 'else if' condition to avoid this issue.
Comment #7
_kash_ commentedI tried applied the diff as a patch. It applied cleanly to 3.1.33 but it did not work for me. Still seeing the error. FWIW I am not using the chosen module. I am using the Autocomplete (Tag style) widget.
Comment #8
brunoalmeida commented_KASH_ could you please attach a screenshot of your field with this widget? I changed the widget from chosen to Autocomplete (Tag style) and it's working as expected here.
Comment #9
_kash_ commentedI've attached a screenshot along side the error.
The field actually works still. However the js error is causing my tests to fail. So I need to fix the js error.
I am narrowing down the cause.
I've successfully updated Core to 10.2.7 and PBT to 3.1.33 and the tests pass
(there is no JS error)There is still a JS error.However, when I do a composer update for the rest of the modules that need to be brought up to date, that is when I start to encounter the
errorfailed tests.So, it seem that the
errorfailed test is somehow related to one of these updates included below. There is a possibility this bug does not even reside with permissions by term.I am going to try to figure out which package update introduces the error. Could take a while...
composer update --dry-run
Loading composer repositories with package information
Updating dependencies
Lock file operations: 7 installs, 45 updates, 3 removals
- Removing phenx/php-font-lib (0.5.6)
- Removing phenx/php-svg-lib (0.5.4)
- Removing textalk/websocket (1.5.8)
- Upgrading chi-teck/drupal-code-generator (3.5.0 => 3.6.0)
- Upgrading composer/class-map-generator (1.1.1 => 1.3.3)
- Upgrading composer/composer (2.7.2 => 2.7.7)
- Upgrading composer/pcre (3.1.3 => 3.1.4)
- Upgrading composer/xdebug-handler (3.0.4 => 3.0.5)
- Upgrading dmore/chrome-mink-driver (2.9.2 => 2.9.3)
- Upgrading doctrine/event-manager (2.0.0 => 2.0.1)
- Upgrading dompdf/dompdf (v2.0.7 => v3.0.0)
- Locking dompdf/php-font-lib (1.0.0)
- Locking dompdf/php-svg-lib (1.0.0)
- Upgrading drevops/behat-steps (2.2.0 => 2.3.0)
- Upgrading drupal/better_exposed_filters (6.0.3 => 6.0.6)
- Upgrading drupal/coder (8.3.23 => 8.3.24)
- Upgrading drupal/collapsiblock (4.1.0 => 4.2.0)
- Upgrading drupal/core-dev (10.2.5 => 10.2.7)
- Upgrading drupal/entity_print (2.13.0 => 2.14.0)
- Upgrading drupal/google_tag (2.0.4 => 2.0.5)
- Upgrading drupal/jquery_ui (1.6.0 => 1.7.0)
- Upgrading drupal/jquery_ui_datepicker (2.0.0 => 2.1.0)
- Upgrading drupal/jquery_ui_slider (2.0.0 => 2.1.0)
- Upgrading drupal/jquery_ui_touch_punch (1.1.0 => 1.1.1)
- Locking drupal/js_cookie (1.0.1)
- Upgrading drupal/key (1.17.0 => 1.18.0)
- Upgrading drupal/tfa (1.6.0 => 1.7.0)
- Upgrading drupal/upgrade_status (4.2.0 => 4.3.2)
- Upgrading drupal/views_bulk_operations (4.2.6 => 4.2.7)
- Upgrading drush/drush (12.5.1 => 12.5.2)
- Upgrading grasmash/yaml-cli (3.2.0 => 3.2.1)
- Upgrading league/csv (9.15.0 => 9.16.0)
- Upgrading mglaman/phpstan-drupal (1.2.10 => 1.2.11)
- Upgrading onelogin/php-saml (4.1.0 => 4.2.0)
- Upgrading paragonie/constant_time_encoding (v2.6.3 => v2.7.0)
- Upgrading phpstan/extension-installer (1.3.1 => 1.4.1)
- Upgrading phpstan/phpstan (1.10.67 => 1.11.4)
- Upgrading phpstan/phpstan-deprecation-rules (1.1.4 => 1.2.0)
- Upgrading phpstan/phpstan-phpunit (1.3.16 => 1.4.0)
- Locking phrity/net-stream (1.3.0)
- Locking phrity/net-uri (1.3.0)
- Locking phrity/util-errorhandler (1.1.0)
- Locking phrity/websocket (1.7.3)
- Upgrading psy/psysh (v0.12.3 => v0.12.4)
- Upgrading react/promise (v3.1.0 => v3.2.0)
- Upgrading squizlabs/php_codesniffer (3.9.1 => 3.10.1)
- Upgrading symfony/browser-kit (v6.4.3 => v6.4.8)
- Upgrading symfony/config (v6.4.6 => v6.4.8)
- Upgrading symfony/css-selector (v6.4.3 => v6.4.8)
- Upgrading symfony/dom-crawler (v6.4.4 => v6.4.8)
- Upgrading symfony/http-client (v6.4.6 => v6.4.8)
- Upgrading symfony/lock (v6.4.6 => v6.4.8)
- Upgrading symfony/phpunit-bridge (v6.4.6 => v6.4.8)
- Upgrading symfony/translation (v6.4.4 => v6.4.8)
- Upgrading webflo/drupal-finder (1.2.2 => 1.3.0)
Installing dependencies from lock file (including require-dev)
Package operations: 7 installs, 45 updates, 3 removals
- Removing textalk/websocket (1.5.8)
- Removing phenx/php-svg-lib (0.5.4)
- Removing phenx/php-font-lib (0.5.6)
- Upgrading phpstan/phpstan (1.10.67 => 1.11.4)
- Upgrading phpstan/extension-installer (1.3.1 => 1.4.1)
- Upgrading symfony/http-client (v6.4.6 => v6.4.8)
- Upgrading symfony/dom-crawler (v6.4.4 => v6.4.8)
- Upgrading symfony/css-selector (v6.4.3 => v6.4.8)
- Upgrading symfony/browser-kit (v6.4.3 => v6.4.8)
- Upgrading composer/pcre (3.1.3 => 3.1.4)
- Upgrading composer/class-map-generator (1.1.1 => 1.3.3)
- Upgrading composer/xdebug-handler (3.0.4 => 3.0.5)
- Upgrading symfony/config (v6.4.6 => v6.4.8)
- Upgrading symfony/translation (v6.4.4 => v6.4.8)
- Installing phrity/util-errorhandler (1.1.0)
- Installing phrity/net-uri (1.3.0)
- Installing phrity/net-stream (1.3.0)
- Installing phrity/websocket (1.7.3)
- Upgrading dmore/chrome-mink-driver (2.9.2 => 2.9.3)
- Upgrading doctrine/event-manager (2.0.0 => 2.0.1)
- Installing dompdf/php-font-lib (1.0.0)
- Installing dompdf/php-svg-lib (1.0.0)
- Upgrading webflo/drupal-finder (1.2.2 => 1.3.0)
- Upgrading drevops/behat-steps (2.2.0 => 2.3.0)
- Upgrading drupal/jquery_ui (1.6.0 => 1.7.0)
- Upgrading drupal/jquery_ui_touch_punch (1.1.0 => 1.1.1)
- Upgrading drupal/jquery_ui_slider (2.0.0 => 2.1.0)
- Upgrading drupal/jquery_ui_datepicker (2.0.0 => 2.1.0)
- Upgrading drupal/better_exposed_filters (6.0.3 => 6.0.6)
- Installing drupal/js_cookie (1.0.1)
- Upgrading drupal/collapsiblock (4.1.0 => 4.2.0)
- Upgrading symfony/phpunit-bridge (v6.4.6 => v6.4.8)
- Upgrading symfony/lock (v6.4.6 => v6.4.8)
- Upgrading phpstan/phpstan-phpunit (1.3.16 => 1.4.0)
- Upgrading phpstan/phpstan-deprecation-rules (1.1.4 => 1.2.0)
- Upgrading mglaman/phpstan-drupal (1.2.10 => 1.2.11)
- Upgrading squizlabs/php_codesniffer (3.9.1 => 3.10.1)
- Upgrading drupal/coder (8.3.23 => 8.3.24)
- Upgrading react/promise (v3.1.0 => v3.2.0)
- Upgrading composer/composer (2.7.2 => 2.7.7)
- Upgrading drupal/core-dev (10.2.5 => 10.2.7)
- Upgrading dompdf/dompdf (v2.0.7 => v3.0.0)
- Upgrading drupal/entity_print (2.13.0 => 2.14.0)
- Upgrading drupal/google_tag (2.0.4 => 2.0.5)
- Upgrading drupal/key (1.17.0 => 1.18.0)
- Upgrading psy/psysh (v0.12.3 => v0.12.4)
- Upgrading grasmash/yaml-cli (3.2.0 => 3.2.1)
- Upgrading chi-teck/drupal-code-generator (3.5.0 => 3.6.0)
- Upgrading drush/drush (12.5.1 => 12.5.2)
- Upgrading onelogin/php-saml (4.1.0 => 4.2.0)
- Upgrading paragonie/constant_time_encoding (v2.6.3 => v2.7.0)
- Upgrading drupal/tfa (1.6.0 => 1.7.0)
- Upgrading drupal/upgrade_status (4.2.0 => 4.3.2)
- Upgrading drupal/views_bulk_operations (4.2.6 => 4.2.7)
- Upgrading league/csv (9.15.0 => 9.16.0)
Comment #10
_kash_ commentedWell, I've done some more digging and found my issue.
Upgrading dmore/chrome-mink-driver (2.9.2 => 2.9.3)
That causes my tests to fail from the JS error.
The JS error seems to exist in my current build as well... sometimes
Uncaught TypeError: this[{(intermediate value)(intermediate value)(intermediate value)}[r]] is not a function
at u.computeTids (bundle.js?v=10.2.5:8:10308)
at n (bundle.js?v=10.2.5:1:101244)
at HTMLInputElement. (bundle.js?v=10.2.5:1:101687)
at HTMLInputElement.dispatch (jquery.min.js?v=3.7.1:2:40035)
at v.handle (jquery.min.js?v=3.7.1:2:38006)
I am going to pin chrome-mink-driver to 2.9.2 and move on for now...
Comment #11
someshver commentedIt is working perfectly with the version 3.1.30. So I think we need to compare the module with the older version to see what is changed on the newer versions. Currently I am not updating this module till the issue is not fixed.
Comment #13
igor mashevskyi commentedI encountered the same issue. The patch https://git.drupalcode.org/project/permissions_by_term/-/merge_requests/... resolved the problem for some content edit form pages, but I continued experiencing the issue with other content types. Upon further investigation, I discovered that this error occurs when certain taxonomy fields are not displayed in the form.
After the latest changes in the patch, the issue should now be resolved.
Comment #15
marcoliverHi! I just updated the issue for against the latest state of 3.1.x-dev.
Can someone involved with this issue please verify that the issue fork still works for them?
Comment #18
lester-barahona commented@marcoliver I've tried but can't build the js code properly, for some reason in the js code all the boolean variables and null are in uppercase for example in webpack.js devtool: FALSE and should be false, I think it could be related with some of the last updateds for the Drupal 11 support:
https://git.drupalcode.org/project/permissions_by_term/-/commit/9beaf406...
Comment #19
lester-barahona commentedPlease take a look on this patch
And merge request https://git.drupalcode.org/project/permissions_by_term/-/merge_requests/57
Comment #20
lester-barahona commentedComment #21
marcoliverComment #22
marcoliverThanks, @lester-barahona, merging this!
Comment #24
jepster_Thanks! This is now part of the 3.1.37 patch release: https://www.drupal.org/project/permissions_by_term/releases/3.1.37