DCLP / dclpxsltbox

Sandbox for development, testing, and review of XSLT for DCLP
http://dclp.github.io/dclpxsltbox/
1 stars 5 forks source link

Problem with saving comments #274

Closed rla2118 closed 6 years ago

rla2118 commented 7 years ago

On voting, submitting and finalization, contents of comment text are saved multiple times.

For an example, see http://litpap.info/editor/publications/563

 Finalized - The text was entered by participants of Dr. Julia Lougovaya’s Webinar on Greek Literary Ostraka, which was offered as part of Heidelberg’s "Webinars in Specialized Disciplines” initiative, sponsored by MWK-Baden Wuerttemberg.
http://papyri.info/users/RodneyAst
Tue May 30, 2017 11:43:39
From DCLP Meta 61352 DCLP Meta XML
Finalized - The text was entered by participants of Dr. Julia Lougovaya’s Webinar on Greek Literary Ostraka, which was offered as part of Heidelberg’s "Webinars in Specialized Disciplines” initiative, sponsored by MWK-Baden Wuerttemberg.
http://papyri.info/users/RodneyAst
Tue May 30, 2017 11:43:38
From DCLP Text 61352 DCLP Text XML
Finalized - The text was entered by participants of Dr. Julia Lougovaya’s Webinar on Greek Literary Ostraka, which was offered as part of Heidelberg’s "Webinars in Specialized Disciplines” initiative, sponsored by MWK-Baden Wuerttemberg.
http://papyri.info/users/RodneyAst
Tue May 30, 2017 11:43:38
From DCLP Meta 61352 DCLP Meta XML
Finalized - The text was entered by participants of Dr. Julia Lougovaya’s Webinar on Greek Literary Ostraka, which was offered as part of Heidelberg’s "Webinars in Specialized Disciplines” initiative, sponsored by MWK-Baden Wuerttemberg.

We need this comment only once.

Edelweiss commented 6 years ago

https://github.com/DCLP/sosol/commit/2479e8ddd6088fb2bc04adbe37f1c9bbe506e1e6

Edelweiss commented 6 years ago

It seems there are two problems, both owing to DCLP identifiers always appearing as a pair of twins. Alongside a DCLPTextIdentifier, there is always a DCLPMetaIdentifier and the other way around. You cannot have one without the other. So when a comment is saved, it’s actually saved twice (once for the text and once for the meta), and when a comment is displayed, it’s displayed twice (again text and meta)… So eventually we end up seeing each and every comment four times (two saved instances multiplied by being displayed two times).

Edelweiss commented 6 years ago

This may have infected some of the DCLP files that are in the repository. So this issue also concerns our EpiDoc xml files.

Edelweiss commented 6 years ago

There are almost 100 such files:

130499 131510 139884 140273 140275 140276 140278 140279 140280 140283 140284 140285 140287 140288 140289 140291 140292 140551 145040 171880 171881 171882 171902 171903 171906 171907 171908 175278 175280 175282 217929 220489 220491 220492 220493 220495 372062 397915 59051 59130 59137 59270 59332 59436 59440 59492 59778 59912 59920 59946 60023 60144 60180 60220 60412 60456 60497 60822 61110 61222 61311 61329 61352 61367 61394 61489 61490 61491 61492 61512 62334 62416 62575 62676 62680 62798 62952 63357 63398 63417 63418 63633 63771 63799 63805 63866 63868 63869 63870 64037 64568 64874 65429 65597 65740 68622 75082

Edelweiss commented 6 years ago

Beware: Changes not made by the system (consider timestamp)

https://github.com/DCLP/idp.data/blame/master/DCLP/60/59436.xml

Edelweiss commented 6 years ago

https://github.com/DCLP/idp.data/commits/issue274

also in development and master

Edelweiss commented 6 years ago

https://github.com/DCLP/sosol/commit/6a85a957433038b2ab03e0c969e8c2dce0962c21

Edelweiss commented 6 years ago

Can now be tested on

http://dclp-test.zaw.uni-heidelberg.de

(old copies in board repositories have not been re-processed, though, their counterparts in idp.data, however, have been fixed)

jcowey commented 6 years ago

Appears to be fine. Tested on a couple of files. Vote messages were not repeated.