Menu

#173 Bug when importing from invalid tag

closed-fixed
3
2012-10-30
2010-08-21
No

When using the Import content feature from a publication display, if an invalid tag string is specified for the source, a python error results instead of a well-formed error message. In the case where this was discovered, the incorrect string was in fact an author's name and included a space, whcih may be relevant. The resulting display was:

<type 'exceptions.TypeError'> Python 2.5: /usr/bin/python Sat Aug 21 00:30:38 2010

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

/var/www/cgi-bin/edit/clonecontent.cgi in ()
170 except:
171 publication = SQLGetPubByTag(FromTag)
172 clone_from = publication[PUB_PUBID]
173
174 if form.has_key('IncludePages'):

clone_from undefined, publication = 0, PUB_PUBID = 0

<type 'exceptions.TypeError'>: 'int' object is unsubscriptable

A message like "Invalid source tag or record #" would be an improvement.

Discussion

  • David E. Siegel

    David E. Siegel - 2010-08-21
    • priority: 5 --> 3
     
  • Uzume

    Uzume - 2011-03-04

    I hope to remove pub_tag usage but that said an illegal pub_tag is likely an invalid pub_id as well and this should be handled properly. I already have outstanding check-ins that undocument the ability to use an pub_tag for cloning content (both import and export). I also removed this from the wiki help.

     
  • Ahasuerus

    Ahasuerus - 2012-10-30
    • assigned_to: nobody --> ahasuerus_isfdb
    • status: open --> closed-fixed
     
  • Ahasuerus

    Ahasuerus - 2012-10-30

    Fixed in edit/clonecontent.py 1.12. Installed in r2012-39 on 2012-10-30.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB