You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/08/31 16:55:00 UTC

[jira] [Created] (OFBIZ-13513) Legacy jQuery.noConflict() in imagemanagement templates breaks common-theme JS (checkbox select-all, dialogs, category tree)

Mridul Pathak created OFBIZ-13513:
-------------------------------------

             Summary: Legacy jQuery.noConflict() in imagemanagement templates breaks common-theme JS (checkbox select-all, dialogs, category tree)
                 Key: OFBIZ-13513
                 URL: https://issues.apache.org/jira/browse/OFBIZ-13513
             Project: OFBiz
          Issue Type: Bug
          Components: product
    Affects Versions: 24.09.07, Upcoming Branch
            Reporter: Mridul Pathak
            Assignee: Mridul Pathak


Five templates under applications/product/template/imagemanagement/ (ImageFrame.ftl, ImageRotating.ftl, ImageCrop.ftl, ResizeImage.ftl, ShowPeopleApprove.ftl) call jQuery.noConflict(), unchanged since 2010, which resets the global $ alias since nothing else in the theme uses it. OfbizUtil.js's initializeEvents() and importLibrary's cachedScript helper both reference bare $ in callbacks that run after page load, so once noConflict() fires they throw TypeError: $ is not a function and TypeError: Cannot read properties of undefined (reading 'extend'). This breaks checkbox select-all, dialog/confirm popups, and any importLibrary-loaded widget on the page, including the category tree and the page's own JS bundle (e.g. getJs?name=ImageFrame fails to load). Reproduced on Catalog Manager > Image Management > Manage > Frame action (catalog/control/checkAction?productId=...&contentId=...&dataResourceId=...). None of the five templates use bare $ themselves, they all call fully-qualified jQuery(...), so the noConflict() calls serve no purpose and should simply be removed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)