isawnyu / pleiades-gazetteer

This repository provides a home for tickets and other planning documents for the Pleiades gazetteer of ancient places. Code is kept in multiple other repositories.
https://pleiades.stoa.org
11 stars 0 forks source link

Pleiades Entity reference validator throwing IndexError #184

Closed paregorios closed 8 years ago

paregorios commented 8 years ago

@serviliusahala (a user with Contributor, Editor, Member, Reader, Reviewer roles) reported the following problem when trying to edit a particular drafting-state place: the Curia Iulia. He was able to create a working copy of it, but the working copy throws the same error. This problem does not occur for a user with the Manager role.

The user sees the usual "We’re sorry, but there seems to be an error…" message, with an error log number (in this case it was reported as 1468114654.020.824559411063. I ran this down to the instance2.log file, where the following traceback tells us the code failed in the Pleiades Entity reference validator, so I assume we have a busted reference on this content item. But I can't figure out which one it is.

------
2016-07-09T21:37:34 ERROR Zope.SiteErrorLog 1468114654.020.824559411063 http://pleiades.stoa.org/places/837078212/base_edit
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.CMFFormController.FSControllerPageTemplate, line 91, in __call__
  Module Products.CMFFormController.BaseControllerPageTemplate, line 26, in _call
  Module Products.CMFFormController.FormController, line 384, in validate
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.CMFFormController.FSControllerValidator, line 58, in __call__
  Module Products.CMFFormController.Script, line 145, in __call__
  Module Products.CMFCore.FSPythonScript, line 127, in __call__
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 344, in _exec
  Module script, line 6, in validate_base
   - <FSControllerValidator at /plone/places/837078212/validate_base>
   - Line 6
  Module Products.Archetypes.BaseObject, line 509, in validate
  Module Products.Archetypes.Schema, line 606, in validate
  Module Products.Archetypes.Field, line 345, in validate
  Module Products.Archetypes.Field, line 358, in validate_validators
  Module Products.validation.chain, line 136, in __call__
  Module Products.CompoundField.validators, line 65, in __call__
  Module Products.Archetypes.Field, line 345, in validate
  Module Products.Archetypes.Field, line 358, in validate_validators
  Module Products.validation.chain, line 136, in __call__
  Module Products.PleiadesEntity.content.Work, line 38, in __call__
IndexError: list index out of range
------

cc also @rmhorne, who was part of the discussion about this one in email.

davisagli commented 8 years ago

It's not immediately obvious what's going on here. @serviliusahala is there a particular change you were trying to make when you encountered the error?

serviliusahala commented 8 years ago

David:

I was unable to edit the item in any way, even after checking out a working copy. Attempts to edit on the references tab, description, details all resulted in error messages. The trigger for throwing the error was attempting to save edits once made.

thanks,

Jeffrey Becker

Jeffrey A. Becker, Ph.D. RPA jeffrey.becker@gmail.com; 617-877-4484 Twitter: @servilius_ahala https://twitter.com/servilius_ahala

On Thu, Jul 14, 2016 at 12:03 AM, David Glick notifications@github.com wrote:

It's not immediately obvious what's going on here. @serviliusahala https://github.com/serviliusahala is there a particular change you were trying to make when you encountered the error?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/isawnyu/pleiades-gazetteer/issues/184#issuecomment-232551347, or mute the thread https://github.com/notifications/unsubscribe/ADUQfYowFMvUz4-HgXZDGtL0XTYFm-8gks5qVbUXgaJpZM4JJ41O .

davisagli commented 8 years ago

@serviliusahala Hi Jeffrey, I've tried to reproduce the problem on our staging copy of the site without success. Would you be willing to do what you were doing again in hopes that I can glean some more debugging information? There is some info (details about what values were submitted in the form) that is only available for a short time. thanks, David

serviliusahala commented 8 years ago

David:

Yes, I can try to do that and see what happens. However, any action I attempt in Pleiades this morning produces an error, so I am guessing the site is having troubles.

thank you,

Jeffrey Becker

Jeffrey A. Becker, Ph.D. RPA jeffrey.becker@gmail.com; 617-877-4484 Twitter: @servilius_ahala https://twitter.com/servilius_ahala

On Thu, Jul 14, 2016 at 12:44 AM, David Glick notifications@github.com wrote:

@serviliusahala https://github.com/serviliusahala Hi Jeffrey, I've tried to reproduce the problem on our staging copy of the site without success. Would you be willing to do what you were doing again in hopes that I can glean some more debugging information? There is some info (details about what values were submitted in the form) that is only available for a short time. thanks, David

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/isawnyu/pleiades-gazetteer/issues/184#issuecomment-232555383, or mute the thread https://github.com/notifications/unsubscribe/ADUQfetA_R8UPVMe0paXWhlzJ2MqgXt_ks5qVb7BgaJpZM4JJ41O .

davisagli commented 8 years ago

@serviliusahala Sorry, that's my fault as I made a mistake while deploying a different fix. It's functioning again now.

serviliusahala commented 8 years ago

David:

OK, I am reporting back about this place resource about which we have been corresponding: http://pleiades.stoa.org/places/copy_of_837078212

I was able to edit the working copy and save the changes, even to add two new name resources, without generating an error. However, when I tried to modify one of the pre-existing references in the checked-out copy and then save, the error below resulted:

We’re sorry, but there seems to be an error…

The error has been logged as entry number 1468516031.990.802516120103.

Jeffrey A. Becker, Ph.D. RPA jeffrey.becker@gmail.com; 617-877-4484 Twitter: @servilius_ahala https://twitter.com/servilius_ahala

On Thu, Jul 14, 2016 at 11:27 AM, David Glick notifications@github.com wrote:

@serviliusahala https://github.com/serviliusahala Sorry, that's my fault as I made a mistake while deploying a different fix. It's functioning again now.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/isawnyu/pleiades-gazetteer/issues/184#issuecomment-232699247, or mute the thread https://github.com/notifications/unsubscribe/ADUQfcoPVj-0_WSbkHoMa-cXyof-33mkks5qVlVMgaJpZM4JJ41O .

davisagli commented 8 years ago

Thanks, Jeffrey.

For my own reference, the traceback for the new error is the same as the one Tom posted above, and the request values are:


description_text_format 'text/plain'
referenceCitations|referenceCitations:014|type  'seeFurther'
referenceCitations|referenceCitations:009|range 'New Pauly, Curia [2]'
contributors    ['jbecker']
subject_keywords    []
referenceCitations|referenceCitations:005|type  'citesAsDataSource'
referenceCitations|referenceCitations:009|identifier    'http://www.encquran.brill.nl/entries/brill-s-new-pauly/curia-e12220940'
referenceCitations|referenceCitations:015|identifier    'http://www.worldcat.org/oclc/39008887'
referenceCitations|referenceCitations:004|range 'Boatwright, Mary T., Daniel J. Gargola, Lenski Noel, and Talbert Richard J.A. The Romans: From Village to Empire. 2nd. New York, NY: Oxford University Press Inc, 2012. Print.'
text_text_format    'text/html'
referenceCitations|referenceCitations:007|range 'Platner and Ashby 1929 (Perseus), CURIA IULIA'
referenceCitations|referenceCitations:013|identifier    'http://atlantides.org/bibliography/'
referenceCitations|referenceCitations:015|range 'Carafa, P. 1998. Il comizio di Roma dalle origini all\'eta\xcc\x80 di Augusto. Rome: "L\'Erma" di Bretschneider.'
referenceCitations|referenceCitations:002|identifier    'http://site.ebrary.com/lib/uncch/reader.action?docID=10784793'
_authenticator  'ebce9b5450ed548f2378b86c58550cfa3139489b'
referenceCitations|referenceCitations:004|identifier    ''
referenceCitations|referenceCitations:004|type  'citesAsDataSource'
referenceCitations|referenceCitations:010|type  'citesAsEvidence'
id  'copy_of_837078212'
fieldsets   ['default', 'References', 'categorization', 'creators', 'Details']
referenceCitations|referenceCitations:011|type  'seeFurther'
referenceCitations|referenceCitations:005|range '"Curia." Rome. Accessed July 26, 2015.'
referenceCitations|referenceCitations:002|range 'Quenemoen, Caroline K., and Ulrich, Roger B., eds. Blackwell Companions to the Ancient World : Companion to Roman Architecture. Oxford, GBR: John Wiley & Sons, 2013. ProQuest ebrary. Web. 26 July 2015.'
add_reference   {'destination': '', 'field': '', 'type': ''}
referenceCitations|referenceCitations:010|identifier    'http://latin.packhum.org/loc/1221/7/0/20443-20459,21021-21033'
last_referer    'http://pleiades.stoa.org/places/copy_of_837078212'
referenceCitations|referenceCitations:005|identifier    'http://www.aviewoncities.com/rome/curia.htm.'
title   'Curia Iulia'
referenceCitations|referenceCitations:012|range 'CIL vi. 877a (=32324)'
referenceCitations|referenceCitations:009|type  'seeFurther'
referenceCitations|referenceCitations:006|type  'citesAsDataSource'
location    '41.892778N 12.485278E'
text    '<p>\xc2\xa0</p>\r\n<p dir="ltr" style="text-indent: 36pt; ">The Curia Julia is the senate house that was commissioned by Julius Caesar. The senate house prior to this one was the Curia Hostilia. This old senate house was supposedly built by King Tilius Hostilius and is believed to have dated back to the early fourth century BCE.[1] The building needed repairs from fire after some of the furniture was used for the funeral pyre of Publius Clodius Pulcher in 52 BCE.[1] The senate commissioned Faustus, the son of Sulla, to rebuild the building, which he did.[2][4] However, when Julius Caesar came into power, he wanted to rebuild the senate house as part of his Forum Iulium. It is possible that Caesar was trying to rival Pompey who had recently built a theatre.[3] The senate building however was not completed before his death. His adopted son Octavian, who would later became the emperor Augustus, took on the initiative to finish the senate house begun by Caesar. The house was finished in 29 BCE.[1][4] The Curia Julia stayed relatively the same and served its purpose as a meetinghouse until 283 CE. There was a fire which damaged the building thus requiring repair.[4][5] Diocletian repaired the house in 303, and it is the one that still stands today.[2] In 630 CE the senate house was converted to a Christian church.[2] Pope Honorius I renamed it the Church of St. Adriano.[2] It is this conversion to a church which has allowed for the building to be so well preserved. Instead of being destroyed like other pagan symbols, it was protected.</p>\r\n<p dir="ltr" style="text-indent: 36pt; ">\xc2\xa0</p>\r\n<p dir="ltr" style="text-indent: 36pt; ">The exterior of the Curia Julia featured brick-faced concrete with a huge buttress at each angle.[6] \xc2\xa0The lower part of the front wall was decorated with slabs of marble.[6] \xc2\xa0The upper part was covered with stucco imitation of white marble blocks.[6] \xc2\xa0A single flight of stairs lead up to the bronze doors.[6] \xc2\xa0The current bronze doors are modern replicas because the original bronze doors were transferred to the Basilica of St. John Lateran by Pope Alexander III in 1660.[6] \xc2\xa0There was a small stoa, the Chalcidium, in front of the Curia that housed a statue of the goddess Minerva.[7] \xc2\xa0\xc2\xa0A winged Victoria was on the crest of the rooftop.[7] \xc2\xa0Both Minerva and Victoria represented the wisdom of the senators and the power of the empire.[7] \xc2\xa0In the assembly hall, there was seating for about three hundred senators, which was only half the senate at that time.[7] \xc2\xa0Originally the walls of the room were decorated with colored marble, mosaics and stucco work, and the wooden roof was gilded.[7] \xc2\xa0In the back of the hall, there were seats for the consuls and the emperor.[7] \xc2\xa0There was a depiction of Victoria that appeared to be descending upon the emperor.[7]</p>\r\n<p dir="ltr" style="text-indent: 36pt; ">\xc2\xa0</p>\r\n<blockquote>\r\n<p dir="ltr">The Senate House played an important function in Roman government and the religious aspects of Roman Society can be seen in its use. In its first iteration as the Curia Hostilia, built at the end of the fifth century, BCE, it served as a meeting place for the original senate, the council of elders.[1] It was bordered by two temples, one to Saturn and the other to Castor and Pollux.[5] By the third century, the Curia Hostilia itself was dedicated to the gods. The dedication of the place of assembly was required for the senate to meet there.[5] As the senate grew, it became necessary to enlarge the senate house to accommodate its numbers.[2] It was also required that the people would be able to hear senatorial meetings, but non-senators were not allowed in the building itself, so it needed to be near an open area. Thus the Senate house\xe2\x80\x99s placement near the Forum was imperative.[5] When the Curia Hostilia was burned down for Pulcher\xe2\x80\x99s funeral pyre, Julius Caesar chose a slightly different placement for his Curia Julia, which was to overlook two forums: the Roman Forum, and the Forum Iulium, which hadn\xe2\x80\x99t been built yet.[1] The gifting of a large and beautifully appointed building can be seen as a token nod to the prestige of the senate, indicating that they still had some power even after the republic.[4] As Pontifex Maximus, Augustus was able to dedicate the building to the gods himself after construction was complete.[5] Thus even the meeting place of the senate was beholden to the powers of the principate, though not overtly.[4]</p>\r\n</blockquote>'
referenceCitations|referenceCitations:007|identifier    'http://www.perseus.tufts.edu/hopper/text?doc=Perseus%3Atext%3A1999.04.0054%3Aalphabetic+letter%3DC%3Aentry+group%3D3%3Aentry%3Dcuria-iulia'
initialProvenance   'Pleiades'
referenceCitations|referenceCitations:003|range 'Aicher, Peter J. Rome Alive: A Source-Guide to the Ancient City Volume 1. Bolchazy-Carducci Publishers, 2014. Web. 23 July 2015.'
referenceCitations|referenceCitations:008|range 'Wikipedia, Curia Julia'
referenceCitations|referenceCitations:007|type  'seeFurther'
fieldset    '#fieldset-references'
description 'The Curia Julia was built by Julius Caesar and completed by Augustus in 29 BCE. It replaced the former senate house, the Curia Hostilia.'
form.button.save    'Save'
referenceCitations|referenceCitations:013|range 'CIL vi. 1718'
referenceCitations|referenceCitations:006|identifier    'http://www.livius.org/ct-cz/curia/julia.html'
referenceCitations|referenceCitations:012|identifier    'http://atlantides.org/bibliography/'
referenceCitations|referenceCitations:008|type  'seeFurther'
rights_text_format  'text/plain'
referenceCitations|referenceCitations:014|range 'CIL vi. 32326'
referenceCitations|referenceCitations:012|type  'seeFurther'
referenceCitations|referenceCitations:006|range 'Lendering, Jona. "Curia Julia." Curia Julia. Accessed July 26, 2015. '
referenceCitations|referenceCitations:011|identifier    'http://atlantides.org/bibliography/'
form.submitted  '1'
referenceCitations|referenceCitations:008|identifier    'https://en.wikipedia.org/wiki/Curia_Julia'
text_file   <ZPublisher.HTTPRequest.FileUpload instance at 0x7f8306bf5908>
referenceCitations|referenceCitations:002|type  'citesAsDataSource'
referenceCitations|size '14'
referenceCitations|referenceCitations:011|range 'Cass. Dio 44.5'
referenceCitations|referenceCitations:003|identifier    'https://books.google.com/books?id=t6m9g5G8Z1YC&printsec=frontcover&source=gbs_ViewAPI#v=onepage&q&f=false'
language    'en'
referenceCitations|referenceCitations:013|type  'seeFurther'
rights  'Copyright &#169; The Contributors. Sharing and remixing permitted under terms of the Creative Commons Attribution 3.0 License (cc-by).'
subject_existing_keywords   ['extant remains', '']
referenceCitations|referenceCitations:003|type  'citesAsDataSource'
placeType   ['architecturalcomplex', '']
cmfeditions_version_comment ''
referenceCitations|referenceCitations:015|type  'seeAlso'
referenceCitations|referenceCitations:014|identifier    'http://atlantides.org/bibliography/'
creators    ['kpetrarca', 'lalderson', 'mcooper']
referenceCitations|referenceCitations:010|range 'Aug. RG 6.18, 6.26'
davisagli commented 8 years ago

@serviliusahala I found the problem and believe I've fixed it. Fields were not getting renumbered correctly when a reference was removed from anywhere other than the end of the list. Please feel free to give it another try now. (@paregorios, this is a bug dating from my work on the widget for story 37).

paregorios commented 8 years ago

@serviliusahala can you confirm that this is now working for you?

serviliusahala commented 8 years ago

This issue was successfully resolved for the reported place page ( http://pleiades.stoa.org/places/837078212). That page was successfully edited and published. I have not experienced a reoccurrence of that same error.

JAB

Jeffrey A. Becker, Ph.D. RPA jeffrey.becker@gmail.com; 617-877-4484 Twitter: @servilius_ahala https://twitter.com/servilius_ahala

On Tue, Jul 26, 2016 at 8:41 PM, Tom Elliott notifications@github.com wrote:

@serviliusahala https://github.com/serviliusahala can you confirm that this is now working for you?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/isawnyu/pleiades-gazetteer/issues/184#issuecomment-235448908, or mute the thread https://github.com/notifications/unsubscribe-auth/ADUQfW1mmz_npEGb1_8jTQBR3bIt2Ss2ks5qZqlMgaJpZM4JJ41O .

paregorios commented 8 years ago

Thanks @serviliusahala and @davisagli