Error: Failed to derive URL prefix for Timeline API code files
lennart - September 29, 2008 - 16:11
| Project: | Timeline |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
The error mentioned in the Title of this issue appears when trying to access a timeline from Firefox 3.0.3
Not sure whether the problem is with the module, with firefox or with the timeline API.

#1
Can you please post some more details about your site, or steps to reproduce this error. I'm developing with firefox 3.0.3 and it works fine.
#2
The problem seems to be specific to my setup.
#3
I have the same error...I installed it successfully on one site and that's working properly but I get this error on a second site that I configured exactly the same.
What did you do to fix it? I confirmed my path to the widget was correct...that's what I assume this error is referring to
#4
I looked closer at the permissions of the timeline folder and there is no owner set for the timeline folder or the widget's .js file....strange....would that make a difference? I can't seem to assign an owner to those items (over FTP)...I even tried re-uploading the files...no change
#5
I did not manage to fix it.
#6
This error only occurs for me if the scripts are not in the header. I usually place scripts in the the footer for performance, but I'm going to look into overriding the view template for timelines so they're in the header instead.
I'm using this on a D5 install, by the by.
EDIT: The path technique described here works.
#7
Please try turning off javascript compression in your admin>performance settings and see if that fixes it.
#8
yup - that's it! (turning off JS Compression).
Is a fix to that possible?
#9
That worked for me as well
#10
Turning off JavaScript compression "fixed" the issue for me.
#11
Ok, seems like have a bug then.
#12
My problem is that when i enable JS Optimization under Performance settings in D6, Timeline says that message "Error: Failed to derive URL prefix for Timeline API code files" and the timeline does not load.
EDIT: The path technique mentioned above does -not- work for me. The $scripts are already being printed in the header, and moving them to the footer just out of curiousity did nothing (same error no matter the location of the scripts).
I would be willing to pay a very small amount of money for a fix for this so I can optimize my JS files.
#13
Looks like you indeed need to disable JS Optimization. This fixed a similar issue for me. Any future plans to modify the module to support optimization?
#14
It's too late for me to make a patch but it's only a one-liner anyway.
In timeline.theme.inc on line 93, change the line to:
drupal_add_js($widget_url, 'module', 'header', FALSE, TRUE, FALSE);#15
Hi everybody,
While I don't have time for proper maintenance, if you all can give me a proper patch (with explanation) and a review, I'll commit it the change.
#16
Note: The solution in #14 worked for me. Thanks.
#17
Hi jmiccolis, I just set it to not be preprocessed, which means aggregated with the others.
drupal_add_js($data = NULL, $type = 'module', $scope = 'header', $defer = FALSE, $cache = TRUE, $preprocess = TRUE)$preprocess (optional) Should this JS file be aggregated if this feature has been turned on under the performance section?
#18
Hi psynaptic, so I really don't mean to be a PITA here but... I guess I'm going to do it anyhow :|
Please see http://drupal.org/patch for how to roll a patch. Having a patch makes it much easier and faster for me to apply the change your suggesting. For something simple like this I don't even need to open my editor.
Once there is a patch posted, if someone else can test the change and move the status to "reviewed & tested by the community" I'll be comfortable committing it with only the slightest testing.
The more bug fixes that are dealt with this way by the community of timeline users the better a module we'll have to use, even with my limited time for maintenance.
Thanks all.
#19
I updated the module in my local environment to DRUPAL-6--1 to ensure I was creating a patch that would apply cleanly but the timeline doesn't even show.
I then downloaded the latest stable version via drush. I did a diff against my version and this latest stable release and I saw huge changes. I made the same change as before, which to be honest is an extremely simple bug fix to apply when you have a working version, but the timeline I had in place no longer loads. There is just an empty space where it should be.
This project is finished now and I don't have time to invest in trying to get the latest stable release working for this site.
If you have a dev site setup for timeline and you have it working there then try out the modification I have posted about above with the cache turned on. If it fixes the issue for you then why not commit it? It's an obvious fix which has been verified by the community (thanks Narayan Newton).
I tried, what can I say..
#20
1.x version is not supported anymore. Closing this issue. Please reopen in case that error still exists with 2.x or newer versions.
#21
I am using the 2.0 version and it is still an issue for me too.
Chris
UPDATE- delete this comment. It was a misconfiguration for local serving of the timeline from my machine
#22