Bug 440052 - Demos don't work
Summary: Demos don't work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: MochiKit
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Adam Miller
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-01 15:08 UTC by Thomas Moschny
Modified: 2009-02-19 15:05 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-02-19 15:05:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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


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