Page MenuHomePhabricator

Wikipedia Preview errors out on custom post types
Closed, ResolvedPublic

Description

User bug report: https://wordpress.org/support/topic/the-wikipediapreview-postmeta-detectlinks-plugin-has-encountered-an-error/

It looks like the part of the plugin adding the "detect links" checkbox to the post meta panel is not receiving the postMeta config as function argument.

QA Results - WordPress Dev

Event Timeline

SBisson triaged this task as High priority.Feb 7 2024, 3:07 PM

This is how I added a custom post type to reproduce the issue:

function wpwpp_custom_post_type() {
	register_post_type('wpwpp_product',
		array(
			'labels'      => array(
				'name'          => __('Products', 'textdomain'),
				'singular_name' => __('Product', 'textdomain'),
			),
			'public'      => true,
			'has_archive' => true,
			'excerpt', 'comments',
			'show_in_rest' => true,
			'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments')
		)
	);
}
add_action('init', 'wpwpp_custom_post_type');

As noted here, the custom post type needs to support custom-fields for the postMeta to be available to the Wikipedia Preview section in the side bar.

@SBisson I did not see any issues with Wikipediapreview when creating a podcast episode with a couple of examples below. I will move this to design sign-off. Thanks for all your work!

Status: ✅PASS
Environment: WordPress Dev- 6.4.3; Wikipreview: 1.12.0; Commit: 0e3b28baaf53d2b03b35d05112f042245beb943c, Thu Feb 15 14:53:05 2024 -0500
OS: macOS Sonoma 14.2
Browser: Chrome 122
Skins. N/A
Device: MBA M2
Emulated Device:: n/a
Test Links:
http://dev-test.local/wp-admin/post.php?post=53&action=edit

✅AC1: https://phabricator.wikimedia.org/T356880

2024-03-22_14-57-28.png (1×3 px, 385 KB)
2024-03-22_14-58-05.png (1×3 px, 515 KB)