openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Manual navigation to usergroup/ edit pages blocked

Open seabelis opened this issue 6 months ago • 6 comments

Problem

Editing usergroups i.e. https://openlibrary.org/usergroup/librarians?m=edit fails due to blocking no referrer

Reproducing the bug

  1. Go to ...
  2. Do ...
  • Expected behavior:
  • Actual behavior:

Context

  • Browser (Chrome, Safari, Firefox, etc):
  • OS (Windows, Mac, etc):
  • Logged in (Y/N):
  • Environment (prod, dev, local): prod

Breakdown

Requirements Checklist

  • [ ]

Related files

Stakeholders


Instructions for Contributors

  • Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.

seabelis avatar Jun 04 '25 15:06 seabelis

This problem has been excessively frustrating to me, and I am a person who rarely edits the catalog. Recommend that solving this and similar issues be a https://github.com/internetarchive/openlibrary/labels/Priority%3A%201 or https://github.com/internetarchive/openlibrary/labels/Priority%3A%202 effort.

jimchamp avatar Jun 04 '25 23:06 jimchamp

In the similar category, ?m=history for the "losing" side of a merge trace the provenance. Doubly bad because their's no link back to the source of a redirect like you see on Wikipedia and other sites, so there's no other way to get "referred" there. SO annoying.

To add insult to injury, the error screen is completely non-sensical with a broken image link and a silly "Looks like you lost your connection" message. https://openlibrary.org/authors/OL7659571A?m=history

tfmorris avatar Jun 04 '25 23:06 tfmorris

Just discovered a hack which might help @seabelis - if you click the "Retry" button on the error page, it will refer you to the original URL. Problem solved! (Don't ask me why a "Blocked" error page has a retry button!)

tfmorris avatar Jun 05 '25 00:06 tfmorris

Likely related: #10903

jimchamp avatar Jun 05 '25 16:06 jimchamp

I posted a work-around in this Slack thread as a stop-gap. It's less than ideal, but hopefully helpful.

jimchamp avatar Jun 05 '25 21:06 jimchamp

I have a file openlibrary/templates/type/usergroup/view.html that solves this problem

$def with (page)

$var title: $page.key

<div id="contentHead">
    $:macros.databarView(page)
    <h1>$page.key</h1>
</div>

<div id="contentBody">

    <div>$:format(page.description)</div>

    <table>
      $for member in page.members:
        <tr><td>$member</td></tr>
    </table>

</div>

I just need to open a PR

mekarpeles avatar Jun 09 '25 19:06 mekarpeles