atlas-content-modeler
atlas-content-modeler copied to clipboard
Make 'slug' appear in Quick Edit for public models
A clear and concise description of the bug goes here.
To reproduce
- Create an ACM Model
- Add content to the model
- Try to edit the slug
Expected behavior
In core WordPress post types, there's a UI to edit slugs.
With ACM models there's no way to edit the slug once it's been set.
I would like to be able to edit the slug.
Screenshots
Post Type registered with the following code:
register_post_type( 'custom_rabbit', [
'label' => 'Custom Rabbit',
'show_ui' => true,
'public' => true,
'show_in_graphql' => true,
'show_in_rest' => true,
'graphql_single_name' => 'CustomRabbit',
'graphql_plural_name' => 'CustomRabbits',
]);
I can edit the slug while editing the post

I can edit the slug in quick edit

Post Type registered using ACM:
I can't edit the slug on the edit view

I can't edit the slug in quick edit

Version information
- Plugin version: 0.17.0
- WordPress version: 5.9.3
@jasonbahl On the edit view, you should be able to enable the slug meta box via Screen Options:
Perhaps we should enable it by default if that's possible, though (I think those settings are per-user, but there might be some defaults we can tweak). Or we could enable the real title field in place of the ACM 'title' field.
The fact that it's missing on the quick edit view is a bug, though. (Core suggests the slug should appear for any publicly_queryable CPT — i.e. if “API visibility” is 'true' in ACM, which isn't working.)
I tracked it down to here, where we're disabling titles so that they don't appear on the edit screen:
https://github.com/wpengine/atlas-content-modeler/blob/8fa0a296754a06be2cca6e38d400076c4a495454/includes/publisher/class-publisher-form-editing-experience.php#L93-L96
We need to adjust that logic to run only on edit/create screens and not on the post list view. I added this to Jira for us to fix. https://wpengine.atlassian.net/browse/MTKA-1495.
Since ACM has entered an end-of-life phase and won't be receiving any new features like this, I'm going to close this issue. Source: https://github.com/wpengine/atlas-content-modeler/blob/main/docs/end-of-life/index.md