Author Topic: Delete spell error  (Read 7359 times)

Nathan

  • Mighty Duke
  • ****
  • Posts: 713
    • View Profile
Delete spell error
« Topic Start: October 23, 2011, 10:44:44 PM »
When I click "give up and delete spell", I'm taken to an error page that says:

PDOException [ 23000 ]: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`SM3`.`characters_spells`, CONSTRAINT `characters_spells_ibfk_2` FOREIGN KEY (`spell_id`) REFERENCES `Spells` (`id`))

Morningstar

  • Noble Lord
  • ***
  • Posts: 251
    • View Profile
Re: Delete spell error
« Reply #1: October 24, 2011, 03:45:57 AM »
When I click "give up and delete spell", I'm taken to an error page that says:

Quitter.  :P

Ok but seriously, I can't verify one way or the other. Don't have any spells pending on my end.

Indirik

  • Exalted Emperor
  • ******
  • Posts: 10849
  • No pressure, no diamonds.
    • View Profile
Re: Delete spell error
« Reply #2: October 24, 2011, 03:55:30 PM »
It worked for me. I just deleted a spell that had been rejected.
If at first you don't succeed, don't take up skydiving.

Nathan

  • Mighty Duke
  • ****
  • Posts: 713
    • View Profile
Re: Delete spell error
« Reply #3: October 24, 2011, 04:43:17 PM »
It worked for me. I just deleted a spell that had been rejected.

I'm still getting the error.

Anarki_Hunter

  • Knight
  • **
  • Posts: 26
  • Gra'd Arbitrator
    • View Profile
Re: Delete spell error
« Reply #4: October 24, 2011, 04:47:23 PM »
I cannot see the 'Delete' spell option!, I am a normal generic user to SM3 and use a chrome browser (is this the attributing factor!).

-Edit-

Also, 2 of the 3 spells which were awaiting approval had disappeared a few days ago without any notification!.
« Last Edit: October 24, 2011, 04:48:55 PM by Anarki_Hunter »

Indirik

  • Exalted Emperor
  • ******
  • Posts: 10849
  • No pressure, no diamonds.
    • View Profile
Re: Delete spell error
« Reply #5: October 24, 2011, 05:22:59 PM »
I believe that when you submit a spell and it is rejected, you will get the option to delete it. Once a spell has been approved it is "in the system", and you lose control over it.

You can't delete spells from your spell list. These are the ones you have learned, and your character can use.

Also, 2 of the 3 spells which were awaiting approval had disappeared a few days ago without any notification!.
This means that a GM approved them for use. You may or may not have been granted one or more them for your own use.
If at first you don't succeed, don't take up skydiving.

Tom

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: Delete spell error
« Reply #6: October 24, 2011, 07:12:52 PM »
you're trying to delete a spell that someone has already learnt?

Nathan

  • Mighty Duke
  • ****
  • Posts: 713
    • View Profile
Re: Delete spell error
« Reply #7: October 24, 2011, 07:35:12 PM »
you're trying to delete a spell that someone has already learnt?

Nope. However there is a spell with the same name (if discounting capitalisation). The existing one is "Cauterize Wound" (spell 32), whereas mine is "Cauterize wound" (spell 413).

Tom

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: Delete spell error
« Reply #8: October 24, 2011, 10:49:48 PM »
name doesn't matter to the database. :-)

It must be. Somehow, someone must've learnt it, because that's what the thing is complaining about.


Nathan

  • Mighty Duke
  • ****
  • Posts: 713
    • View Profile
Re: Delete spell error
« Reply #9: October 25, 2011, 12:45:35 AM »
Somehow, someone must've learnt it, because that's what the thing is complaining about.

I thought that was impossible if the spell hadn't been approved yet?

Are you able to check if a certain spell has been learned by anyone?

Tom

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: Delete spell error
« Reply #10: October 26, 2011, 11:54:20 AM »
yeah, I can do that. But for consistency, I should really update the code so that it removes the spell from characters as well - it might be an admin deleting the spell, after all.