Last modified: 2014-11-18 23:40:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T75291, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 73291 - Flow: Make our HTML validate
Flow: Make our HTML validate
Status: PATCH_TO_REVIEW
Product: MediaWiki extensions
Classification: Unclassified
Flow (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-12 03:48 UTC by Matthew Flaschen
Modified: 2014-11-18 23:40 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matthew Flaschen 2014-11-12 03:48:18 UTC
HTML validation will make it more likely that our code doesn't run into cross-browser issues.  In order for this to be most useful, we need a clean slate, so we can easily see when new issues crop up.

The base href error in particular is apparently causing the validator to ignore certain errors ("Suppressing further errors from this subtree").  There is a duplicate attribute error at https://www.mediawiki.org/wiki/Talk:Flow_QA with both data-flow-api-handler="watchItem" and data-flow-api-handler="watchTopic".  I'm not sure why, but the validator is not picking that up, even though it does pick up the same thing in a self-contained test case (which is otherwise valid).

The errors are:

1. "Element base not allowed as child of element div in this context." (it's not allowed in the body)
2. "Attribute name not allowed on element script at this point." for "<script name="handlebars-template-progressive-enhancement"" (never used, only the type is).

There are also some warnings:

1. "Potentially bad value ... for attribute datetime on element time: Year may be mistyped."  This is apparently because our time_iso is not actually ISO time; it is also not valid for this parameter.  It seems that it should be an error, but the validator is going easy on us (possibly because it's confused with something else).
Comment 1 Gerrit Notification Bot 2014-11-12 05:18:27 UTC
Change 172668 had a related patch set uploaded by Mattflaschen:
Use core's postWithToken for watching, which handles badtoken

https://gerrit.wikimedia.org/r/172668
Comment 2 Matthew Flaschen 2014-11-13 22:06:09 UTC
It seems we are already re-writing links on the server, so may not even need a base href.

Relatedly, Parsoid recently changed to generate HTML with a constant base href for the whole wiki.  If we do need a base href still, this should make things much easier with the same content appearing on both topics and boards.  If we eventually show content on another wiki, though, it won't solve that alone (since different wikis will still have different base hrefs).

---
C. Scott provided some help in IRC:

[11/13/14 16:53] <cscott> superm401: if you actually properly resolve the given URL with the given base HREF, your pages will continue to work both before and after

I don't know if we preserve old base hrefs given by parsoid though.

He also said:

[11/13/14 16:54] <cscott> superm401: and if you ignore base href and just replace(/([.][.]?\/)*/, '') on your hrefs to get article titles, your pages will also continue to work both before and after
Comment 3 Jon 2014-11-13 22:13:09 UTC
Note MobileFrontend has a `make validate` command which tests for validation errors.. This may be of use to you.
Comment 4 Matthew Flaschen 2014-11-15 04:11:48 UTC
That's cool.  I didn't know the W3C validator had a JSON output mode.
Comment 5 Gerrit Notification Bot 2014-11-18 00:13:23 UTC
Change 172668 merged by jenkins-bot:
Use core's postWithToken for watching, which handles badtoken

https://gerrit.wikimedia.org/r/172668

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links