Bug 63498 - Javascript menu broken
Summary: Javascript menu broken
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: 4.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-31 02:03 UTC by John Gutierrez
Modified: 2004-05-27 06:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Testcase (374 bytes, application/x-gztar)
2003-11-01 02:52 UTC, Sashmit Bhaduri
Details
test case for falling link problem (175 bytes, text/html)
2004-03-04 22:28 UTC, Dominic Chambers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Gutierrez 2003-08-31 02:03:07 UTC
Version:           4.0 (using KDE 3.1.3)
Installed from:    SuSE
Compiler:          gcc version 3.3 20030226 (prerelease) (SuSE Linux)
OS:          Linux (i686) release 2.4.20-4GB

http://texturizer.net/firebird/index2.html passes the XHTML 1.0 STRICT test at W3C.  Mozilla Firebird 6.1+ renders the page showing news items and additional news items.  Konqueror does not show any news items and when clicking "additional news items" does not show any articles.
Comment 1 John Gutierrez 2003-09-20 08:41:49 UTC
I now consider this bug CRITICAL - LOSS OF DATA 
 
Comment 2 Stephan Binner 2003-10-23 17:35:49 UTC
"LOSS OF DATA"? What a ridiculous reasoning in this case to get CRITICAL bug state.
Comment 3 Sashmit Bhaduri 2003-11-01 02:52:43 UTC
Created attachment 2953 [details]
Testcase
Comment 4 Sashmit Bhaduri 2003-11-01 02:54:50 UTC
This is actually a javascript bug, nothing to do with XHTML or rendering. 

Referenced functions (probably variables too) from included javascript files (from script src= tags) are not correctly found.

Testcase works in moz, opera, iE
Comment 5 David Faure 2003-11-01 11:42:00 UTC
The JS file is in fact in UTF-16.
So the parse error is due to wrong decoding of the file.
Not sure if it's kjs or khtml's loader that's supposed to detect the encoding of external JS files... Harri? Dirk?
Comment 6 Harri Porten 2003-11-27 11:19:34 UTC
kjs has a ucs-2 interface. It would sounds strange to me pass the data in a 16-bit format only to later discover that its UTF-8 or UTF-16 and expand or shrink it again. The only place in kjs that would be suitable for a detection would be testkjs.cpp which is not part of kjs proper.

As khtml/kio are the ones being fed data in byte format I suggest to do the decoding there.

Unless we realize that e.g. KHTMLPart::write(const QString&) has to detect non-UCS-2 formats, too. Which I doubt.
Comment 7 Harri Porten 2003-11-29 00:10:08 UTC
*** Bug 69115 has been marked as a duplicate of this bug. ***
Comment 8 Dominic Chambers 2004-01-21 16:16:27 UTC
As far as I can tell this is an Apache Mod-Rewrite issue that is being triggered by a difference in the HTTP headers that Konqueror hands over, as compared to other browsers. More on that in a sec.

The site works perfectly when run locally, but also when run from my own Apache host on the Internet. The minimum required changes to get the site working was to copy exact replicas of the files (news.html, loadNews.js, & newsSetup.js) to my own host, modifying news.html to use the two scripts on my host while forcing it (absolute links) to continue using the remaining style sheets and scripts from the original host. You can see a working version of the news page here:

  <http://www.enkasa.com/firebird/news2.html>

The problem _seems_ to be Mod-Rewrite related since the following two javascript URLs get externally re-directed before the file can be accessed on Konqueror, but do not do this on Mozilla.

  <http://texturizer.net/firebird/javascript/loadNews.js>
  <http://texturizer.net/firebird/javascript/newsSetup.js>

The files are available from the redirected URL, but I suspect that Konqueror does not appreciate being re-directed for JavaScript includes. I do not have a debugging HTTP proxy server, but I imagine that differences in the HTTP cause the different paths through Mod-Rewrite.
Comment 9 Dominic Chambers 2004-01-21 16:23:33 UTC
I just noticed that if you click directly on the URLs you won't see the redirect problem. Do "Copy Link Location" instead and paste them into the address bar.
Comment 10 Sander Devrieze 2004-02-08 14:41:39 UTC
This seems to be fixed in KDE 3.2, or am I wrong?
Comment 11 Dominic Chambers 2004-03-04 22:21:06 UTC
No, you are right; the news is now correctly displayed in KDE 3.2. However there are two remaining problems still with the page:

1. the left-hand side links run down the page when you hover your mouse over them
2. there is an alignment problem with the left-hand side links and page content overlapping slightly

I just did a reduction for the first problem. See below:
Comment 12 Dominic Chambers 2004-03-04 22:28:56 UTC
Created attachment 5023 [details]
test case for falling link problem

This test case shows a problem that occurs for block elements that have a hover
rule (anything) and a content insertion rule that uses a particular character.
The character looks like a space or a tab, but it is neither, and I don't know
how to determine what the character is. Does anyone know how to do this without
writing a program?

So it looks like the content insertion rule is applied each time the hover rule
is applied.
Comment 13 John Gutierrez 2004-05-27 06:06:45 UTC
Although the "news" is now showing in KDE322,  it looks like the css stylesheet that Texturizer is using contains invalid code.  I sent them a note with the W3C Validator results attached.