Hi friends! It's me again!
We're in the process of implementing a full Pawtucket site (finally) and discovered that many of our object representations aren't set to be accessible to public. So I tried to do a batch edit to switch all of them to be accessible. This didn't seem to go anywhere when run from the page, so I enabled the task queue and ran it so that I could see command line errors, and got this:
PHP Fatal error: Uncaught DatabaseException: Cannot add or update a child row: a foreign key constraint fails in /app/lib/Db/mysqli.php:358
Stack trace:
#0 /app/lib/Db/DbStatement.php(150): Db_mysqli->execute(Object(DbStatement), Object(DbStatement), '\n\t\t\t\tINSERT INT...', Array, NULL)
#1 /app/lib/Db.php(261): DbStatement->executeWithParamsAsArray(Array)
#2 /app/lib/Logging/Batchlog.php(126): Db->query('\n\t\t\t\tINSERT INT...', 1, 264, 'Tjs=')
#3 /app/lib/BatchProcessor.php(128): Batchlog->addItem(1, Array)
#4 /app/lib/Plugins/TaskQueueHandlers/batchEditor.php(105): BatchProcessor::saveBatchEditorForm(Object(RequestHTTP), Object(RecordSelection), Object(ca_objects), Array)
#5 /app/lib/TaskQueue.php(364): WLPlugTaskQueueHandlerbatchEditor->process(Array)
#6 /app/lib/TaskQueue.php(733): TaskQueue->processQueue(NULL, Array)
#7 /app/lib/Utils/CLIUtils/Cron.php(38): TaskQueue::run(Array)
#8 /support/bin/caUtils(171): CLIUtils::process_task_queue(Object(Zend_Console_Getopt))
#9 {main}
thrown in /app/lib/Db/mysqli.php on line 358
The server is running mysql version 8.0.28
I was going to try to clear the process queue just to try re-queueing it (which probably wouldn't help anyway) but not sure how to clear the queue.
I was thinking I might try to circumvent this and just edit it directly from phpMyAdmin but the 'access' column in the ca_object_representations table doesn't seem to correspond to the entries that aren't accessible.
I'm also trying to get everything from a list/vocabulary set to publicly accessible (don't even ask why it wasn't set that way in the first place) but no way to do that from a batch edit that I can tell.
This is what happens when a doctor tries to do things wayyyyy outside of their field!