[Plugin: Posts 2 Posts] Can't delete connections
-
Using latest version of WP and the plugin. We cannot delete any connections – the ajax call in the admin doesn’t seem to do anything, it just sits there after clicking the delete icon.
-
Here is our setup code:
p2p_register_connection_type( array( 'id' => 'procedures-locations', 'from' => 'procedures', 'to' => 'locations', 'cardinality' => 'one-to-many', 'sortable' => 'any' ) );Also a screenshot of what we see endlessly when trying to delete: https://skitch.com/sccr410/8kcjj/edit-procedure-imaging-healthcare-wordpress
Check for JavaScript errors:
We have the WordPress HTTPS plugin setup and have the admin under SSL – this appears to be the issue. Need to update the plugin to work under SSL!
No JS errors actually, so maybe that isn’t the issue. No clue at this point.
Here is my error console – everything looks fine but nothing happens – https://skitch.com/sccr410/8kctr/firebug-edit-procedure-imaging-healthcare-wordpress
Those do not look like the AJAX requests made by P2P. They’re XML instead of JSON.
Are you sure the AJAX url is correct? What’s being sent and what’s being received?
I opened up Firebug, showing the console and clicked the delete icon in the admin area. This is the result: https://skitch.com/sccr410/8kpa1/firebug-edit-procedure-imaging-healthcare-wordpress
It is a P2P request based on the parameters in the URL.
Well, I set up a similar connection type and everything works fine.
Try disabling SSL temporarily.
Also, does it work in the previous version of P2P (1.1.5)?
It did not work on 1.1.5. Unfortunately we have to run the entire thing under SSL on this dev URL just because of server setup and we need the SSL for other aspects of the site. I suppose we will have to wait until the site is on the live domain to verify this bug.
Wait, the AJAX url starts with
http://, nothttps://, even though P2P uses the nativeajaxurlvariable in JS.Maybe the request is blocked since it’s not over SSL.
I have no idea change the AJAX URL to https – would this be a bug in the WordPress HTTPS plugin or P2P?
“WordPress HTTPS plugin” ?
As a quick test, just set it temporarily through the Firebug console:
ajaxurl = 'https://...'and then check if deleting works.
Yep, that worked. So is it the SSL plugin’s fault for not changing that URL or P2P’s?
This is the SSL plugin: http://wordpress.org/extend/plugins/wordpress-https/
I guess so, since
ajaxurlis defined by WP, and simply used by P2P.I added the ‘wordpress-https’ tag to this topic, so the author should see it.
Hi scribu,
I have the same problem with deleting connected posts but only with one specific conection type. I have a day post type and connected to day are events and clsses. Classes I can add and delete without any problem but Events connections are not being deleted.
p2p_register_connection_type( array( 'name' => 'day_to_events', 'from' => 'day', 'to' => 'events', 'reciprocal' => true, 'sortable' => 'order', 'context' => 'advanced', 'title' => array( 'from' => 'Add Events to this day', 'to' => 'Add to Schedule' ), 'fields' => array() )); p2p_register_connection_type( array( 'name' => 'days_to_classes', 'from' => 'day', 'to' => 'competition', 'reciprocal' => true, 'sortable' => 'order', 'context' => 'advanced', 'title' => array( 'from' => 'Add Classes to this day', 'to' => 'Add to Schedule' ), 'fields' => array() ));All other connections I have throughout the site are working fine. Just the day_to_events one doesn’t work on deleting the connection.
Firebug console gave me this: http://d.pr/Jm8Any ideas?
The topic ‘[Plugin: Posts 2 Posts] Can't delete connections’ is closed to new replies.