legacy.com Page navigation broken in version 34 Topic is solved

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
q160765803
Moon lover
Moon lover
Posts: 82
Joined: 2023-04-13, 07:57

legacy.com Page navigation broken in version 34

Post by q160765803 » 2026-01-20, 11:33

Page navigation of https://www.legacy.com/us/obituaries/wa ... ost/browse is broken in new version 34.0, while it works in 33.9.1.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:

1) Clear any current output
2) Navigate or refresh the page in question
3) Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.

The Dates in javascript request becomes "Invalid Date" in version 34:

Code: Select all

GET /api/_frontend/obituaries?endDate=Invalid%20Date&limit=50&noticeType=all&offset=50&sortBy=date&startDate=Invalid%20Date&affiliateSiteName=washingtonpost HTTP/1.1
Host: www.legacy.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:128.0) Gecko/20100101 Goanna/6.8 Firefox/128.0 PaleMoon/34.0.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
X-User-Agent: 
Referer: https://www.legacy.com/us/obituaries/washingtonpost/browse
Connection: keep-alive
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin

User avatar
Moonchild
Project founder
Project founder
Posts: 38825
Joined: 2011-08-28, 17:27
Location: Sweden

Re: legacy.com Page navigation broken in version 34

Post by Moonchild » 2026-01-20, 12:28

I don't see any problem with the URL given. Dates display correctly.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

q160765803
Moon lover
Moon lover
Posts: 82
Joined: 2023-04-13, 07:57

Re: legacy.com Page navigation broken in version 34

Post by q160765803 » 2026-01-20, 13:21

Moonchild wrote:
2026-01-20, 12:28
I don't see any problem with the URL given. Dates display correctly.
If you press Page Number in bottom of page to jump to different page, it uses javascript to fetch content of different page number.
And in version 34, the endDate of that XHR request becomes "Invalid Date"

User avatar
Moonchild
Project founder
Project founder
Posts: 38825
Joined: 2011-08-28, 17:27
Location: Sweden

Re: legacy.com Page navigation broken in version 34

Post by Moonchild » 2026-01-20, 14:01

Aha.

Code: Select all

"'endDate' must be either YYYY-MM-DD or MM-DD-YYYY"
"'startDate' must be either YYYY-MM-DD or MM-DD-YYYY"
I guess there's some subtleties going on here with the ICU update.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
THX-1139
Lunatic
Lunatic
Posts: 486
Joined: 2019-06-13, 13:42
Location: In a place with no YT

Re: legacy.com Page navigation broken in version 34

Post by THX-1139 » 2026-01-20, 15:35

Working fine for me; It worked in the previous release of PM and then I just now updated to the newest version (34) and it still works, even after selecting many different page numbers...
Pale Moon 33.9.1. (64) Win7 pro (64) Intel Core i5-3570 3.4GHz-16 GB DDR3

"The biggest joke on mankind is that computers have started asking humans to prove they're not a robot."

"Man needs difficulties; they are necessary for health." ~Carl Jung

User avatar
THX-1139
Lunatic
Lunatic
Posts: 486
Joined: 2019-06-13, 13:42
Location: In a place with no YT

Re: legacy.com Page navigation broken in version 34

Post by THX-1139 » 2026-01-20, 15:53

And after further browsing through too many Obit's I thought: Why does it use Washington Post Obit's but not the WP url? :?
Pale Moon 33.9.1. (64) Win7 pro (64) Intel Core i5-3570 3.4GHz-16 GB DDR3

"The biggest joke on mankind is that computers have started asking humans to prove they're not a robot."

"Man needs difficulties; they are necessary for health." ~Carl Jung

User avatar
RealityRipple
Keeps coming back
Keeps coming back
Posts: 931
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California

Re: legacy.com Page navigation broken in version 34

Post by RealityRipple » 2026-01-27, 10:09

Been trying to narrow this down, but I don't actually have a debug environment set up, just compilation; so without narrowing down what date-related function is being called with what parameters, I'm not sure where the discrepancy lies. That being said, there are a handful of bz bugs (such as these) about parsing various formats, dates, and timezone representations, and unfortunately, they're not organized very well, so "settling the dust" on the ICU update might take some time, as will implementing the new Intl functions.

