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

production category IDs don't match local env #85

Closed
4 tasks
iandunn opened this issue Nov 23, 2021 · 3 comments
Closed
4 tasks

production category IDs don't match local env #85

iandunn opened this issue Nov 23, 2021 · 3 comments

Comments

@iandunn
Copy link
Member

iandunn commented Nov 23, 2021

currently you have to manually update term_id in your local wp_terms and wp_term_taxonomy for the front page templates to work, b/c the have the production IDs hardcoded

the WRX from #10 doesn't have include category IDs because we exported specific post types rather than "all content"

we could update our export/import process to use "all content", but remove stuff we don't want later on. we'd probably have to hack together something that applies can_export => false to all the post types we don't want, though.

  • generate new export file w/ all content, limit to publish post status
  • ⚠️ prune for privacy
  • remove old files
  • update docs for export process

Alternatively, we could query by category slug if WordPress/gutenberg#36785 if resolved

@iandunn iandunn added the [Status] Blocked (external) Blocked by something outside our direct control label Nov 23, 2021
@iandunn iandunn added this to the Post-Launch Iteration milestone Nov 23, 2021
@iandunn iandunn changed the title Replace hardcoded term IDs with slugs Include categories in export Nov 23, 2021
@iandunn iandunn removed the [Status] Blocked (external) Blocked by something outside our direct control label Nov 23, 2021
@iandunn iandunn self-assigned this Nov 23, 2021
@iandunn iandunn changed the title Include categories in export production category IDs don't match local env Nov 23, 2021
@tellyworth
Copy link
Contributor

tellyworth commented Nov 24, 2021

What do you think of the idea of creating a custom wporg:query block that extends the core wp:query block, and adds support for querying by category slug (and anything else we need)?

It could essentially just do a slug -> id lookup and then wrap the core block. Though I'm not sure how easy that is, given that it's a JS block not dynamic.

@iandunn
Copy link
Member Author

iandunn commented Nov 24, 2021

🤔 , I think that'd work, and it sounds like a good solution. Definitely worth exploring 👍🏻

@ryelle
Copy link
Contributor

ryelle commented Apr 21, 2022

I'm going to close this because the custom_query_block_attributes workaround enables the query block to accept category and tag slugs now (and removing the workaround is tracked in #79).

@ryelle ryelle closed this as completed Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants