You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2008/07/12 14:35:31 UTC

[jira] Closed: (OFBIZ-230) Problems in virtual product's detail page if productFeatureTypeId contain non alfa characters.

     [ https://issues.apache.org/jira/browse/OFBIZ-230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-230.
---------------------------------

       Resolution: Fixed
    Fix Version/s: Release Branch 4.0
                   SVN trunk
         Assignee: Jacques Le Roux

Jacopo,

I had a look into productdetail.bsh where the functions are created. I think it pretty hard to fix there. I believe we shall better prevent to create productFeatureTypeId which can be a JavaScript function name.  

The better link I found about that is http://www.webdevelopersnotes.com/tutorials/javascript/creating_javascript_functions.php3. It says : <<You can give any name to the function as long as it is not a JavaScript reserved keyword. (The list of reserved keywords can be found here.) The function name can contain only alphanumeric characters (alphabet and digits) and the underscore. Also, the name cannot begin with a numeral.>>

I finally commited a fix in trunk. rev. 676162, release4.0 r676164+r676168

> Problems in virtual product's detail page if productFeatureTypeId contain non alfa characters.
> ----------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-230
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-230
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ecommerce, order
>            Reporter: Jacopo Cappellato
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>
> In productdetail page (both in ecommerce and ordermgr applications) for virtual products, select-boxes are dynamically built to allow features' selection.
> JavaScript functions are used to populate the select-boxes with the allowed options.
> Some of the JavaScript functions' names are built using the productFeatureTypeId code.
> The problem is that, if the productFeatureTypeId field contains characters such as '-' (for example 'SIZE-A') the Javascript functions are built with invalid names (such as 'listSIZE-A()').
> As a consequence, no options are shown in the select-boxes. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.