Bug 104977 - [testcase] javascript error on www.cortalconsors.de
Summary: [testcase] javascript error on www.cortalconsors.de
Status: RESOLVED DUPLICATE of bug 136913
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-02 17:31 UTC by Andre Woebbeking
Modified: 2012-05-26 11:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Woebbeking 2005-05-02 17:31:33 UTC
Version:           CVS HEAD (using KDE 3.4.89 (CVS >= 20050314), compiled sources)
Compiler:          gcc version 3.4.4 20050314 (prerelease) (Debian 3.4.3-12)
OS:                Linux (i686) release 2.6.11-1-k7

Hi,

if I want to visit the website I get the following error

Error: https://as1.falkag.de/server/asldata.js: Error - Recursion too deep
Error: https://www.cortalconsors.de/euroWebDe/-: Error - Recursion too deep

The site works fine with Konqueror 3.3.2 and Firefox.


Cheers,
André
Comment 1 Maksim Orlovich 2005-08-10 18:29:16 UTC
don't see this on the 3.5 branch
Comment 2 Andre Woebbeking 2005-08-10 23:01:07 UTC
You're right :-)

But now I get

Error: node : TypeError: Attempted to access 'name' property on undefined object (result of expression this.$event$.name)

if I try to interact with some elements (i.e. buttons).
Comment 3 Andre Woebbeking 2005-08-11 20:38:31 UTC
This seems to be the offending code:

function  Form_submitEvent (event, doSubmit) 
{
	doSubmit = doSubmit != false;  // default value: true
	this.$event$.name = '$event';
	this.$event$.value = event;
	if (typeof this.onsubmit == 'function')  doSubmit = this.onsubmit() && doSubmit;
	if (doSubmit)  this.submit ();
}

Is it valid?
Comment 4 Andre Woebbeking 2005-08-11 23:18:38 UTC
Hi Maks,

your latest commit to 3.5 branch seems to fix it :-)
Comment 5 Maksim Orlovich 2005-08-12 00:14:54 UTC
interesting. this doesn't quite sound like something which it /should/ fix -- could you please specify a bit more about what you were interacting with, etc? I'd like to analyze this to understand it more.
Comment 6 Andre Woebbeking 2005-08-12 17:00:39 UTC
On Friday 12 August 2005 00:14, Maksim Orlovich wrote:

> interesting. this doesn't quite sound like something which it
> /should/ fix -- could you please specify a bit more about what you
> were interacting with, etc? I'd like to analyze this to understand it
> more.


I had problems with two controls:

1) when I watch a chart I can choose the time range via a tab bar about 
the chart (when I click at an entry JS is executed, i.e. 
submit_time_range("1m").

2) in the watchlist is a combobox to delete, buy, sell, ... stocks

both controls triggered the above mentioned error.

And after the latest update both work fine :-) I'm quite sure that your 
commit was the only one.
Comment 7 Maksim Orlovich 2005-08-12 19:30:33 UTC
Oy. This is a bit bizarre, and probably only works by a bug.
Basically, it's changing the name it's addressing stuff by:
this.$event$.name = '$event';

I would have to figure out how the heck that works on other browsers..

Comment 8 Maksim Orlovich 2005-08-12 19:52:06 UTC
Quite bizzare, looks like setting the name has a sort of half-way effect: in mozilla, the item is still accessible via old name, while in IE, querying the name returns a new value, but the node doesn't actually /seem/ to access it.
Will have to consult someone more experienced


<form name="boo">
    <input type="hidden" name="$event$">
</form>

<div id="log">
</div>

<script>
function doLog(msg)
{
    document.getElementById("log").innerHTML += msg + "<br>";
}

function doIt()
{
    doLog ('Original name:' + document.boo.$event$.name);
    document.boo.$event$.name='other';
    doLog ('After changing name (access via old):' + document.boo.$event$.name);
    doLog ('DOM attr for name:' + document.boo.$event$.getAttribute('name'));
    doLog ('Acces via new name, collect:' + document.boo.other);
    doLog ('Access via new, getElementsByName found:' + document.getElementsByName('other').length);
    doLog ('Access via old, getElementsByName found:' + document.getElementsByName('$event$').length);
    
    //setTimeout(doIt, 1000);
}

</script>

<body onload="doIt()">
Comment 9 Maksim Orlovich 2005-12-04 17:29:50 UTC
Reopening since I fixed the bug that was causing it to work. Here is how to reintroduce it:
in HTMLElementImpl::parseAttribute(AttributeImpl *attr), case ATTR_NAME:, remove the call incDOMTreeVersion()
Comment 10 FiNeX 2008-04-06 17:03:51 UTC
Konqueror 4 (trunk) is giving different errors on the JS console: 

Error: https://aktionen.cortalconsors.de/js/s_code_cortalconsors_v1.3.js: ReferenceError: Can't find variable: s_c
Error: https://aktionen.cortalconsors.de/superzins_07/: TypeError: Undefined value

Comment 11 FiNeX 2008-04-06 17:09:12 UTC
The testcase on http://bugs.kde.org/show_bug.cgi?id=104977#c8 is still reproducible on konqueror trunk (4.0.3).
Comment 12 Andrea Iacovitti 2012-05-26 11:33:35 UTC

*** This bug has been marked as a duplicate of bug 136913 ***