Bug 440052 - Demos don't work
Demos don't work
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: MochiKit (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Adam Miller
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-01 11:08 EDT by Thomas Moschny
Modified: 2009-02-19 10:05 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-19 10:05:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Thomas Moschny 2008-04-01 11:08:42 EDT
Description of problem:
The MochiKit demos in /usr/share/doc/MochiKit-1.3.1/examples don't work. 
MochiKit.js isn't found, because the demos refer to it using the relative 
path "../../lib/MochiKit/MochiKit.js". However, there is 
no "/usr/share/doc/MochiKit-1.3.1/lib/MochiKit/MochiKit.js".

Either a copy of (or a symlink to) MochiKit.js should be placed at that path, 
or the demos be modified to 
reference "../../../../../share/MochiKit/MochiKit.js", i.e. the copy 
in "/usr/share/MochiKit".


Version-Release number of selected component (if applicable):
MochiKit-1.3.1-1.fc6.noarch


How reproducible:
Always.


Steps to Reproduce:
1. Direct your browser (javascript-enabled) to 
e.g. "file:/usr/share/doc/MochiKit-1.3.1/examples/sortable_tables/index.html".


Actual results:
A static table.


Expected results:
A sortable table.

Additional info:
Comment 1 Thomas Moschny 2008-07-12 03:40:29 EDT
Ping?
Comment 2 Fedora Admin XMLRPC Client 2009-02-11 09:43:45 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 Adam Miller 2009-02-11 09:56:24 EST
Sorry for the delay, apparently MochiKit had been orphaned as a package. I picked it up this morning, there is a new release so I will be focusing on packaging that in order to get it pushed to updates and hopefully this will fix the bug, if not I will go from there in trying to track down the issue.
Comment 5 Adam Miller 2009-02-12 09:24:47 EST
In order for the examples to work, you must copy the code directory for the specific example into a web publishable directory because the MochiKit code is referenced by its relative web location (which is the fix that was made, before it was a hard coded location that mirrored the directory structure of the source distribution of the upstream project).
Comment 6 Thomas Moschny 2009-02-18 13:55:40 EST
(In reply to comment #5)
> In order for the examples to work, you must copy the code directory for the
> specific example into a web publishable directory because the MochiKit code is
> referenced by its relative web location (which is the fix that was made, before
> it was a hard coded location that mirrored the directory structure of the
> source distribution of the upstream project).

Hm. What I wanted was to browse file:/usr/share/doc/MochiKit-*/examples, with working examples. For this to work, the example files should use a relative path to MochiKit.

Or, even better, you could put them into a web-accessible location, most likely in a sub package. See httpd-manual for an example.
Comment 7 Adam Miller 2009-02-18 14:30:43 EST
The patch I applied does make the path relative, but the issue with viewing it on the filesystem is the path relativity is specific to the webroot, which is what is expected as JavaScript is meant to be served out to the web.

I spoke with one of the previous package maintainers of MochiKit about this and he verified that the examples will need to be moved into a web published directory in order to use a relative path, otherwise the path of the MochiKit "library" JavaScript routines would have to be hard coded somewhere which would not be preferred.
Comment 8 Adam Miller 2009-02-19 10:05:50 EST
The bug has been fixed and has been pushed out through Bodhi, there is apparently a ticket in to infrastructure about the fact that updates are not automatically closing bugs.

Marking bug as closed, relevant update links:
https://admin.fedoraproject.org/updates/F10/FEDORA-2009-1665
https://admin.fedoraproject.org/updates/F9/FEDORA-2009-1527

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