Support » Plugin: Posts 2 Posts » [Plugin: Posts 2 Posts] Can't delete connections

Viewing 15 replies - 1 through 15 (of 19 total)
  • sccr410

    (@sccr410)

    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

    Plugin Author scribu

    (@scribu)

    sccr410

    (@sccr410)

    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!

    sccr410

    (@sccr410)

    No JS errors actually, so maybe that isn’t the issue. No clue at this point.

    sccr410

    (@sccr410)

    Here is my error console – everything looks fine but nothing happens – https://skitch.com/sccr410/8kctr/firebug-edit-procedure-imaging-healthcare-wordpress

    Plugin Author scribu

    (@scribu)

    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?

    sccr410

    (@sccr410)

    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.

    Plugin Author scribu

    (@scribu)

    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)?

    sccr410

    (@sccr410)

    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.

    Plugin Author scribu

    (@scribu)

    Wait, the AJAX url starts with http://, not https://, even though P2P uses the native ajaxurl variable in JS.

    Maybe the request is blocked since it’s not over SSL.

    sccr410

    (@sccr410)

    I have no idea change the AJAX URL to https – would this be a bug in the WordPress HTTPS plugin or P2P?

    Plugin Author scribu

    (@scribu)

    “WordPress HTTPS plugin” ?

    As a quick test, just set it temporarily through the Firebug console:

    ajaxurl = 'https://...'

    and then check if deleting works.

    sccr410

    (@sccr410)

    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/

    Plugin Author scribu

    (@scribu)

    I guess so, since ajaxurl is defined by WP, and simply used by P2P.

    I added the ‘wordpress-https’ tag to this topic, so the author should see it.

    non_human

    (@non_human)

    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/Jm8

    Any ideas?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Plugin: Posts 2 Posts] Can't delete connections’ is closed to new replies.