t.nodeName is undefined

Created on 9 January 2024, 6 months ago
Updated 23 January 2024, 5 months ago

After updating Module Filter from 4.0.1 to 4.1.0, filtering is broken on the available updates page (admin/reports/updates), and I get the following error in the browser's console (Firefox 121.0): "Uncaught TypeError: t.nodeName is undefined". During this update, the jQuery UI Autocomplete module was successfully enabled.

πŸ› Bug report
Status

Closed: duplicate

Version

4.1

Component

Code

Created by

πŸ‡«πŸ‡·France FMB PerpinyΓ , Catalonia, EU

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @FMB
  • πŸ‡«πŸ‡·France FMB PerpinyΓ , Catalonia, EU

    I should mention that I am still stuck on core version 9.5.11 for a few weeks.

  • πŸ‡¬πŸ‡§United Kingdom jonathan1055

    On 10.2 with Claro I do not get the error, but the radio buttons do not seem to be working at all.

    I will try to check on 9.5

  • πŸ‡«πŸ‡·France FMB PerpinyΓ , Catalonia, EU

    I'm using Gin as admin theme.

  • πŸ‡¨πŸ‡¦Canada LeDucDuBleuet Chicoutimi QC

    I get this error on Drupal 10.2.1 after upgrading to module_filter version 4.1.0.

    The textual search filtering works but the buttons under do nothing.

    Here is more info from Firefox's console where I masked my domain with xxxxxxxx.xxx :

    Uncaught TypeError: t.nodeName is undefined
        val jQuery
        attach https://xxxxxxxx.xxx/modules/contrib/module_filter/js/module_filter.update_status.js?v=10.2.1:118
        jQuery 7
        attach https://xxxxxxxx.xxx/modules/contrib/module_filter/js/module_filter.update_status.js?v=10.2.1:125
        attachBehaviors https://xxxxxxxx.xxx/core/misc/drupal.js?v=10.2.1:166
        attachBehaviors https://xxxxxxxx.xxx/core/misc/drupal.js?v=10.2.1:162
        <anonymous> https://xxxxxxxx.xxx/core/misc/drupal.init.js?v=10.2.1:32
        listener https://xxxxxxxx.xxx/core/misc/drupal.init.js?v=10.2.1:20
    

    And the corresponding lines in module_filter/js/module_filter.update_status.js starting from line #117 :

            $show.change(() => {
              show = $(this).val();
              Drupal.ModuleFilter.localStorage.setItem('updateStatus.show', show);
              Drupal.ModuleFilter.winnow.filter();
            });
            $show
              .filter(`[value="${show}"]`)
              .prop('checked', true)
              .trigger('change');
    

    So it seems the bug comes from the use of "$(this).val()" on line 118 but I have no clue how to fix this...

    Thanks in advance for looking into this.

  • πŸ‡¨πŸ‡¦Canada LeDucDuBleuet Chicoutimi QC

    This is possibly a duplicate of issue 3413467.

  • πŸ‡¬πŸ‡§United Kingdom jonathan1055

    Thanks for the debug output, that is helpful.

    This does look the same error as on πŸ› Radio buttons on Available updates report do nothing Active . However FMB said that they were using core 9.5.1. I have shown on that other issue that 4.1.0 works fine with core 10.1.

    @FMB can you just confirm again that you see this error on core 9.5?

  • πŸ‡¨πŸ‡¦Canada LeDucDuBleuet Chicoutimi QC

    Yes I see the same error in the console with core 9.5.11 and module_filter 4.1.0.

    The radio buttons do not work and unlike with core 10.2.1, the textual search filtering do not work either with 9.5.11.

  • πŸ‡«πŸ‡·France FMB PerpinyΓ , Catalonia, EU

    @jonathan1055, yes, I get the same error.

  • πŸ‡ΊπŸ‡ΈUnited States wolffereast

    I just dropped a patch in https://www.drupal.org/project/module_filter/issues/3413467#comment-1539... πŸ› Radio buttons on Available updates report do nothing Active that should fix the status page issue reported there but I don't have a 9.* locally to test if it helped this issue as well. Can someone give it a go?

  • πŸ‡¨πŸ‡¦Canada LeDucDuBleuet Chicoutimi QC

    This patch in 3413467#comment-15392653 πŸ› Radio buttons on Available updates report do nothing Active fixes the issue on core 10.2.1.

    And on core 9.5.11, the error in the console is gone but the textual search and radio buttons still do nothing.

  • πŸ‡«πŸ‡·France FMB PerpinyΓ , Catalonia, EU

    I do not think backporting to 9.x is worth it, but the 4.1.x branch should be marked as only compatible with Drupal 10.

  • πŸ‡ΊπŸ‡ΈUnited States wolffereast

    I managed to find a local on 9.5.11 and updated Module Filter to 4.1 with the patch in the linked issue. I'm on Claro in this environment. I'm able to use the toggles and text filters on the upgrade status page. I tried with aggregated and unaggregated resources just in case. Am I missing a step to reproduce, or is it possibly an issue with a specific admin theme?

  • πŸ‡¨πŸ‡¦Canada LeDucDuBleuet Chicoutimi QC

    The only site still on core 9.5.11 that I have is on the Droopler distribution. I was using Gin admin theme before and I tried as well with Claro with the same results, the search and radio buttons still do nothing even with the patch. In fact, they do nothing as well on the extensions page not just the update status page... So there is probably something specific to this site in particular or in Droopler causing this... This project is currently being upgraded to 10.2.x so this issue will be a thing of the past soon enough for me.

    Thanks.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Yes we are mainly focusing on D10 support right now. If we can get a fix that applies to both that would be great but if not D10 is the priority.

    If D9 fix is separate we can provide a patch for it and leave a comment on the module homepage that D9 sites will have to use this patch but most likely won't commit.

    4.2.x or 5.0.x will be D10 only.

  • πŸ‡¨πŸ‡¦Canada LeDucDuBleuet Chicoutimi QC

    And for D9, there is also the unsupported version 8.x-3.4 which is still working without issue on D9.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    And assuming 4.0.1 still works for D9?

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    and this is my fault, I didn't think about dropping D9 when I did the release. Of course too late so would have to be 4.2.x or better a 5.0.x branch. Lets fix this and then will plan on that.

  • πŸ‡¨πŸ‡¦Canada LeDucDuBleuet Chicoutimi QC

    Just confirming version 4.0.1 still works for D9 as well.

  • πŸ‡«πŸ‡·France FMB PerpinyΓ , Catalonia, EU

    Yes, no trouble with version 4.0.1.

    Maybe you can still edit the 4.1.0 release message in order to point out it should not be used with Drupal 9.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    πŸ› Radio buttons on Available updates report do nothing Active is merged anyone confirm if this issue can be closed.

  • Status changed to Postponed: needs info 5 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave
  • Status changed to Closed: duplicate 5 months ago
  • πŸ‡¨πŸ‡¦Canada LeDucDuBleuet Chicoutimi QC

    I can confirm that this issue is fixed with current module_filter 4.x-dev.

    So I guess we can close this one as a duplicate.

    Thank you all for your work on this!

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    I’ll try and do a release today!

  • πŸ‡ΊπŸ‡ΈUnited States omarsidd

    Ran into this today on some sites we still have at 9.x (fixed by finding this bug and backing down to 4.0.1).
    Can we please update the version requirements on 4.1 to reflect not compatible with 9.x?

    I guess it goes to the usefulness of this module that I noticed the issues right away, so thanks for the very useful tool!

  • πŸ‡ΊπŸ‡ΈUnited States wolffereast

    A clean install of d 9.* with 4.1 on claro is working, assuming the patch from the linked module is applied. Are you using a different admin theme?

Production build 0.69.0 2024