Skip to content

Conversation

@aelkiss
Copy link
Member

@aelkiss aelkiss commented Jan 8, 2026

I'm having trouble replicating the issue in dev, but I think this should fix it. I'm going to cherry-pick this commit on preview so we can see if it fixes it there.

The URL with the error is:

https://preview.catalog.hathitrust.org/Search/Home?lookfor=98731&searchtype=isn&ft=ft&setft=true

@aelkiss aelkiss requested a review from moseshll January 8, 2026 15:42
@aelkiss
Copy link
Member Author

aelkiss commented Jan 8, 2026

This isn't what we want as the full view link disappears entirely. I need to look a little bit more at why the full-view URL ends up undefined as I think we probably need to make sure that doesn't happen -- even if there are no results there should still be a URL.

@aelkiss
Copy link
Member Author

aelkiss commented Jan 8, 2026

OK, after some digging I realize what's going on here -- this branch doesn't set the fullview-only count & url. I'll need to think about how to adjust this.

https://github.com/hathitrust/catalog/blob/main/services/Search/Home.php#L214-L229

* Always set fullview_url even if there are no results
* Default allitems/fullview urls to blank (current page) (shouldn't be necessary but
  doesn't hurt)
@aelkiss aelkiss marked this pull request as ready for review January 8, 2026 19:29
@aelkiss
Copy link
Member Author

aelkiss commented Jan 8, 2026

@moseshll Ready for review. This is set on both dev-1.catalog (directly against main) and on preview (on top of https://github.com/hathitrust/catalog/tree/ETT-636-trixie). It's a bit bigger change but should be safe enough.

I will also try adding a test for this case, which should be doable using the sample catalog.

@aelkiss
Copy link
Member Author

aelkiss commented Jan 8, 2026

Test added.

@aelkiss
Copy link
Member Author

aelkiss commented Jan 8, 2026

Test passes for me locally but is failing in github. I'll need to look at what's going on.

@aelkiss
Copy link
Member Author

aelkiss commented Jan 8, 2026

Looks like the new test is failing on mobile which I did not have enabled. I'll see what's going on there.

@aelkiss
Copy link
Member Author

aelkiss commented Jan 8, 2026

On mobile the filters are behind a 'Show Search Filters' button. I think I can probably just remove the requirement that the link is visible -- mainly we just care here that the link exists and isn't empty or filled with garbage.

@aelkiss
Copy link
Member Author

aelkiss commented Jan 8, 2026

I ended up just skipping the test for mobile, for the same reason as we have in the facets spec.

@moseshll
Copy link
Contributor

moseshll commented Jan 8, 2026

I skipped mobile for the adv=1 test as well. I just can't bring myself to believe it's a crucial testing step.

Copy link
Contributor

@moseshll moseshll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had hoped to A/B test and observe this locally but pear.php.net seems to be acting up so I can't run it. So just going off the code changes and the previews I have no issues.

@aelkiss aelkiss merged commit c098513 into main Jan 9, 2026
2 checks passed
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.

3 participants