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

Post Types: Move back-compat registration later to avoid Gutenberg fatal #980

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

iandunn
Copy link
Member

@iandunn iandunn commented Jul 26, 2023

There's a fatal error on wp-admin/site-editor.php?wp_theme_preview=twentytwentythree&return=themes.php because WordCamp_Post_Types_Plugin_Back_Compat::__construct() calls wp_get_theme()->get_stylesheet(); That used to work, but now gutenberg_get_theme_preview_path() hooks in and calls wp_get_current_user(), which isn't registered at this point.

Moving the registration later avoids the issue.

@iandunn iandunn self-assigned this Jul 26, 2023
@iandunn iandunn force-pushed the wcposttype-backcompat-fatal branch from 6576b41 to 09f1e33 Compare July 26, 2023 16:21
@iandunn iandunn merged commit 13f9974 into production Jul 26, 2023
3 checks passed
@iandunn iandunn deleted the wcposttype-backcompat-fatal branch July 26, 2023 16:47
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

Successfully merging this pull request may close these issues.

1 participant