Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix: TUP-714 news list page links not working #830

Conversation

wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented Apr 3, 2024

Overview

Use link.getAttribute('href') not link.href, so isAbsolute is not true for News list "Previous" and "Next" links.

Warning

There is still the problem of the code link.href = link.pathname; which would remove URL parameters, but at least the "Previous" and "next" links are being properly ignored now.

Related

Changes

  • changed link.getAttribute('href') not link.href in setTargetForExternalLinks.js

Testing

  1. Use the new file on a news page with pagination.
    • A. Load a page with News on which you've added enough articles.
      To create less articles, set pagination threshold to be very small.
    • B. Edit same file on tup_cms container directly while running https://github.com/TACC/tup-ui.
  2. Verify "Previous" or "Next" links work.

UI

Script Page
file page
test.mov

@wesleyboar wesleyboar merged commit fd1749b into main Apr 3, 2024
@wesleyboar wesleyboar deleted the hotfix/TUP-714-news-list-page-prev-next-links-missing-url-params branch April 3, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant