Could not delete the [modname] with id = 84 from section 13

Could not delete the [modname] with id = 84 from section 13

by Mikko Rantanen -
Number of replies: 3
I tend to get this error:

Could not delete the [modname] with id = 84 from section 13

I'm making a mod and when I delete the whole module from Moodle I get this error message, sometimes more than just this one with different ids and section numbers. Tried to find out the reason why I get this but I didn't found it yet. If you have any idea why this happens please tell me.

I have had many intances of this module and only few of them lead to this error when tryind to delete the whole module from moodle.

EDIT: I investigated this bit more and noticed that all information from my module databases is deleted correctly. So I wonder why I get this error if rows from db are anyway deleted.
Average of ratings: -
In reply to Mikko Rantanen

Re: Could not delete the [modname] with id = 84 from section 13

by Mikko Rantanen -
And this really doesn't happen everytime so it confuses me and I don't know where to search for the solution.
In reply to Mikko Rantanen

Re: Could not delete the [modname] with id = 84 from section 13

by Mikko Rantanen -
I haven't figured this out yet but coming closer.

If I delete some instance of my mod it causes this error. If none of instances are deleted before deleting whole mod I get no error messages at all.

So for some reason Moodle tries to delete those instances also which are in fact already deleted. What am I doing wrong or in which file this error located most likely? lib.php?
In reply to Mikko Rantanen

Re: Could not delete the [modname] with id = 84 from section 13

by Mikko Rantanen -
Nah, What a waste of time.. Finally I decided to test this with one other module and same there. So it happens with all modules and I've fought two days with it.

Btw. Is this how it was intended?