Last modified: 2013-10-16 05:49:01 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 T54418, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52418 - 'name' in tourSpec for on-wiki tour should be optional, warn if it doesn't match
'name' in tourSpec for on-wiki tour should be optional, warn if it doesn't match
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
GuidedTour (Other open bugs)
master
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-01 20:37 UTC by spage
Modified: 2013-10-16 05:49 UTC (History)
4 users (show)

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


Attachments

Description spage 2013-08-01 20:37:38 UTC
If you create an on-wiki tour MediaWiki:Guidedtour-tour-mytour.js but the tourSpec object you pass to gt.defineTour contains
  name: 'My Tour',
then GuidedTour fails with
  TypeError: definedTours[tourName] is undefined
  http://localhost/wiki/extensions/GuidedTour/modules/ext.guidedTour.lib.js
  Line 921

This happens because the name must exactly match the tour name from the page title.

1. DRY, don't make tour author supply it in this case (pass the expected tour name to the callback)
2. If you do supply it and it doesn't match, defineTour() should warn 'Optional \'tourSpec.name\' "My Tour" doesn't match on-wiki tour name "mytour"'.
Comment 1 Matthew Flaschen 2013-10-16 05:49:01 UTC
I don't think there's a clean way to determine which file is calling defineTour.  There's no way I know to pass a tour-specific dependency object (e.g. an object that knew which tour was supposed to call it) to a tour script

Closing as WONTFIX for now, but reopen if you have an approach for implementing it.

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


Navigation
Links