Project

General

Profile

Bug #5913

WFileUpload has a bug when placed in a WTemplateFormView

Added by Dennis Muriuki almost 5 years ago. Updated almost 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
09/14/2017
Due date:
% Done:

0%

Estimated time:

Description

The error message: Wt internal error; code: undefined, description: j77 is null

Detailed error:

[2017-Sep-13 22:51:18.304948] 11100 [/ lPGxTyq2jwcUCyXe] [error] "WApplication: JavaScript error: {""exception_description"":""j77 is null"",""exception_js"":"\"Wt.p.response(254345223);Wt.p.setServerPush(true);{var j77=Wt3_3_8.$('ob7qdb7');\nj77.setAttribute('action','.?wtd=lPGxTyq2jwcUCyXe&request=resource&resource=ob7qdb8&rand=1');\n{var submit = true;var x = Wt3_3_8.$('inob7qdb7');if (x.files != null) {for (var i = 0; i < x.files.length; i) {var f = x.files[i];if (f.size > 131072) {submit = false;var a1=f.size;Wt.emit('ob7qdb7','fileTooLarge',f.size);;break;}}}if (submit)Wt3_3_8.$('ob7qdb7').submit(); }\n\nvar j78=Wt3_3_8.$('ob7qdb9');\nj78.disabled=true;\n$('#ob7qdb9').addClass('disabled');\n\n}{var j80=Wt3_3_8.$('ob7qd4y');\nvar j81=document.createElement('button');j80.parentNode.replaceChild(j81,j80);\nj81.setAttribute('id', 'ob7qd4y');\nj81.setAttribute('type','button');\n\nj81.className='navbar-toggle btn btn-default with-label';\nj81.style.display='none';\nfunction f82(event) { var e=event||window.event,o=this;if($(o).hasClass('disabled')){Wt3_3_8.cancelEvent(e);return;}Wt.p.update(o,'s58',e,true);}\nj81.onclick=f82;\nWt3_3_8.setHtml(j81,'\\r\\n \\r\\n \\r\\n \\r\\n ');\nWt3_3_8.unstub(j80,j81,1);\nvar j83=Wt3_3_8.$('ob7qd60');\nvar j84=document.createElement('ul');j83.parentNode.replaceChild(j84,j83);\nj84.setAttribute('id', 'ob7qd60');\nj84.className='Wt-popup dropdown-menu';\nj84.style.zIndex='10000';\nj84.style.display='none';\nfunction f85(event) { var e=event||window.event,o=this;if($(o).hasClass('disabled')){Wt3_3_8.cancelEvent(e);return;}(function(o,e) { if (Wt3_3_8.WPopupWidget && $.data(o,'popup')) {Wt3_3_8.WPopupWidget.popupClicked = o;$(document).trigger('click', e);Wt3_3_8.WPopupWidget.popupClicked = null; }})(o,e);Wt3_3_8.cancelEvent(e,0x1);}\nj84.onclick=f85;\nWt3_3_8.setHtml(j84,'

1))return true;else{if($(o).hasClass(\\'disabled\\')){Wt3_3_8.cancelEvent(e);return;}{var f=function(){Wt.p.setHash(\\'\\',true);};f(o,e);}Wt3_3_8.cancelEvent(e,0x2);Wt.p.update(o,\\'sec\\',e,true);}\"">Sign in

1))return true;else{if($(o).hasClass(\\'disabled\\')){Wt3_3_8.cancelEvent(e);return;}{var f=function(){Wt.p.setHash(\\'/profile\\',true);};f(o,e);}Wt3_3_8.cancelEvent(e,0x2);Wt.p.update(o,\\'sed\\',e,true);}\"">Profile

1))return true;else{if($(o).hasClass(\\'disabled\\')){Wt3_3_8.cancelEvent(e);return;}{var f=function(){Wt.p.setHash(\\'/buyerds\\',true);};f(o,e);}Wt3_3_8.cancelEvent(e,0x2);Wt.p.update(o,\\'see\\',e,true);}\"">Buyer

