Uncaught TypeError: Cannot read property 'top' of undefined in ajax_views.js line no 200

Created on 9 September 2016, almost 8 years ago
Updated 4 January 2024, 6 months ago

I am getting " Uncaught TypeError: Cannot read property 'top' of undefined in ajax_views.js line no 200"

Steps to reproduce -

Create a content view block
Add exposed form filter
Make views filter ajaxfiy
Save and enable the views on any page
Do search
and see on browser console.

Tracked the issue is coming from ajax_views.js file

if (offset.top - 10 < $(scrollTarget).scrollTop()) {
      $(scrollTarget).animate({scrollTop: (offset.top - 10)}, 500);
    }

offset.top is causing this issue.

🐛 Bug report
Status

Closed: works as designed

Version

10.0

Component
Views 

Last updated about 4 hours ago

Created by

🇮🇳India RavindraSingh

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Hi,

    I have exposed filter and ajax enable.

    I am getting exact same issue atm and have applied patch above but no success.

    Way to produce.

    create view with exposed filter and ajax enabled.

    When doing a first click ajax does work and content gets filtered as requested but second click wont filter and issue error same as above.

    further debuging shows that dom_id attach to html element is different to ajax request so not able find the element to replace it.

    Anyone having similar issue. Its in Drupal 10.0.5

    Thanks

  • 🇬🇷Greece alexpertsi

    #10 worked for me. Thanks!!!

Production build 0.69.0 2024