1. Try attaching the file to a post from Firefox 1.5.0.1
2. Upload progress bar starts running and stays forever.

Very similar problem is experienced during the update process - the update progress bar runs forever if started from Firefox. Therefore I suspect, that the the problem is somewhere in the progress indicator JavaScript.

Comments

Bèr Kessels’s picture

Status: Active » Closed (duplicate)
drumm’s picture

Status: Closed (duplicate) » Active

I suspect that this is caused by your browser caching an older version of the JavaScript files. Try clearing the browser's cache and then using the file uploads.

taslett’s picture

Just trying to add some claification on this bug which may help to find a solution.
The progress bar hangs only on Linux browsers.
Browsers on Windows and Mac don't seem to have a problem.
The server OS running drupal 4.7 beta 5 seems to make no difference.

Artem’s picture

I experienced the original error on Windows with Firefox 1.5.0.1. However I don't experience it anymore on the same Drupal installation. I guess it was really due to the browser cache issues. Is it somehow possible to force the browser load the updated version of the script if the browser cache contains the old one?

Stefan Nagtegaal’s picture

Can't we fix this with something like the following code?

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");                 // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");  // Altijd veranderd
header("Cache-Control: no-store, no-cache, must-revalidate");  // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");                                              // HTTP/1.0

Just a guess...

archatas’s picture

Using the folowing AJAX request, it is possible to refresh some cached file:

var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET","path/to/file/that/has/to/be/refreshed",false);
xmlHttp.setRequestHeader("If-None-Match","some-random-string");
xmlHttp.setRequestHeader("Cache-Control","no-cache,max-age=0");
xmlHttp.setRequestHeader("Pragma","no-cache");
xmlHttp.send();

But still we don't have a way to check whether we have an old version of the file or the new one.

My suggestion would be to have version information in javascript/css/image filenames, just like here:
drupal-4.7.0.js
update-4.7.0.js
progress-4.7.0.js
drupal-4.7.0.css

So after every Drupal upgrade, all the users' browsers would be forced to get the newest versions of the files.

-----
Archatas
http://hyperlocal.org

archatas’s picture

Stefan, if we use headers like in your example, at first, we will need php file wrappers for all javascript/css/image files. Secondly, the files will never be cached, as they normaly should.

Bèr Kessels’s picture

I am inclined to mark this won'tfix.

1: its a browser issue. File an issue with firefox :)
2: not many people will upgrade twice. If you really do so, make sure you wipe your cache, or use a browser w/o the issue (konqueror)
3: We need a lot of code to fix this minor issue. Only AJAX will not help. Giving files version numbers is horrible. And adding PHP wrappers around all files is a severe performance issue.

Should I mark it as such?

moshe weitzman’s picture

it is trivially fixed by adding a timestamp to the js file. we should do that at leats in the update page because failures rthere are scary and sometimes fatal for a sysadmin without skills.

taslett’s picture

It is not only Firefox.
The problem occurs in Opera 7.54, Epiphany 1.6.5, Konqueror and other browsers on linux when trying to attach a file to a page.
That also rules out a browser cacheing issue.

Bèr Kessels’s picture

@moshe, excuse me if this is a stupid, but can you point me to a resource, or give a hint how to fix this? I would like to help make the upgrade a bit more sturdy. Every small fix or improvement is welcome AFAIKS.

Bèr

moshe weitzman’s picture

in HTML

<script src=misc/drupal.js?date=123456789>

since the date always changes, the stylesheet is never cached. recommended for update.php not everywhere.

Artem’s picture

Moshe, what if we append the file version instead of a date and do it everywhere? Then after the site upgrade to the browser it will look like all the pages switched to a completely different script.

&lt;script src=misc/drupal.js?ver=1.112.2&gt;
moshe weitzman’s picture

Status: Active » Fixed

try latest HEAD. we fixed some stuff. please reopen with details if still not fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)