Modify ↓
Opened 6 years ago
Closed 5 years ago
#13260 closed defect (fixed)
duplicated #warning elements when ticket validation reports errors
| Reported by: | Jun Omae | Owned by: | Jun Omae |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.4.2 |
| Component: | ticket system | Version: | 1.4 |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: |
Fixed duplicate |
||
Description
It seems that the issue occurs due to call of ${jmacros.warnings(chrome.warnings)} in ticket_box.html and/or ticket_change.html.
$ git grep '{jmacros.warnings(chrome.warnings\>'
trac/templates/theme.html: ${jmacros.warnings(chrome.warnings)}
trac/ticket/templates/ticket.html: ${jmacros.warnings(chrome.warnings, 'trac-preview-warning', close_message=False)}
trac/ticket/templates/ticket_box.html: ${jmacros.warnings(chrome.warnings)}
trac/ticket/templates/ticket_change.html:${jmacros.warnings(chrome.warnings)}
trac/ticket/templates/ticket_preview.html:${jmacros.warnings(chrome.warnings, 'trac-preview-warning', close_message=False)}
======================================================================
ERROR: runTest (trac.ticket.tests.functional.main.TestTicketMaxSummarySize)
Test `[ticket] max_summary_size` option.
----------------------------------------------------------------------
Traceback (most recent call last):
File "trac/ticket/tests/functional/main.py", line 85, in runTest
tc.submit('submit')
File "trac/tests/functional/better_twill.py", line 161, in better_submit
b.submit(fieldname, formname)
File "trac/tests/functional/better_twill.py", line 157, in better_browser_submit
old_submit(fieldname)
File "/venv/py27/local/lib/python2.7/site-packages/twill/browser.py", line 467, in submit
self._journey('open', request)
File "/venv/py27/local/lib/python2.7/site-packages/twill/browser.py", line 549, in _journey
callable(func_name, *args, **kwargs)
File "trac/tests/functional/better_twill.py", line 95, in _validate_html
(len(errors), url, '\n'.join(errors)))
AssertionError: tidylib found 1 error(s) in testenv/trac/log/TestTicketMaxSummarySize.html
line 396 column 5 - Warning: <div> anchor "warning" already defined
======================================================================
ERROR: runTest (trac.ticket.tests.functional.main.TestTicketNoSummary)
Creating a ticket without summary should fail
----------------------------------------------------------------------
Traceback (most recent call last):
File "trac/ticket/tests/functional/main.py", line 134, in runTest
tc.submit('submit')
File "trac/tests/functional/better_twill.py", line 161, in better_submit
b.submit(fieldname, formname)
File "trac/tests/functional/better_twill.py", line 157, in better_browser_submit
old_submit(fieldname)
File "/venv/py27/local/lib/python2.7/site-packages/twill/browser.py", line 467, in submit
self._journey('open', request)
File "/venv/py27/local/lib/python2.7/site-packages/twill/browser.py", line 549, in _journey
callable(func_name, *args, **kwargs)
File "trac/tests/functional/better_twill.py", line 95, in _validate_html
(len(errors), url, '\n'.join(errors)))
AssertionError: tidylib found 1 error(s) in testenv/trac/log/TestTicketNoSummary.html
line 396 column 5 - Warning: <div> anchor "warning" already defined
======================================================================
ERROR: runTest (trac.ticket.tests.functional.main.TestTicketManipulator)
----------------------------------------------------------------------
Traceback (most recent call last):
File "trac/ticket/tests/functional/main.py", line 177, in runTest
tc.submit('submit')
File "trac/tests/functional/better_twill.py", line 161, in better_submit
b.submit(fieldname, formname)
File "trac/tests/functional/better_twill.py", line 157, in better_browser_submit
old_submit(fieldname)
File "/venv/py27/local/lib/python2.7/site-packages/twill/browser.py", line 467, in submit
self._journey('open', request)
File "/venv/py27/local/lib/python2.7/site-packages/twill/browser.py", line 549, in _journey
callable(func_name, *args, **kwargs)
File "trac/tests/functional/better_twill.py", line 95, in _validate_html
(len(errors), url, '\n'.join(errors)))
AssertionError: tidylib found 1 error(s) in testenv/trac/log/TestTicketManipulator.html
line 400 column 5 - Warning: <div> anchor "warning" already defined
Attachments (0)
Change History (3)
comment:1 by , 6 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:3 by , 5 years ago
| Internal Changes: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
Duplicate id also occurs when editing ticket comment, as noted from grep output in comment:description.
Committed comment:1 change to 1.4-stable in r17345, merged to trunk in r17346.
Note:
See TracTickets
for help on using tickets.



The 3 failures would go away by the following patch. The changes specify
'trac-preview-warning'becausejmacros.warnings()is called when preview_mode is true.trac/ticket/templates/ticket_box.html
)}