Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 302350

Pager pagination with ajax is broken when some links has no href

$
0
0

Problem/Motivation

If you have a pagination with links without href in a views with ajax, javascript will break with error :


Uncaught TypeError: query is undefined
parseQueryString /core/modules/views/js/base.js
attachPagerLinkAjax /core/modules/views/js/ajax_view.js

Steps to reproduce

  • Use a template of pagination which display a link without href attribute. Exampe in https://www.drupal.org/project/ui_suite_dsfr/releases/1.0.0-beta5
  • Create a views with full pagination and enable ajax.
  • Be sure to have a lot of content, enough to have more pages than the limit that is displayed, so ellipses are displayed.
  • Go to the view
  • Error is displayed in console.
  • Click to a link of the pagination, page will be reloaded, no ajax.

Proposed resolution

"href" attribute is not required in "a" tag, so code should not assume "a" tag has this attribute.


Viewing all articles
Browse latest Browse all 302350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>