Skip to content

Migration didn’t consistently migrate taxonomy-collection connection #64

Description

@fitzage

I was trying to figure out why one of my collections would not filter by taxonomy. I eventually tracked it down to the collection definition file.

blog.yaml looked like this:

template: article
title: Blog
route: '/blog/{year}/{month}/{day}/{slug}'
taxonomies:
  - tags
date: true
date_behavior:
  past: public
  future: unlisted
sort_dir: desc

and press.yaml looked like this:

template: press
title: Press
route: '/press-releases/{year}/{month}/{day}/{slug}'
date: true
date_behavior:
  past: public
  future: unlisted
sort_dir: desc

Notice that in press.yaml, the taxonomies node is missing. Updating it to look like this solved my problem:

template: press
title: Press
route: '/press-releases/{year}/{month}/{day}/{slug}'
taxonomies:
  - press
date: true
date_behavior:
  past: public
  future: unlisted
sort_dir: desc

So I’m not sure 1) why this is required in v3, but not v2, and 2) not sure where it got this info to migrate it, but 3) it migrated that info for blog but not for press.

The blueprints are set up the same for both of them, except that press limits the taxonomy field to one term.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions