WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
[resolved] Can't delete connections (20 posts)

  1. sccr410
    Member
    Posted 2 years ago #

    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.

    http://wordpress.org/extend/plugins/posts-to-posts/

  2. sccr410
    Member
    Posted 2 years ago #

    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

  3. scribu
    Member
    Plugin Author

    Posted 2 years ago #

  4. sccr410
    Member
    Posted 2 years ago #

    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!

  5. sccr410
    Member
    Posted 2 years ago #

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

  6. sccr410
    Member
    Posted 2 years ago #

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

  7. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    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?

  8. sccr410
    Member
    Posted 2 years ago #

    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.

  9. scribu
    Member
    Plugin Author

    Posted 2 years ago #

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

  10. sccr410
    Member
    Posted 2 years ago #

    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.

  11. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  12. sccr410
    Member
    Posted 2 years ago #

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

  13. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    "WordPress HTTPS plugin" ?

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

    ajaxurl = 'https://...'

    and then check if deleting works.

  14. sccr410
    Member
    Posted 2 years ago #

    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/

  15. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  16. non_human
    Member
    Posted 2 years ago #

    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?

  17. Mvied
    Member
    Posted 2 years ago #

    Hey guys,

    I'm the author of WordPress HTTPS. This is a known issue. I'm not actively supporting the plugin, but I'm almost done with a complete rewrite that will fix this and other issues.

    Thanks,
    Mike

  18. non_human
    Member
    Posted 2 years ago #

    Hi Mvied,
    Can you notify us in this thread when there will be a solution for this issues? And what to do from our side to implement it.
    Thanks a lot for your work!

  19. AngieP
    Member
    Posted 2 years ago #

    Greetings Mike,

    I'm joining the crowd of fans in looking forward to your paradigm shift :)

    Warm regards,
    Angie

  20. Mvied
    Member
    Posted 2 years ago #

    I just pushed up WordPress HTTPS 3.0. It should take care of the issue. Let me know!

    Thanks,
    Mike

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic