Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12258 closed defect (fixed)

Ticket can't be submitted when I use validation rules

Reported by: gvirdis@… Owned by: Ryan J Ollos
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description (last modified by Ryan J Ollos)

This is my custom fields configuration in a freshly installed TRAC:

[ticket-custom]
sspp = text
sspp.format = plain
sspp.label = sspp
sspp.order = 1
sspp.value =
sspp.show_when_type = task
sspp.invalid_if =

Plugin installed from latest trunk. If the field named sssp is void, trac correctly shows a popup window with the error. After i close the popup clicking on OK I put some value in the field, but I can't submit the ticket until I refresh the page (obviously filling the field). Seems that after the error popup, both PREVIEW and SUBMIT buttons are disabled.

My system informations:

Informazioni di sistema
Pacchetto	Versione
Trac 	1.0.5
Babel 	0.9.6
Genshi 	0.7 (without speedups)
mod_python 	3.3.1
pysqlite 	2.4.1
Python 	2.6.6 (r266:84292, Nov 21 2013, 10:50:32) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
pytz 	2010h
setuptools 	0.6
SQLite 	3.6.20
jQuery	1.7.2
jQuery UI	1.8.21
jQuery Timepicker	1.0.1
Moduli aggiuntivi installati
Nome	Versione	Posizione
BlackMagicTicketTweaks 	0.12.2 	/usr/lib/python2.6/site-packages/BlackMagicTicketTweaks-0.12.2-py2.6.egg
IniAdmin 	0.3 	/usr/lib/python2.6/site-packages/IniAdmin-0.3-py2.6.egg
TracCustomFieldAdmin 	0.2.10 	/usr/lib/python2.6/site-packages/TracCustomFieldAdmin-0.2.10-py2.6.egg
TracDynamicFields 	2.2.0dev 	/var/www/trac/gestconf_richieste1/plugins/TracDynamicFields-2.2.0dev-py2.6.egg
TracHideChanges 	1.0.0 	/usr/lib/python2.6/site-packages/TracHideChanges-1.0.0-py2.6.egg
TracTicketTemplate 	0.9dev 	/usr/lib/python2.6/site-packages/TracTicketTemplate-0.9dev-py2.6.egg
TracTicketValidator 	0.1 	/usr/lib/python2.6/site-packages/TracTicketValidator-0.1-py2.6.egg
TracWysiwyg 	0.12.0.5 	/usr/lib/python2.6/site-packages/TracWysiwyg-0.12.0.5-py2.6.egg

Attachments (0)

Change History (8)

comment:1 Changed 9 years ago by Ryan J Ollos

Description: modified (diff)
Owner: changed from Rob Guttman to Ryan J Ollos
Status: newassigned

comment:2 Changed 9 years ago by Ryan J Ollos

Most likely there is a conflict with another plugin. Please try the following:

  • Disable other plugins one by one until the issue is resolved, or until they are all disabled. If I had to guess, TracTicketTemplatePlugin is most likely the problem. If disabling a plugin resolves the issue, please let me know which plugin.
  • While reproducing the issue, look in the browser console for JavaScript errors. Are you familiar with using Developer Tools in Chrome, or similar tools in another browser?
Last edited 9 years ago by Ryan J Ollos (previous) (diff)

comment:3 Changed 9 years ago by anonymous

Thanks very much for your help.

Disabled all plugins (was active only TracCustomFieldAdmin), but the issue still remains. This is my [components] section in trac.ini

[components]
customfieldadmin.admin.customfieldadminpage = disabled
customfieldadmin.api.customfields = disabled

Enabled console in IE and Firefox: no error messages. Also enabled debug level trace in file trac.ini, and this is the result:

2015-04-07 09:59:40,979 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/newticket'">
2015-04-07 09:59:40,985 Trac[session] DEBUG: Retrieving session for ID u'l722400'
2015-04-07 09:59:40,988 Trac[main] DEBUG: Negotiated locale: None -> it
2015-04-07 09:59:40,999 Trac[api] WARNING: Unable to find repository '(default)' for synchronization
2015-04-07 09:59:41,005 Trac[chrome] DEBUG: Prepare chrome data for request
2015-04-07 09:59:41,204 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/chrome/site/your_project_logo.png'">
2015-04-07 09:59:41,206 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/dynfields/dynfields.html'">
2015-04-07 09:59:41,212 Trac[chrome] WARNING: File your_project_logo.png not found in any of ['/var/www/trac/gestconf_richieste1/htdocs']
2015-04-07 09:59:41,215 Trac[session] DEBUG: Retrieving session for ID u'l722400'
2015-04-07 09:59:41,215 Trac[main] WARNING: [10.35.240.42] HTTPNotFound: 404 Not Found (File your_project_logo.png not found)
2015-04-07 09:59:41,223 Trac[session] DEBUG: Retrieving session for ID u'l722400'
2015-04-07 09:59:41,227 Trac[main] DEBUG: Negotiated locale: None -> it
2015-04-07 09:59:41,235 Trac[main] DEBUG: Negotiated locale: None -> it
2015-04-07 09:59:41,259 Trac[api] WARNING: Unable to find repository '(default)' for synchronization
2015-04-07 09:59:41,261 Trac[chrome] DEBUG: Prepare chrome data for request
2015-04-07 09:59:41,270 Trac[chrome] DEBUG: Prepare chrome data for request
2015-04-07 09:59:50,374 Trac[main] DEBUG: Dispatching <RequestWithSession "POST '/newticket'">
2015-04-07 09:59:50,379 Trac[session] DEBUG: Retrieving session for ID u'l722400'
2015-04-07 09:59:50,382 Trac[main] DEBUG: Negotiated locale: None -> it
2015-04-07 09:59:50,392 Trac[api] WARNING: Unable to find repository '(default)' for synchronization
2015-04-07 09:59:50,396 Trac[chrome] DEBUG: Prepare chrome data for request
2015-04-07 10:00:34,834 Trac[main] DEBUG: Dispatching <RequestWithSession "POST '/newticket'">
2015-04-07 10:00:34,841 Trac[session] DEBUG: Retrieving session for ID u'l722400'
2015-04-07 10:00:34,844 Trac[main] DEBUG: Negotiated locale: None -> it
2015-04-07 10:00:34,854 Trac[api] WARNING: Unable to find repository '(default)' for synchronization
2015-04-07 10:00:34,858 Trac[chrome] DEBUG: Prepare chrome data for request
2015-04-07 10:00:43,676 Trac[main] DEBUG: Dispatching <RequestWithSession "POST '/newticket'">
2015-04-07 10:00:43,680 Trac[session] DEBUG: Retrieving session for ID u'l722400'
2015-04-07 10:00:43,683 Trac[main] DEBUG: Negotiated locale: None -> it
2015-04-07 10:00:43,692 Trac[api] WARNING: Unable to find repository '(default)' for synchronization
2015-04-07 10:00:43,698 Trac[chrome] DEBUG: Prepare chrome data for request

Another strange issue: after the "Empty field" popup,i'm not able to save the ticket, but also the error message about the void summary (if summary is empty) is not shown.

Last edited 9 years ago by Jun Omae (previous) (diff)

comment:4 Changed 9 years ago by Ryan J Ollos

Reproduced. This is due to behavior added in trac:#10138, which prevents multiple submissions of the form.

comment:5 Changed 9 years ago by Ryan J Ollos

In 14516:

2.2.0dev: Allow form resubmission in Trac >= 1.0.2.

Multiple form submission is disallowed in Trac 1.0.2 by the presence of the trac-submit-is-disabled class. The class is removed by DynamicFieldsPlugin in the form validation submit event handler when preventing submission of the form, so that form submission is possible after correcting the validation error. Refs #12258.

comment:6 Changed 9 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

Please report back if the latest version fixes the issue for you.

comment:7 Changed 9 years ago by Ryan J Ollos

#12162 closed as a duplicate.

comment:8 Changed 9 years ago by anonymous

Issue seems to be fixed. Further testing in progress. Thank you very much!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.