Comments (7)
We've seen this before where there are foreign keys preventing this deletion. Take a look in the database to see if there's anywhere those representations are being used (either a parent representation or maybe one of the ca_{tablename}_x_object_representations). Do a query to find out what the id's of the deleted representations are. (SELECT representation_id FROM ca_object_representations WHERE deleted
).
from providence.
@kehh Does that imply my object representations can't be deleted unless the object is also deleted? That would be... highly inconvenient.
Foreign key constraints are a likely issue. I've traced the silent failure as far as
providence/app/lib/BaseModel.php
Line 3493 in d06f5b1
And I was going to try to pull the codes next.
from providence.
'opn_error_number' => 250,
'ops_error_description' => 'Invalid relationship reference for representation_id',
'ops_error_context' => 'Db->mysqli->execute()',
from providence.
Here's the same query sent straight to the mysql client:
mysql> DELETE FROM ca_object_representations WHERE representation_id = 5773;
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`providence`.`ca_download_log`, CONSTRAINT `fk_ca_download_log_representation_id` FOREIGN KEY (`representation_id`) REFERENCES `ca_object_representations` (`representation_id`) ON DELETE RESTR)
from providence.
Good lord. So now I can't delete anything that has ever been downloaded? Is there no code to handle this?
from providence.
Purge the download log and delete whatever you want. Please keep in mind this is software for archival usage. For most users permanently deleting things is not desirable, especially if those things been interacted with (eg. downloaded).
from providence.
Got it but gee whiz. I'm trying to replace some representations and occasionally things get uploaded in error. Is this not a bug where I have to truncate a table to get the caUtils purge command to work as expected?
from providence.
Related Issues (20)
- Install profile: typeRestrictions not being obeyed in placement element HOT 1
- CSRF check failed - measure features HOT 1
- Icon images cannot be deleted? HOT 1
- Viewer Overlay Performance Bugs HOT 1
- IIIF Service Should Allow Client Caching
- [Feature request] Restart unfinished processes on widget HOT 2
- PHP Error in loadExporterByCode() breaks download of object representations files in CA 2.0 HOT 4
- In Firefox, Can't Add Multiple Related Places
- 3rd-Party Tracking Installed by login.css HOT 1
- Quick Add UI's don't show tooltip help text HOT 1
- fsockopen a Weak Choice for IPv6 Environments HOT 1
- Error exporting `.docx` with the default `report_img` configuration HOT 1
- Move simplesaml include from /var/ to its location in /vendor HOT 1
- incorrect labels being set on install HOT 3
- XOAUTH2 SMTP authentication method HOT 1
- IDNO Indexing HOT 3
- Subsequent batch edits in the same task queue run fail HOT 2
- Call to undefined function caLogError() in dev/php8
- Object Representation restrict by type HOT 2
- Set of list_items only shows one in set items list HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from providence.