View Issue Details

IDProjectCategoryView StatusLast Update
0006236OXID eShop (all versions)1. ----- eShop frontend -----public2015-12-01 12:12
Status acknowledgedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0006236: javascripts executed twice
DescriptionBehavior: scripts are executed twice when variants are switched on detail page.
Expected Behavior: custom javascripts are only executed once

Problem with the current behavior:
This can cause strange behavior on customized themes that include javascript which is not designed to be executed twice. For default shop functionality i could not find a problem yet.
Steps To Reproducefrom head:
1. add
[{oxscript add="alert('this message should only be displayed once but we will see..')"}] to htdocs\application\views\[YOUR_THEME]\tpl\page\details\inc\productmain.tpl
2. open a browser and navigate to a product (tested in Firefox)
3. the message will appear once (ok so far)
4. switch the variant by selecting color , size or whatever
5. the message appears -> press ok
6. the message appears again -> BUG

Additional Informationthe javascript:
oxAjax.evalScripts( contentTarget );

This seams to be unnecessary because scripts are automatically executed by jquery in the moment they are added to the dom see "domManip" function in jquery i checked version 1.11.2 and 2.1.4.

btw i saw similar code in oxminibasket.js (duplicate code, so maybe we have the same problem here)
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
MySQL VersionNot defined



2015-10-05 17:13

developer   ~0011250

Last edited: 2015-10-05 17:14

View 2 revisions

EE 5.2.5