atlas-content-modeler icon indicating copy to clipboard operation
atlas-content-modeler copied to clipboard

Make 'slug' appear in Quick Edit for public models

Open jasonbahl opened this issue 3 years ago • 1 comments

A clear and concise description of the bug goes here.

To reproduce

  1. Create an ACM Model
  2. Add content to the model
  3. 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

CleanShot 2022-05-05 at 15 28 17

I can edit the slug in quick edit

CleanShot 2022-05-05 at 15 27 41


Post Type registered using ACM:

I can't edit the slug on the edit view

CleanShot 2022-05-05 at 15 29 54

I can't edit the slug in quick edit

CleanShot 2022-05-05 at 15 29 36

Version information

  • Plugin version: 0.17.0
  • WordPress version: 5.9.3

jasonbahl avatar May 05 '22 21:05 jasonbahl

@jasonbahl On the edit view, you should be able to enable the slug meta box via Screen Options:

Screenshot 2022-05-06 at 10 15 18

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.

nickcernis avatar May 06 '22 08:05 nickcernis

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

mindctrl avatar Feb 19 '24 15:02 mindctrl