Skip to content

Changing a slug from internal to external breaks things #24992

@cathysarisky

Description

@cathysarisky

Issue Summary

OK, weird edge case, but here goes:

1 - Create and tag posts with an #internal tag. Then realize you didn't want it to be internal, and change its name and slug to match the external pattern.
This results in normal behavior at /tag/slug, however, routes are broken.
2 - add the following to routes.yaml:

collections:
  /vnn-archive/:
    permalink: /{slug}/
    template: tag
    filter: tags:[vnn-archive]
    data: 'tag.vnn-archive'

  /:
    permalink: /{slug}/
    template: home
    filter: tags:-[vnn-archive]

Now tags/vnn-archive redirects to /vnn-archive, but vnn-archive has no content (just the title). The posts aren't getting routed there.

Loading a routes.yaml file without the data attribute causes these posts to again appear at /tags/vnn-archive.

Steps to Reproduce

see above

Ghost Version

Ghost Pro

Node.js Version

Ghost Pro

How did you install Ghost?

Ghost Pro

Database type

MySQL 8

Browser & OS version

No response

Relevant log / error output

Code of Conduct

  • I agree to be friendly and polite to people in this repository

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug[triage] something behaving unexpectedlycommunity[triage] Community features and bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions