Last modified: 2014-07-07 13:00:12 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 T68939, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66939 - VisualEditor: When editing a template, the title is truncated at first dot (period)
VisualEditor: When editing a template, the title is truncated at first dot (p...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: High minor
: VE-deploy-2014-07-03
Assigned To: Alex Monk
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-22 05:58 UTC by This, that and the other (TTO)
Modified: 2014-07-07 13:00 UTC (History)
8 users (show)

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


Attachments

Description This, that and the other (TTO) 2014-06-22 05:58:03 UTC
1. Edit [[mw:API:Meta]] in VisualEditor
2. Select the "MediaWiki version 1.8" template

A popup appears showing the template's correct name ("MW 1.8").

3. Open the transclusion editor for the template

VE thinks it is editing a template called "MW 1".

Also note that when you try to insert a template with a period in its name, like "MW 1.8", you get a whole lot of suggestions for "MW 1".
Comment 1 James Forrester 2014-06-26 00:18:40 UTC
I blame mwTitle. Because it's always at fault.
Comment 2 Alex Monk 2014-06-26 17:35:43 UTC
Yep.

mw.Title.newFromText( 'Template:Asd.com' ).getNameText()
"Asd"
Comment 3 Krinkle 2014-06-26 17:37:11 UTC
getNameText() explicitly leaves out any faux extension. That's by design. To get the page title, use getMainText.


https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.Title-method-getNameText
Comment 4 Krinkle 2014-06-26 17:40:56 UTC
btw, This is a compatibility/legacy left-over from when mw.Title was part of UploadWizard and they got dibs on the more intuitive name "getNameText". Unfortunately this mistake was not uncovered until after it was merged in mediawiki-core and released in an LTS.
Comment 5 Alex Monk 2014-06-26 17:41:26 UTC
Yeah, I worked that out soon after moving the bug.

Still, I wonder if the documentation should be improved for those methods.
Comment 6 Gerrit Notification Bot 2014-06-26 19:38:58 UTC
Change 142372 had a related patch set uploaded by Alex Monk:
Don't remove 'extension' from template names

https://gerrit.wikimedia.org/r/142372
Comment 7 Gerrit Notification Bot 2014-06-26 23:47:06 UTC
Change 142372 merged by jenkins-bot:
Don't remove 'extension' from template names

https://gerrit.wikimedia.org/r/142372
Comment 8 Alex Monk 2014-06-26 23:59:01 UTC
Should be fixed now.

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


Navigation
Links