Error for invalid characters in the title (original) (raw)
As part of the system to communicate errors and warnings in Content Translation (T189488), we want to surface issues such as the title containing invalid characters as illustrated below:
- We'll show the error after the user edited the title (or initially if the user already loads a translation with such problem).
- The publish button will be disabled while the issue remains.
- An error marker will be shown next to the title.
- The error details will include a "learn more" pointing to a documentation page about titles (if available in the language),
- A "Fix problematic characters" action will transform the invalid title into a valid one (this changes the "Remove invalid characters" feature from the mockup)
In the future, following feature can be considered as extra:
- The problematic characters will be highlighted when the input focus is on the title.
Message text:
Your translation title contains invalid characters
Some characters cannot be used in the title of pages for technical reasons.
Please, edit the title to avoid the problematic characters.
Currently, editors trying to publish a translation with an invalid title get the following message:
Event Timeline
Pginer-WMF renamed this task from CX2: Error for invalid titles to CX2: Error for invalid characters in the title.Mar 27 2018, 11:54 AM
Pginer-WMF triaged this task as Medium priority.
Pginer-WMF lowered the priority of this task from Medium to Low.
An Error is good. But it must prevent the user from creating a foreign language title in destination wiki.
An Error is good. But it must prevent the user from creating a foreign language title in destination wiki.
That's the idea. In this context we distinguish errors from warnings. Errors prevent from publishing. Warnings ask you to review your content but let publish if you are confident the content is good.
(Note for testing)
- the link for invalid chars in a page title - Help:Page_name#Restrictions
- reference ticket T191349
- check for Console errors, e.g.
[CX] Publishing failed {"code":"invalidtitle","info":"Bad title "".","*":"See http://cx2-testing.wmflabs.org/api.php for API usage.
- check for Console errors, e.g.
[CX] Publishing failed {"code":"invalidtitle","info":"Bad title \"\".","*":"See http://cx2-testing.wmflabs.org/api.php for API usage.
When you have invalid characters in your target title and try publishing, that fails because article with invalid title cannot be created. That failure is caught in our code and error is visually displayed to the user. In addition to informing the user about the error, there is also a log in the console happening. And, it's just that, a log about the error which is correctly caught and processed, rather than unexpected error that occurred.
I like the idea of Expressive error than unexpected error that occurred :).