Opened 10 years ago
Closed 8 years ago
#12056 closed defect (fixed)
XHTML validation errors when running Trac functional test suite
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | TagsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
I'm seeing some errors for which I haven't yet sorted out the cause, but they seem to be attributable to TagsPlugin. The issue could be that Trac is not handling the TagsPlugin comment markup correctly though.
$ make test=trac/admin/tests/functional.py Python: /home/user/Workspace/t11944/py2.7/bin/python Version ------------------------------------------------------------------ Python : 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] Setuptools : 3.6 Genshi : 0.7 Babel : 0.9.6 sqlite3 : 2.6.0 PySqlite : not installed MySQLdb : not installed Psycopg2 : not installed SVN bindings : 1.8.8 (r1568071) Mercurial : not installed Pygments : 1.6 Pytz : 2014.4 ConfigObj : 5.0.5 Docutils : 0.12 Twill : 0.9 LXML : 3.4.0 figleaf: /home/user/Workspace/t11944/py2.7/bin/figleaf coverage: not installed Variables: PATH=::$PATH PYTHONPATH=.::$PYTHONPATH TRAC_TEST_DB_URI= server-options= -p 8000 -a '*,~/tracenvs/htdigest.realm,realm' -r ~/Workspace/t11944/tracdev External dependencies: Git version: git version 1.9.1 python trac/admin/tests/functional.py .............FF..... ====================================================================== FAIL: runTest (__main__.TestPluginSettings) Check plugin settings. ---------------------------------------------------------------------- Traceback (most recent call last): File "trac/admin/tests/functional.py", line 413, in runTest self._tester.go_to_admin("Plugins") File "/home/user/Workspace/t11944/teo-rjollos.git/trac/tests/functional/tester.py", line 171, in go_to_admin tc.follow(r"\b%s\b" % panel_label) File "/home/user/Workspace/t11944/py2.7/local/lib/python2.7/site-packages/twill-0.9-py2.7.egg/twill/commands.py", line 199, in follow browser.follow_link(link) File "/home/user/Workspace/t11944/py2.7/local/lib/python2.7/site-packages/twill-0.9-py2.7.egg/twill/browser.py", line 207, in follow_link self._journey('follow_link', link) File "/home/user/Workspace/t11944/py2.7/local/lib/python2.7/site-packages/twill-0.9-py2.7.egg/twill/browser.py", line 549, in _journey callable(func_name, *args, **kwargs) File "/home/user/Workspace/t11944/teo-rjollos.git/trac/tests/functional/better_twill.py", line 126, in _validate_xhtml _format_error_log(page, e.error_log)) TwillAssertionError: # Element dl is not declared in p list of possible children # URL: http://127.0.0.1:8629/admin/general/plugin # Line 3546, column 3 </dd><dt><code>[extra]</code></dt><dd>enable advanced features for specific use cases </dd></dl> Make sure to understand their purpose before deactivating <code>[main]</code> or activating <code>[extra]</code> components. </p> </div> </td> <td class="sel trac-component"> <input type="hidden" name="component" value="tractags.api.TagSystem" /> <input type="checkbox" name="enable" value="tractags.api.TagSystem" /> </td> ====================================================================== FAIL: runTest (__main__.TestPluginsAuthorization) Check permissions required to access Logging panel. ---------------------------------------------------------------------- Traceback (most recent call last): File "trac/admin/tests/functional.py", line 422, in runTest "Manage Plugins") File "trac/admin/tests/functional.py", line 45, in test_authorization tc.go(href) File "/home/user/Workspace/t11944/py2.7/local/lib/python2.7/site-packages/twill-0.9-py2.7.egg/twill/commands.py", line 112, in go browser.go(url) File "/home/user/Workspace/t11944/py2.7/local/lib/python2.7/site-packages/twill-0.9-py2.7.egg/twill/browser.py", line 113, in go self._journey('open', u) File "/home/user/Workspace/t11944/py2.7/local/lib/python2.7/site-packages/twill-0.9-py2.7.egg/twill/browser.py", line 549, in _journey callable(func_name, *args, **kwargs) File "/home/user/Workspace/t11944/teo-rjollos.git/trac/tests/functional/better_twill.py", line 126, in _validate_xhtml _format_error_log(page, e.error_log)) TwillAssertionError: # Element dl is not declared in p list of possible children # URL: http://127.0.0.1:8629/admin/general/plugin # Line 3546, column 3 </dd><dt><code>[extra]</code></dt><dd>enable advanced features for specific use cases </dd></dl> Make sure to understand their purpose before deactivating <code>[main]</code> or activating <code>[extra]</code> components. </p> </div> </td> <td class="sel trac-component"> <input type="hidden" name="component" value="tractags.api.TagSystem" /> <input type="checkbox" name="enable" value="tractags.api.TagSystem" /> </td> ---------------------------------------------------------------------- Ran 20 tests in 105.501s FAILED (failures=2) make: *** [all] Error 1
Attachments (0)
Change History (8)
comment:1 Changed 10 years ago by
Cc: | anonymous removed |
---|
comment:2 Changed 9 years ago by
Owner: | Steffen Hoffmann deleted |
---|
comment:3 Changed 9 years ago by
comment:4 Changed 8 years ago by
comment:5 Changed 8 years ago by
This seems to be associated with changes in r13865. It looks like a description list is being generated due to use of definition lists in formatting. The component description is wrapped in p
tags, and the error says that nesting a dl
within a p
is not allowed.
Immediate fix is to just fix the formatting of the component description. We might also want to make a change to Trac to use a div
rather than p
for the component description.
comment:6 Changed 8 years ago by
The HTML generated by Firefox and Chrome appears to be fine, no p
elements nested with the dl
.
<p> Available components are marked according to their relevance as follows: </p><dl class="wiki"><dt><tt>[main]</tt></dt><dd>provide core with a generic tagging engine as well as support for common realms 'ticket' (<a class="wiki" href="/proj-1.0/wiki/TracTickets">TracTickets</a>) and 'wiki' (<a class="wiki" href="/proj-1.0/wiki/TracWiki">TracWiki</a>). </dd><dt><tt>[opt]</tt></dt><dd>add more features to improve user experience and maintenance </dd><dt><tt>[extra]</tt></dt><dd>enable advanced features for specific use cases </dd></dl> Make sure to understand their purpose before deactivating <tt>[main]</tt> or activating <tt>[extra]</tt> components. <p></p>
I increased the number of lines printed for the case of an XMLSyntaxError
:
<p> Available components are marked according to their relevance as follows: <dl class="wiki"><dt><code>[main]</code></dt><dd>provide core with a generic tagging engine as well as support for common realms 'ticket' (<a class="wiki" href="/wiki/TracTickets">TracTickets</a>) and 'wiki' (<a class="wiki" href="/wiki/TracWiki">TracWiki</a>). </dd><dt><code>[opt]</code></dt><dd>add more features to improve user experience and maintenance </dd><dt><code>[extra]</code></dt><dd>enable advanced features for specific use cases </dd></dl> Make sure to understand their purpose before deactivating <code>[main]</code> or activating <code>[extra]</code> components. </p>
It's clear the dl
is wrapped in p
.
More details reported in trac:#12638.
comment:7 Changed 8 years ago by
Owner: | set to Ryan J Ollos |
---|---|
Status: | new → accepted |
Output from a full test run with Trac 1.2dev: