Error when trying to duplicate questionnaire


#1

We are getting an error when trying to duplicate a Questionnaire using the “duplicate” button, and require assistance in resolving the issue. We are also unable to import an exported .json file from the questionnaire:

The browser displays the following error: Error! Internal server error (unexpected)

And the results of the log file:

2018-07-27 11:12:19+0200 [-] Starting factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x7f7975090510>, <twisted.internet.endpoints._WrapperEndpoint object at 0x7f79752d8b00>)
2018-07-27 11:12:22+0200 [-] Stopping factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x7f7975090510>, <twisted.internet.endpoints._WrapperEndpoint object at 0x7f79752d8b00>)
2018-07-27 11:35:43+0200 [-] [-] [1] 200 GET /public 134116B 134ms
2018-07-27 11:35:43+0200 [-] [-] [1] 200 GET /data/field_attrs.json 1310B 3ms
2018-07-27 11:35:43+0200 [-] [-] [1] 200 GET /admin/node 2031B 305ms
2018-07-27 11:35:43+0200 [-] [-] [1] 200 GET /admin/questionnaires 4040B 447ms
2018-07-27 11:35:43+0200 [-] [-] [1] 200 GET /admin/fieldtemplates 3319B 636ms
2018-07-27 11:49:11+0200 [-] [E] Unhandled exception raised:
2018-07-27 11:49:11+0200 [-] [E] KeyError Mapping key not found.\n\nTraceback (most recent call last):\n\n File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext\n result = inContext.theWork()\n\n File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>\n inContext.theWork = lambda: context.call(ctx, func, *args, **kw)\n\n File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext\n return self.currentContext().callWithContext(ctx, func, *args, **kw)\n\n File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext\n return func(*args,**kw)\n\n File "/usr/lib/python3/dist-packages/globaleaks/orm.py", line 110, in _wrap\n result = function(session, *args, **kwargs)\n\n File "/usr/lib/python3/dist-packages/globaleaks/handlers/admin/questionnaire.py", line 173, in duplicate_questionnaire\n fix_field_pass_2(field)\n\n File "/usr/lib/python3/dist-packages/globaleaks/handlers/admin/questionnaire.py", line 155, in fix_field_pass_2\n option['trigger_field'] = old_to_new_field_ids[option['trigger_field']]\n\nKeyError: ''\n
2018-07-27 11:49:11+0200 [-] [-] [1] 500 POST /admin/questionnaires/duplicate 99B 84ms


#2

Hi,

which version of GlobaLeaks are you using just now?

Could you open-up a ticket with the exact steps for reproducibility (including the .json that trigger the issue) on https://github.com/globaleaks/GlobaLeaks/issues/new ?

Please consider that’s a bit of a holiday time, so not all the team is fully active and it may take a couple of weeks till a technical analysis and fix is made up, so if you could make a good bug report, it would really facilitate it.


#3

Hi,

We are using a new install, of version 3.2.3.

I will create the ticket as you requested, with the required files added.


#4

This issue seems to have been resolved in the latest 3.2.5 update. Duplicating works fine now.