Bug 440052

Summary: Demos don't work
Product: [Fedora] Fedora Reporter: Thomas Moschny <thomas.moschny>
Component: MochiKitAssignee: Adam Miller <maxamillion>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-19 15:05:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas Moschny 2008-04-01 15:08:42 UTC
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 07:40:29 UTC
Ping?

Comment 2 Fedora Admin XMLRPC Client 2009-02-11 14:43:45 UTC
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 14:56:24 UTC
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 14:24:47 UTC
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 18:55:40 UTC
(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 19:30:43 UTC
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 15:05:50 UTC
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