Closed JiveDig closed 7 years ago
Just created a new post (Step), and connected it to a different Program. The list is showing the same (wrong) connection still. Something is weird. I'm starting to think it's on my end now.
FWIW, it's working the other way.. .when i view Programs admin archive it shows everything correctly. But the reverse, on Steps archive is the issue.
Thanks for the ticket.
There's a good chance there's a bug here because the P2P functionality in ExtCPTs isn't very well tested. I had a use for it once, a long time ago, and it's not gotten much love since.
If you can pinpoint where the issue is that'd be a great help!
Thanks for the reply John. I really love these classes FWIW, extremely powerful. Thanks for sticking with them ;)
I'm not sure how else to debug, unfortunately. It works on one 'side' of the connection, but not the other. I may have to recreate on a test install and see if the issue still exists. Create 2 CPT's, register a p2p connection between them, then use admin_cols to display the connection for both CPTs. That's all that I appear to have done.
Hope my fix will solve your problem. Could you try, so we have another testcase?
Will test tomorrow, thanks!
@JiveDig, have you tried the fix, and does it work in your case?
Ah sorry, I rebuilt the plugin I hit the big in without the need for P2P so I haven't tested. I still love P2P though so I'd love to know this works. Not sure when I'll find the time to test, but I'd like to.
Closing in favour of #53.
I'm using 3.0.1 of Extended CPTs.
I have 2 CPT's with a one-to-many connection via:
p2p_register_connection_type( array( 'name' => 'programs_to_steps', 'from' => 'wampum_program', 'to' => 'wampum_step', 'cardinality' => 'one-to-many', 'can_create_post' => false, 'sortable' => 'any', 'admin_box' => array( 'show' => 'any', 'context' => 'side', ), 'admin_column' => true, ) );
When viewing the 'wampum_step' CPT archive in admin, the connected post results are off. See screenshot.
The correct column is on the right, but I would like to show these columns via Extended CPTs rather than default p2p.