mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #24904
[Bug 1431668] A change has been merged
Reviewed: https://reviews.mahara.org/4401
Committed: http://gitorious.org/mahara/mahara/commit/797df58ed1cde960194c225be7649c3e2f110442
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: master
commit 797df58ed1cde960194c225be7649c3e2f110442
Author: Aaron Wells <aaronw@xxxxxxxxxxxxxxx>
Date: Fri Mar 13 16:57:35 2015 +1300
Annotation feedback JS shouldn't rely on window's URL path.
Bug 1431668: This logic doesn't work for sites that are using
cleanURLs, and sites in subdirectories. And anyway, the
annotation.js file only gets loaded on pages where the block
is in "view" mode, so the logic isn't even needed.
Change-Id: I3c2a6505bd95331ab376cde6d5784e3c7e8cd6e2
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1431668
Title:
Annotation "feedback" Javascript breaks on clean-urls and sites in
subdirectories
Status in Mahara ePortfolio:
Fix Committed
Bug description:
In artefact/annotation/js/annotation.js, in the function
"connectAnnotationFeedbackLinks()", there's a check for
"window.location.pathname == '/view/view.php'", meant to make sure
that the link only gets activated via Javascript when you're viewing a
page.
However, this breaks in two scenarios:
1. If the Mahara site is in a subdirectory. For instance, my own test
site sits at the URL http://vegas.wgtn.cat-it.co.nz/mahara/, so my
pathname is '/mahara/view/view.php'
2. Clean URLs. If a site has Clean URLs turned on, then the URL to a
page will be something like "https://mahara.org/user/aaronw/files-for-
sharing", in which case the pathname is '/user/aaronw/files-for-
sharing'.
So relying on the suffix of the URL to determine if we're on the right
page to run that JS, is not going to work.
What we should probably do instead, is that when the block is being
rendered on a page where that link should be Javascriptified, then we
should add some inline JS that invokes the
connectAnnotationFeedbackLinks() method.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1431668/+subscriptions
References