Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
I get an ajax error in views:
Uncaught TypeError: Failed to execute 'contains' on 'Node': parameter 1 is not of type 'Node'.
After the change made in this issue #2561619: Drupal Ajax objects and settings grows endlessly
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#2 | ajax_error_in_views-2673824-2.patch | 705 bytes | edurenye |
ajax-error-2.png | 60.98 KB | edurenye | |
ajax-error-1.png | 169.13 KB | edurenye |
Comments
Comment #2
edurenye CreditAttribution: edurenye at MD Systems GmbH commentedThis is the fix from @nod_ that I tested manually and works.
Comment #3
edurenye CreditAttribution: edurenye at MD Systems GmbH commentedComment #4
edurenye CreditAttribution: edurenye at MD Systems GmbH commentedComment #5
nod_was rtbc in the other issue
Comment #7
catchComment #8
catchI failed to mention nod_ in the commit message, sorry nod_. But added to commit credit.
I've committed this to 8.1.x only for now and rolled back the original issue in 8.0.x - this isn't necessarily the only code that got broke.
Comment #9
droplet CreditAttribution: droplet commentedWe should check if it should commits to 8.0.x too. Unlike #2561619: Drupal Ajax objects and settings grows endlessly, it's actually a dedicated bug for ajax_view (wrong usage)
** I will check soon but I think @nod_ able to give a quick feedback?
Comment #10
nod_That's a very good point.
Comment #11
Berdir+1, that makes sense. No idea why it even works, but there should be no harm in committing this too.
Comment #13
edurenye CreditAttribution: edurenye at MD Systems GmbH commentedOr should we close the issue? As it was already added to 8.1
Comment #14
Berdir8.0 is only going to get a final security release, yes, so no bugfixes anymore.
Comment #15
TravisCarden CreditAttribution: TravisCarden at Acquia commentedPossibly related: #2706577: Non-HTMLElement values for ajax.element cause AJAX errors.