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

CSS hack for hiding Gutenberg post_author no longer works redux #825

Closed
gamebits opened this issue Oct 22, 2021 · 5 comments
Closed

CSS hack for hiding Gutenberg post_author no longer works redux #825

gamebits opened this issue Oct 22, 2021 · 5 comments

Comments

@gamebits
Copy link
Contributor

This is a recurrence of #791 that was addressed in #793. The "Author" dropdown is again being displayed, despite Co-Authors Plus being active and inserting its own "Authors" field.

wp-author

cap-authors

I've thus far been unsuccessful in determining what change to WordPress or Gutenberg broke the prior fix, or what new CSS should be targeted.

wp-authors-css

@rebeccahum
Copy link
Contributor

@lschuyler Can you look at this?

@lschuyler
Copy link
Contributor

Hi @gamebits:

I'm not able to reproduce this with the latest version of WordPress and Co-Authors Plus with no other plugins installed, using the Twenty Twenty-One theme.

Can you tell me a bit more about the set-up where you are seeing this issue? WordPress version? Version of Co-Authors Plus?
Are you able to disable the other plugins to rule out any interference?
What theme are you using? Does it still occur if you switch to a default WordPress theme?

Thanks!

@lschuyler
Copy link
Contributor

Progress! This can be replicated as soon as there are over 25 authors.

Gutenberg in WordPress core changes the type of author select combobox when there are 25 or more authors, and this isn't being hidden by the previous CSS change. So where the current CSS hack works, as soon as there are over 25 authors, the type of select box changes, and the hack no longer targets the CSS class.

To fix, this hack can be expanded to also hide this >25 author select combobox class that Gutenberg uses, however there isn't a precise ID or class that can be targeted, so there is a possibility that this will hide any similar combobox added to the same area of the edit page by any other plugin.

A better plan for the future may be to hook into Gutenberg to prevent the author box from being added to the page, or better yet, replace it with CAP's author selector.

@lschuyler
Copy link
Contributor

With the changes to the author combobox in the editor from #790, I don't think this will be needed anymore, and the CSS hack introduced in #791 can likely be removed too. I'll test!

@lschuyler
Copy link
Contributor

Confirmed. We aren't using the author box from core anymore, so this is no longer a relevant issue.

CSS hack removed in #847.

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