1))return true;else{if($(o).hasClass(\\'disabled\\')){Wt3_3_8.cancelEvent(e);return;}{var f=function(){Wt.p.setHash(\\'/sellerds\\',true);};f(o,e);}Wt3_3_8.cancelEvent(e,0x2);Wt.p.update(o,\\'sef\\',e,true);}\"">Seller

1))return true;else{if($(o).hasClass(\\'disabled\\')){Wt3_3_8.cancelEvent(e);return;}Wt.p.update(o,\\'sf1\\',e,true);}\"">Register

1))return true;else{if($(o).hasClass(\\'disabled\\')){Wt3_3_8.cancelEvent(e);return;}Wt.p.update(o,\\'sf2\\',e,true);}\"">Sign out

');\nWt3_3_8.$('ob7qd60').wtNoReparent=true;\n\nWt3_3_8.unstub(j83,j84,1);\nfunction f87(event) { var e=event||window.event,o=this;if($(o).hasClass('disabled')){Wt3_3_8.cancelEvent(e);return;}Wt3_3_8.show('ob7qd4z');\nWt3_3_8.hide('ob7qd4y');\nvar j86=Wt3_3_8.$('ob7qd4x');\nWt3_3_8.animateDisplay(Wt,'ob7qd4x',4,0,250,'none');\n\nWt.p.update(o,'s58',e,true);}\nvar j88=Wt3_3_8.$('ob7qd4y');\nj88.onclick=f87;\nfunction f90(event) { var e=event||window.event,o=this;if($(o).hasClass('disabled')){Wt3_3_8.cancelEvent(e);return;}Wt3_3_8.hide('ob7qd4z');\nWt3_3_8.show('ob7qd4y');\nvar j89=Wt3_3_8.$('ob7qd4x');\nWt3_3_8.animateDisplay(Wt,'ob7qd4x',4,0,250,'');\n\nWt.p.update(o,'s5a',e,true);}\nvar j91=Wt3_3_8.$('ob7qd4z');\nj91.onclick=f90;\nfunction f92(event) { var e=event||window.event,o=this;if(e.ctrlKey||e.metaKey||(Wt3_3_8.button(e) > 1))return true;else{if($(o).hasClass('disabled')){Wt3_3_8.cancelEvent(e);return;}Wt.p.update(o,'sf1',e,true);}}\nvar j93=Wt3_3_8.$('ob7qdac');\nj93.onclick=f92;\nfunction f94(event) { var e=event||window.event,o=this;if(e.ctrlKey||e.metaKey||(Wt3_3_8.button(e) > 1))return true;else{if($(o).hasClass('disabled')){Wt3_3_8.cancelEvent(e);return;}Wt.p.update(o,'sf2',e,true);}}\nvar j95=Wt3_3_8.$('ob7qda7');\nj95.onclick=f94;\n}"",""stack"":""http://127.0.0.1:8080/store line 230 > eval:2:1\nhttp://127.0.0.1:8080/store line 230 > eval:1:2\nVhttp://127.0.0.1:8080/store:230:40\\nfa@http://127.0.0.1:8080/store:230:308\\nz@http://127.0.0.1:8080/store:165:160\\nxhttp://127.0.0.1:8080/store:165:354\\n""}\"


Files

StoreModelFormView.cpp (37 KB) StoreModelFormView.cpp Dennis Muriuki, 09/14/2017 12:19 AM
template file.txt (4.94 KB) template file.txt Dennis Muriuki, 09/14/2017 12:43 AM
#1

Updated by Dennis Muriuki almost 5 years ago

It appears placing the control outside a form element in the form template solves this issues.

Sorry for this..

#2

Updated by Roel Standaert almost 5 years ago

Yeah, you normally don't ever need to write the <form> tag when developing an application with Wt. Those are inserted by Wt where appropriate.

Also available in: Atom PDF