Coder Social home page Coder Social logo

Comments (5)

wbraswell avatar wbraswell commented on May 28, 2024

@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.

denny avatar denny commented on May 28, 2024

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.

wbraswell avatar wbraswell commented on May 28, 2024

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.

denny avatar denny commented on May 28, 2024

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.

wbraswell avatar wbraswell commented on May 28, 2024

Nice, will test on my next Shiny install. 👍

from shinycms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.