This is the same issue I filed and patched for Views in 7.x #2154837: ajax_view.js has some extraneous code?

Drupal.views.ajaxView.prototype.attachPagerLinkAjax contains the following lines:

  // Construct an object using the settings defaults and then overriding
  // with data specific to the link.
  $.extend(
    viewData,
    this.settings,
    Drupal.Views.parseQueryString(href),
    // Extract argument data from the URL.
    Drupal.Views.parseViewArgs(href, this.settings.view_base_path)
  );

  // For anchor tags, these will go to the target of the anchor rather
  // than the usual location.
  $.extend(viewData, Drupal.Views.parseViewArgs(href, this.settings.view_base_path));

I believe the second extend is extraneous as viewData was already extended by the same thing in the first extend.

Comments

vegantriathlete’s picture

StatusFileSize
new683 bytes
vegantriathlete’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: remove-extraneous-code-2156295-1.patch, failed testing.

vegantriathlete’s picture

This is failing in the same way as the patch is failing for Views 7.x (and I'm pasting the same comments below from that issue just to make it easier to reference them directly here, in case somebody happens to look at this first).

Viewing the test results makes me wonder whether there is something wrong with Views or with the tests. I am not seeing anything that makes it clear to me where the error would be on my end. That's not to say that my change is not breaking something. I'm just saying that I would need help understanding what my change actually breaks.

When I tested this locally everything seemed to work exactly the same as before I made the change. So, it seems to work just fine to me and I don't understand why the change should fail the tests.

Can someone have a look at the test results and help me understand them better?

xjm’s picture

Version: 8.0-alpha6 » 8.x-dev

Make sure to file any D8 issues against 8.x dev or no one will find them. :)

vegantriathlete’s picture

Status: Needs work » Needs review
areke’s picture

Status: Needs review » Needs work

The last submitted patch, 1: remove-extraneous-code-2156295-1.patch, failed testing.

rajendar reddy’s picture

Status: Needs work » Needs review
StatusFileSize
new624 bytes

Updating patch with reroll. Please review.

alansaviolobo’s picture

patch still applies. retesting.

nod_’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +JavaScript, +JavaScript clean-up

Nothing breaks in views.

Impressive a 1 years old patch still applies :p

alexpott’s picture

Category: Task » Bug report
Status: Reviewed & tested by the community » Fixed

Committed 8759ddc and pushed to 8.0.x. Thanks!

Doing the same thing twice is a bug.

  • alexpott committed 8759ddc on 8.0.x
    Issue #2156295 by vegantriathlete, Rajendar Reddy: ajax_views.js has...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.