openlibhums / openlibhums/janeway

Collections nav item does not work in path mode

Open
#5,002 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
238
Forks
97
Avg merge
9d 1h
Merged PRs (30d)
8

Description

Problem

The default collections nav item is created with a leading slash:

https://github.com/openlibhums/janeway/blob/c293d0fae011a5cb7eb46dec1b1e270df5550f20/src/cms/models.py#L191

This causes path mode journals to jump to the press level, resulting in a 404.

To replicate:

  1. Put a journal in path mode
  2. Click "Enable" on the collections nav item in the Content Manager
  3. Click on the nav item that is generated
  4. See press-level 404

Proposed solution

Generate the URL in a way that will work for both path and domain modes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read src/cms/models.py at the linked collections navigation item definition, then reproduce the issue with a journal in path mode using the Content Manager steps. Verify that the generated collections URL works in both path and domain modes and no longer leads to a press-level 404.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.