User avatar
adoxa
Astronaut
Astronaut
Posts: 580
Joined: 2019-03-16, 13:26
Location: Qld, Aus.

Re: legacy.com Page navigation broken in version 34

Post by adoxa » 2026-01-28, 06:40

The date string contains NARROW NO-BREAK SPACE (U+202F), which causes new Date to fail. Here's a Modify HTTP Response filter to replace it.

Code: Select all

[["www.legacy.com",["/\\d.*\\.js$/",["new Date(t)}","new Date(t.replace(\"\\u202f\",\" \"))}"]]]]

User avatar
Moonchild
Project founder
Project founder
Posts: 38825
Joined: 2011-08-28, 17:27
Location: Sweden

Re: legacy.com Page navigation broken in version 34

Post by Moonchild » 2026-01-28, 10:16

adoxa wrote:
2026-01-28, 06:40
The date string contains NARROW NO-BREAK SPACE (U+202F)
:roll:

OK seems the problem is that ICU 72 actually does this.

See also: https://github.com/date-fns/date-fns/issues/3348
In JavaScript engines that implement unicode ICU 72, Date's toLocaleString function returns a "NARROW NO-BREAK SPACE" (U+202F) unicode character before 'AM/PM'.
Maybe also in other cases, but that's the one where I noticed it.
This leads to an error when used in date-fns parse function.
To reproduce:

Go somewhere where date-fns is available in the console, such as https://date-fns.org/v2.29.3/docs/parse
Run init() in the console and wait for confirmation
Run the following code

const date = new Date()
const localeStr = date.toLocaleTimeString('en-US', {
hour12: true,
hour: 'numeric',
minute: '2-digit'
})
_.parse(localeStr, 'h:mm a', new Date())

You will get Invalid Date.
But if you remove the space or enter a regular space, it's fine.
Related:

NodeJS change: nodejs/node#45068
Kind of related issue in the v8 chromium engine: https://bugs.chromium.org/p/v8/issues/detail?id=13490
"Normalization of spaces" issue: https://unicode-org.atlassian.net/browse/CLDR-14032
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
jobbautista9
Board Warrior
Board Warrior
Posts: 1137
Joined: 2020-11-03, 06:47
Location: Philippines

Re: legacy.com Page navigation broken in version 34

Post by jobbautista9 » 2026-01-28, 10:50

Mozilla had this issue too it seems in bug #1806042. The testcase shows the result variable being null in v34, while in a portable of v33.9 and every other current version of a mainstream browser it is not null.
Image

Tired of creating stuff!

Avatar artwork by Shinki669: https://www.pixiv.net/artworks/113645617

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

q160765803
Moon lover
Moon lover
Posts: 82
Joined: 2023-04-13, 07:57

Re: legacy.com Page navigation broken in version 34

Post by q160765803 » 2026-01-28, 14:48

jobbautista9 wrote:
2026-01-28, 10:50
Mozilla had this issue too it seems in bug #1806042. The testcase shows the result variable being null in v34, while in a portable of v33.9 and every other current version of a mainstream browser it is not null.
wow. It looks like replacing special spaces needs to be done before feeding to ICU and after ICU returning a string.

User avatar
RealityRipple
Keeps coming back
Keeps coming back
Posts: 931
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California

Re: legacy.com Page navigation broken in version 34

Post by RealityRipple » 2026-01-28, 19:35

Okay, why the hell is everything to do with ICU in bugzilla under JavaScript: Internationalization API, but then this is under Core: Internationalization? :problem:

I'll get a PR for this and then start crawling through that category for additional regressions and pick-ups.

Edit: PR 2921 should resolve this.

User avatar
Moonchild
Project founder
Project founder
Posts: 38825
Joined: 2011-08-28, 17:27
Location: Sweden

Re: legacy.com Page navigation broken in version 34

Post by Moonchild » 2026-01-29, 09:32

RealityRipple wrote:
2026-01-28, 19:35
I'll ... start crawling through that category for additional regressions and pick-ups.
I've created Issue #2923 (UXP) for tracking when you do, to keep things organized without too much overhead.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite