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

Tags tab shows error page when there are no posts or tags #1485

Open
trichoplax opened this issue Dec 14, 2024 · 4 comments · May be fixed by #1486
Open

Tags tab shows error page when there are no posts or tags #1485

trichoplax opened this issue Dec 14, 2024 · 4 comments · May be fixed by #1486
Assignees
Labels
area: ruby Changes to server-side code complexity: average Not particularly hard, not particularly trivial. priority: high type: bug Something isn't working

Comments

@trichoplax
Copy link
Contributor

Describe the bug
An error page is displayed when trying to view the "Tags" tab in a new development environment with no posts or tags created yet.

To Reproduce
Steps to reproduce the behavior:

  1. Set up a new development environment on a new machine following the installation guide
  2. View localhost:3000 in your browser, to see the empty "Q&A" question list page as expected
  3. Click on the "Tags" tab without first creating any posts or tags
  4. See error page

Expected behavior
The code shown in the error page, from app/views/tags/category.html.erb, is intended to display a message "This category is missing its tag set. Set this in the Category settings (admin)" rather than giving an error page.

Screenshots
Screenshot of the error page titled "ActiveRecord::StatementInvalid in Tags#category"

Additional context
Operating system: Fedora 40
Browser: Firefox 133.0.3 (64 bit)
Ruby version: 3.1.6
Rails version: 7.0.8.5

@cellio cellio added area: ruby Changes to server-side code type: bug Something isn't working priority: high complexity: unassessed Needs further developer investigation before complexity/feasibility can be determined. labels Dec 15, 2024
@Oaphi
Copy link
Member

Oaphi commented Dec 15, 2024

It is much easier to reproduce by simply deleting all tags from a category (just a quick note)

@Oaphi Oaphi self-assigned this Dec 15, 2024
@Oaphi Oaphi added complexity: average Not particularly hard, not particularly trivial. and removed complexity: unassessed Needs further developer investigation before complexity/feasibility can be determined. labels Dec 15, 2024
@trichoplax
Copy link
Contributor Author

Thanks! I discovered it during setting up QPixel on a new machine - I should have checked if it was reproducible by simply deleting the tags. I've updated the steps in the bug description.

@trichoplax
Copy link
Contributor Author

In case this makes it lower priority, I can't see a way this would often affect users (unless a category has only just been created), so it should only be a problem for developers and new instance hosts.

@cellio
Copy link
Member

cellio commented Dec 15, 2024

A problem in a new instance is still a barrier for adoption, even if end users don't see it. Thanks to both of you for reporting and working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ruby Changes to server-side code complexity: average Not particularly hard, not particularly trivial. priority: high type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants