-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot Delete Distributed Posts #821
Comments
@LucyTurtle can you confirm your WordPress and Distributor versions as well as the active theme and any other relevant active plugins? Also confirmation if this is a network set up or separate WordPress installs will help us to replicate your setup / better triage your issue... thanks! |
Hodwy there! I am on a multi-site setup. Wordpress version 5.8.2, Distributor version 1.6.7.
We have been using your plugin for quite a while (since maybe around May?) but I am unsure when this issue started. I don't think until now I had to delete a post on the master site we use for distributing. Thanks for your help! |
Thanks for the report @LucyTurtle. I was not able to reproduce the issue myself but looking at the original error message you provided, I do think there's a scenario that could cause problems. Not sure if this is what you might have experienced but right now if you:
I would guess this is closer to an edge case situation but still something we should account for. I've opened #830 that adds better checking to ensure we have proper data before proceeding that I believe should solve this. |
Hi there! This has got to be it! We are constantly adding and removing websites. So it makes sense! |
Describe the bug
When trying to delete a post that has been distributed to other sites it errors out. I have tried from the "posts" page, and the post editing page. I tried deleting distributed versions first.
Steps to Reproduce
Try to delete a distributed post
Expected behavior
The post would delete
Screenshots
Fatal error: Uncaught TypeError: Argument 1 passed to Distributor\InternalConnections\NetworkSiteConnection::__construct() must be an instance of WP_Site, null given, called in /www/searchsites_680/public/wp-content/plugins/distributor-stable/includes/classes/InternalConnections/NetworkSiteConnection.php on line 640 and defined in /www/searchsites_680/public/wp-content/plugins/distributor-stable/includes/classes/InternalConnections/NetworkSiteConnection.php:53 Stack trace: #0 /www/searchsites_680/public/wp-content/plugins/distributor-stable/includes/classes/InternalConnections/NetworkSiteConnection.php(640): Distributor\InternalConnections\NetworkSiteConnection->__construct(NULL) #1 /www/searchsites_680/public/wp-includes/class-wp-hook.php(303): Distributor\InternalConnections\NetworkSiteConnection::separate_syndicated_on_delete(559) #2 /www/searchsites_680/public/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) #3 /www/searchsites_680/public/wp-includes/plugin.php(470): WP_Hook->do_action(Array) #4 in /www/searchsites_680/public/wp-content/plugins/distributor-stable/includes/classes/InternalConnections/NetworkSiteConnection.php on line 53
The text was updated successfully, but these errors were encountered: