Ajax pagination is broken when some links has no href

Created on 31 January 2024, 10 months ago
Updated 6 June 2024, 6 months 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

Needs work

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated 1 day ago

Created by

πŸ‡«πŸ‡·France goz

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024