icaruseu / mom-ca

Monasterium.net (http://www.monasterium.net/mom) - repository and collaborative archive
https://github.com/icaruseu/mom-ca/wiki
GNU General Public License v3.0
17 stars 11 forks source link

User action "delete saved-charter" with incomplete results #250

Open GVogeler opened 9 years ago

GVogeler commented 9 years ago

Martin Roland reports to have delete http://monasterium.net/mom/AT-WStLA/HAUrk/6015/charter from his "saved charters"-list and received an OK response but the charter was still shown to be in use by him. In the database there was no copy of the charter in /db/mom-data/metadata.charter.saved but it was still referenced in the xrx:saved-list in his user-xml. Happened anywhere else? Can we check that the process is really completed before sending an "OK"-response?

StephanMa commented 9 years ago

Currently i have analyzed the Issue mentioned by Atonella via EMail.

There are arount 9 user-charters which are already deleted. But the entries inside the individual User.xml are still present and was set to <xrx:freigabe>yes</xrx:freigabe>

We have to ensure that deleting a charter automatically erases all recursive dependencies or links.

For this, we have to build a database-trigger which fires when a charter is created, edited or deleted. So we don't have to work on different Modules, Widgets, etc.

It should definitely be raised to the highest priority as task after the MOMathon in November.

StephanMa commented 9 years ago

As additional Info: My "suspect" for the Errors is the upd.xqm (https://github.com/icaruseu/mom-ca/blob/master/my/XRX/src/core/app/xrx/upd.xqm#L1) module. It should be there for manipulating in-memory-Documents. But... why is it used? eg: If a charter is removed, the userfile is edited and the <xrx:saved>-Entry for the individual charter is removed. Currenty it will be done by upd:delete($node).

It can be done by "update delete $node from $userfile" directly.

In the MOMathon-App, i had a lot of trouble using upd:insert. So i decided not to use this.

StephanMa commented 5 years ago

Occurs again, addressed via Mail.