[code: Installer Installer::removeCancelledReviewAssignments]
PHP Fatal error: Call to a member function getContextId() on null in /var/www/server.fi/public_html/lib/pkp/classes/submission/reviewAssignment/ReviewAssignment.inc.php on line 517
@asmecher do you have handy some sql commands that would search for:
all submissions that are connected to journals that do not exist anymore
and a way to remove review_assignments and other related data connected to those submissions
I am hoping to clean up the database for future updates and similar situations. And maybe such sql’s could even by added to the upgrade script to prevent situations like mine from happening?
SELECT s.submission_id FROM submissions s LEFT JOIN journals j ON (s.context_id = j.journal_id) WHERE j.journal_id IS NULL;
You may be able to use tools/deleteSubmissions.php, but I’m not sure whether it makes assumptions about data integrity when running. For example, I suspect it’ll fail to delete submissions if the section the submission refers to doesn’t exist. You might try turning on the debug setting in config.inc.php and inspecting the SQL queries for joins that might miss data.
Regards,
Alec Smecher
Public Knowledge Project Team