migrator icon indicating copy to clipboard operation
migrator copied to clipboard

Migration didn’t consistently migrate taxonomy-collection connection

Open fitzage opened this issue 4 years ago • 0 comments

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.

fitzage avatar Aug 31 '20 21:08 fitzage