Opened 8 years ago

Closed 7 years ago

# "XYZ|ABC|" is not a valid value for the <fieldname> field

Reported by: Owned by: jjk CM Lubinski highest MultiSelectCustomFieldsPatch blocker 0.11

### Description

We applied the patch in our Trac-0.11.5 version and the multi-select appears, but when we try to select one or more options and klick preview or create ticket we get this error:

Warning:  "Admin|Server|" is not a valid value for the anwendung field.


The field anwendung is defined in the trac.ini as follows:

anwendung = multi
anwendung.label = Anwendung


### comment:1 Changed 8 years ago by CM Lubinski

Status: new → assigned

I downloaded a fresh copy of 0.11.5 and applied the patch and set up a custom field matching your configuration. I was able to save new tickets with multiple selections for the Anwendung field. Are you sure you applied the changes to trac/ticket/web_ui.py? Please try applying the patch manually since it was made for the 0.11.6 branch, so a few of the line numbers are different than in 0.11.5. Are there other patches that you have applied? Perhaps one is conflicting.

### comment:2 Changed 8 years ago by anonymous

Thanks for your effort cmc, i will try it with a clean version and apply all changes by hand. There were errors while patching and i changed the files manually where the patch command didn't change anything. but, and thats the spooky part, the code in web_ui.py is definitely like in the patch, but it seems that the old code is executed. Even after several restarts of the apache the code isn't used. I have put some logging to the code in the web_ui.py and even this logging code isn't executed.

### comment:3 Changed 8 years ago by jjk

So, i tried to apply all of the codechanges by hand and i got the same error again.

Perhaps the python interpreter doesn't use the new version of the code? Could i force a refresh? I don't think its a matter of the code itself. For example, i changed the code in the web_ui.py from

add_warning(req, '"%s" is not a valid value for '
'the %s field.' % (value, name))


to

add_warning(req, '"%s" is not a valid value for '
'the damn %s field.' % (value, name))



and the old version of the message appears, even after restarting the hole server. So i think we got another problem here.

### comment:4 Changed 8 years ago by jjk

After some log-file searching, i found an error message:

2010-06-15 09:59:37,655 Trac[main] ERROR: Exception caught while post-processing request:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/site-packages/Trac-0.11.5-py2.6.egg/trac/web/main.py", line 238, in dispatch
self._post_process_request(req)
File "/usr/local/lib/python2.6/site-packages/Trac-0.11.5-py2.6.egg/trac/web/main.py", line 310, in _post_process_request
f.post_process_request(req, *(None,)*extra_arg_count)
File "build/bdist.linux-x86_64/egg/flexjs/flexjs.py", line 23, in post_process_request
js = req.hdf.get('chrome.scripts.%i.href' % idx)
File "/usr/local/lib/python2.6/site-packages/Trac-0.11.5-py2.6.egg/trac/web/clearsilver.py", line 161, in get
value = self.hdf.getValue(str(name), '<<NONE>>')
AttributeError: 'NoneType' object has no attribute 'getValue'
2010-06-15 09:59:37,655 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/site-packages/Trac-0.11.5-py2.6.egg/trac/web/main.py", line 444, in _dispatch_request
dispatcher.dispatch(req)
File "/usr/local/lib/python2.6/site-packages/Trac-0.11.5-py2.6.egg/trac/web/main.py", line 205, in dispatch
resp = chosen_handler.process_request(req)
File "build/bdist.linux-x86_64/egg/tracrpc/web_ui.py", line 58, in process_request
File "/usr/lib64/python2.6/xmlrpclib.py", line 1183, in loads
p.close()
File "/usr/lib64/python2.6/xmlrpclib.py", line 604, in close
self._parser.Parse("", 1) # end of data
ExpatError: no element found: line 1, column 0


Could that be a reason why not the actual files are used? The files at /usr/local/lib/python2.6/site-packages/Trac-0.11.5-py2.6.egg/trac/ are these where i applied your patch, but they are not used.

On the otherhand, i had to change something in /usr/local/lib/python2.6/site-packages/Trac-0.11.5-py2.6.egg/trac/ticket/notification.py and these changes works as intended.

regards Jens

### comment:5 Changed 7 years ago by CM Lubinski

Resolution: → invalid assigned → closed

This is a trac installation issue, not a result of the plugin.

### Modify Ticket

Change Properties