Project

General

Profile

Actions

Bug #12288

open

Wt 4.10.3: Javascript 'Wt internal error' when using a WMenu and disabled WLayout

Added by Stefan Bn 7 months ago. Updated 7 months ago.

Status:
InProgress
Priority:
Normal
Target version:
Start date:
12/27/2023
Due date:
% Done:

0%

Estimated time:

Description

Using Wt 4.10.3 I still get this Javascript error, which started appearing in 4.10.2. Probably it is related to the famous "Fix for 12006 causes exception".

Wt internal error; code: undefined, description: Wt4_10_3.$(...).layout is undefined

I did a long investigation and found out that this happens when using a WMenuItem that creates a disabled WPanel with a WLayout and child items. I extracted the essential code from my code basis.
Using the mini-sample attached, the error can be reproduced.


Files

main.cpp (1.8 KB) main.cpp Stefan Bn, 12/27/2023 10:26 PM
Wt_internal_error.JPG (14.6 KB) Wt_internal_error.JPG Stefan Bn, 12/27/2023 10:28 PM
Actions #1

Updated by Matthias Van Ceulebroeck 7 months ago

  • Status changed from New to InProgress
  • Assignee set to Matthias Van Ceulebroeck
  • Target version set to 4.11.0

Hi Stefan,

famous as #12006 may be, it is not related to this. The issue popped up in 4.10.1, and is related to #10512, I believe. When the disabled state is propagated, it seems that the layout adjust is called too soon, before it is actually instantiated in the JS code.
Even though #10512 was tested thoroughly, it is impossible to catch all possible combinations and configurations of widgets, sadly. I am looking at creating tests to at least catch a lot of the more common cases.

Regardless, thank you for your submission.

Actions

Also available in: Atom PDF