-
Notifications
You must be signed in to change notification settings - Fork 642
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
Category/tag/global set entrification #12689
Category/tag/global set entrification #12689
Conversation
DEV-1012 Category/tag/global set → entry conversion tool
There needs to be some way of converting existing category groups, tag groups, and global sets to sections. Conversion will need to be split into three steps:
|
@brandonkelly this is great!
i double-checked permission on the config/project folder and it is writable. |
@vnali Weird… it’s gotta be some sort of permission thing. PHP is probably being executed as a different user for CLI requests than it is for web requests. Can you try switching to whatever user account web requests are running as first, via sudo su - username |
@brandonkelly thanks! I wasn't sure how to switch to another user on my environment but changing permission on the config folder to 777 worked, so definitely it was a permission issue. |
I had some issues with converting a global set, all went well local, but after pushing to staging I ran the command and got this error:
On staging:
FYI I converted the categories first and that worked as intended 👍 |
@FrDH Did you run |
I just want some clarification on this entrification process. I've run the commands locally, and taken a record of the commands to be run on the server. I've committed my changes to my repo. Once I have deployed, do I run the commands immediately, or do I apply yaml changes, and then run the commands? If I've deleted the categories groups locally, whilst following the prompts thrown by entrification (e.g. "Delete the 'Blog' category group? Yes") and committed these changes to the yaml file, will this cause any issues or conflicts? Or would the categories themselves still exist to be converted to entries, despite the deletion of the group? Thanks |
@jevans1808 You’ll run |
Awesome, thank you for the clarification! |
Description
Adds new entrification commands:
entrify/categories
entrify/tags
entrify/global-set
Plus some supplemental section maangement commands:
sections/create
sections/delete
Here’s what the workflow for converting categories/tags/global sets to sections and entries will look like:
Run the
entrify/*
command(s) locally.The command will walk you through creating a new section based on the category/tag group or global set, convert the elements to entries in that section, and optionally also delete the old category/tag group or global set, and convert Categories/Tags fields over to Entries fields.
Update your templates, custom plugin/module code, and GraphQL queries accordingly.
Deploy the changes to another environment.
Run the same command immediately after deployment (after applying project config changes). This time, the new sections will already be in place, and the category/tag groups and global sets will be soft-deleted. So the command will only need to convert the actual category/tag/global set elements to entries.
Related issues