Ajax pagination is broken when some links has no href

Created on 31 January 2024, about 1 year ago

Problem/Motivation

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

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.

πŸ› Bug report
Status

Active

Version

10.1 ✨

Component
ViewsΒ  β†’

Last updated 21 minutes ago

Created by

πŸ‡«πŸ‡·France goz

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024