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

Use the CPT/taxonomy slug instead of the rewrite slug in the URLs for settings sections #20864

Open
enricobattocchi opened this issue Nov 21, 2023 · 11 comments

Comments

@enricobattocchi
Copy link
Member

enricobattocchi commented Nov 21, 2023

What is the goal of this issue?

We currently use the rewrite slugs instead of the post type or taxonomy slugs to build the direct URLs to the relevant sections in the settings, e.g. /wp-admin/admin.php?page=wpseo_page_settings#/post-type/rewriteslug instead of /wp-admin/admin.php?page=wpseo_page_settings#/post-type/posttypeslug.
This can be a problem in some cases since the rewrite slug can change, so the URLs would change too; also, only the main slug is unique, so if a site admin registers a post type or a taxonomy that overrides the rewrite slug of a builtin type, the section for that content type is unreachable.
This is already experienced by some users for taxonomies: #20016

What needs to be done to achieve the goal?

We need to update how the URLs are created to use the main slug and not the rewrite slug.

Does the issue still need UX or research?

Not really, we don't expect side effects (though we need to make sure to check this).
Being totally on the backend side, there should not be any effect on the front-end/SEO side

If available: what are the tips for fixing the problem or possible solutions?

See above

Should documentation be added or updated for this change? and if so, where?

No.

@amboutwe
Copy link
Member

amboutwe commented May 4, 2024

Please inform the customer of conversation # 1130682 when this conversation has been closed.

@josevarghese
Copy link
Contributor

In #20341 we noticed the same issue occurs for the Tutor LMS CPT

Step-by-step reproduction instructions

  1. Install Yoast SEO
  2. Install Tutor LMS
  3. Navigate to WordPress > Yoast SEO > Settings > Content Types and select Assignments.
  4. You'd notice that Lessons and Quizzes are also selected/activated in the menu.

Expected results
When I click Assignments, I expect to be taken to the Assignments post type settings page
When I click Lessons, I expect to be taken to the Lessons post type settings page
When I click Quizzes, I expect to be taken to the Quizzes post type settings page

239921116-b044081e-48b7-4c59-b97a-9f4943704cc1

@josevarghese
Copy link
Contributor

Comment from Ramon here.

The URL loaded by Yoast SEO for the three post types Assignments, Lessons and Quizzes is the same: /wp-admin/admin.php?page=wpseo_page_settings#/post-type/lesson

image

A similar issue happens with the Directorist plugin #20016

@josevarghese
Copy link
Contributor

Please inform the customer of conversation # 1072770 when this conversation has been closed.

@josevarghese
Copy link
Contributor

Issue merged from #20016

Issue: Custom taxonomy tags added by Directorist plugin failed to open its respective SEO settings.

Step-by-step reproduction instructions

  1. Install and Activate Directorist plugin - Business Directory Plugin.
  2. Go to Yoast SEO > Settings >> Categories and Tags
  3. Click the Directorist Categories menu. You will see SEO settings for it.
  4. Click the Directorist Tags menu. You will be taken to the Category setting instead of the Tags settings.
  5. Both Tags and Categories has same URL as given below:

https://example.com/wp-admin/admin.php?page=wpseo_page_settings#/taxonomy/at_biz_dir-tags

Expected results
The Tags and Categories taxonomy should have a unique URL under the SEO settings page like WordPress default tags and category.

Custom post type category slug: at_biz_dir-category
https://example.com/wp-admin/edit-tags.php?taxonomy=at_biz_dir-category&post_type=at_biz_dir

Custom post type tag slug: at_biz_dir-tags
https://example.com/wp-admin/edit-tags.php?taxonomy=at_biz_dir-tags&post_type=at_biz_dir

225576604-cb3fa0a4-eb34-411f-8d1f-70274d780e0e

@josevarghese
Copy link
Contributor

Please inform the customer of conversation # 996719 when this conversation has been closed.

@josevarghese
Copy link
Contributor

Please inform the customer of conversation # 1072770 when this conversation has been closed.

@amboutwe
Copy link
Member

amboutwe commented May 6, 2024

Conversation # 1130682: Issue occurs with Paid Memberships Pro

@ogodoabiola
Copy link

Please inform the customer of conversation # 1134067 when this conversation has been closed.

@josevarghese
Copy link
Contributor

Please inform the customer of conversation # 1136002 when this conversation has been closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants