scribu/wp-posts-to-posts — Issue #92: A connection field with the name "title" breaks the edit box
Author: PerWiklander
Created: 2011-12-29 11:36:17+00:00
State: open

This will replace the name of the connected post with the field named "title" in the connection editor (so you can’t see the title of the post and you are working blind):

p2p_register_connection_type(
array(
'name' => static::CONNECTION_SECTION_ARTICLES,
'from' => Section_Post_Type::get_post_type(),
'to' => Article_Post_Type::get_post_type(),

'fields' => array(
'title' => 'My title',
)
)
);

This will work as expected

p2p_register_connection_type(
array(
'name' => static::CONNECTION_SECTION_ARTICLES,
'from' => Section_Post_Type::get_post_type(),
'to' => Article_Post_Type::get_post_type(),

'fields' => array(
'my_title' => 'My title',
)
)
);