Comments (5)
@denny
Is this the same error I get when I try to delete a user which still has posts they own? Such as attempting to delete the demo user "w1n5t0n" without first deleting w1n5t0n's posts?
[error] DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Cannot delete or update a parent row: a foreign key constraint fails ("shac_seascouts_website"."news_item", CONSTRAINT "news_item_fk_author" FOREIGN KEY ("author") REFERENCES "user" ("id")) [for Statement "DELETE FROM user
WHERE ( id
= ? )" with ParamValues: 0='2'] at /home/wbraswell/public_html/shac_seascouts_website-latest/script/../lib/ShinyCMS/Controller/Admin/User.pm line 204
from shinycms.
Yeah, there's quite a lot of work that could be done still on either deleting related content when you delete a parent item, or flagging it up for user decision on whether they want to go and delete that stuff.
That said, I thought I'd done the confirmations one. I'll look at it again.
from shinycms.
This is still an issue, now it's doing it the IP address logging as well:
FastCGI: server "/tmp/burksdigital.biz.fcgi" stderr: [error] DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Cannot delete or update a parent row: a foreign key constraint fails ("burksdigital_biz"."user_ip_address", CONSTRAINT "user_ip_address_fk_user" FOREIGN KEY ("user") REFERENCES "user" ("id")) [for Statement "DELETE FROM user
WHERE ( id
= ? )" with ParamValues: 0='5'] at /home/wbraswell/public_html/burksdigital.biz-latest/script/../lib/ShinyCMS/Controller/Admin/User.pm line 205, referer: http://burksdigital.biz/admin/user/edit/5
from shinycms.
Just pushed a commit which hopefully removes all but the non-trivial user-generated content and associated metadata before attempting to delete a user account. Still need to decide what to do about the non-trivial stuff - blog posts, transaction logs, etc.
from shinycms.
Nice, will test on my next Shiny install.
from shinycms.
Related Issues (20)
- Need for Global Elements HOT 1
- Feature request: Entity lists
- Feature request: Configuration Assistant HOT 3
- typo in main.css @ line 351 HOT 1
- logo title HOT 2
- google map searches
- save user redirect is broken HOT 1
- nginx configuration HOT 2
- login.tt conditional
- site-footer registration conditional HOT 1
- New User configuration HOT 1
- Numeric shop_item.code breaks; need to remove special case code HOT 2
- cpanfile vs. Makefile.pl HOT 4
- Docker misunderstanding HOT 5
- CRITICAL: ShinyCMS In mod_perl, Silent Failure HOT 1
- Release on CPAN HOT 2
- Production-Ready Dockerfile HOT 8
- Would be nice to cache dependencies on Travis CI HOT 3
- Shop items with no category are not visible in admin area
- Upgrading MySQL from 5.7 to 8.0 makes breaking changes to timestamp behaviour
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 shinycms.