Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on aem cloud author | fontIconPicker is not a function #3431

Open
3 tasks
suaram95 opened this issue Sep 16, 2024 · 5 comments · May be fixed by #3522
Open
3 tasks

Issue on aem cloud author | fontIconPicker is not a function #3431

suaram95 opened this issue Sep 16, 2024 · 5 comments · May be fixed by #3522

Comments

@suaram95
Copy link

suaram95 commented Sep 16, 2024

Required Information

  • AEM Version, including Service Packs, Cumulative Fix Packs, etc: AEMaaCS
  • ACS AEM Commons Version: 6.0.14
  • Reproducible on Latest?

Expected Behavior

On the pages can be added components and could choose assets/pages via pathbrowser

Actual Behavior

In AEM cloud dev and stage environemnts while loading page we see following js error in console, which is comming form acs-commons.widgets.icon-picker library

Uncaught TypeError: $(...).fontIconPicker is not a function
at HTMLDocument. (dialogstyles.lc-9f9fdaa8982a0f444a4720a2098c372d-lc.min.js:1:108)
at HTMLDocument.dispatch (jquery.lc-f9e8e8c279baf6a1a278042afe4f395a-lc.min.js:126:359)
at k.handle (jquery.lc-f9e8e8c279baf6a1a278042afe4f395a-lc.min.js:120:65)
at Object.trigger (jquery.lc-f9e8e8c279baf6a1a278042afe4f395a-lc.min.js:124:489)
at HTMLDocument. (jquery.lc-f9e8e8c279baf6a1a278042afe4f395a-lc.min.js:139:230)
at Function.each (jquery.lc-f9e8e8c279baf6a1a278042afe4f395a-lc.min.js:52:175)
at c.fn.init.each (jquery.lc-f9e8e8c279baf6a1a278042afe4f395a-lc.min.js:48:132)
at c.fn.init.trigger (jquery.lc-f9e8e8c279baf6a1a278042afe4f395a-lc.min.js:139:206)
at HTMLDocument. (coralui3.lc-c4cd39f7fcd599057827d5ecc5a83ab1-lc.min.js:76:4583)
at p (jquery.lc-f9e8e8c279baf6a1a278042afe4f395a-lc.min.js:101:96)

Actually it can't load fontIconPicker function from icon-picker.js (https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/ui.apps/src/main/content/jcr_root/apps/acs-commons/touchui-widgets/icon-picker/source/icon-picker.js)

$(document).on('cui-contentloaded.data-api', function (e) {
$('[data-init~=graphiciconselect] > select').fontIconPicker({
'theme' : 'fip-coral'
});
});

Steps to Reproduce

Set acs-commons 6.0.14 version to your aem project deploy it cloud enviroment, and try to add cmp.

@maximenougarede
Copy link

Any update, we're facing the same issue on-premise 6.5 latest SP with acs-commons 6.6.4 while developing a new set of edtitable templates based on core component page v3.

@janstettler
Copy link

problem is the /apps/acs-commons/touchui-widgets/icon-picker/source/icon-picker.js
In this file the jquery is not used correctly
I changed the content from

$(document).on('cui-contentloaded.data-api', function (e) {
    $('[data-init~=graphiciconselect] > select').fontIconPicker({
        'theme' : 'fip-corala'
    });
});

to

(function($, $document){
  $(document).on('cui-contentloaded.data-api', function (e) {
      $('[data-init~=graphiciconselect] > select').fontIconPicker({
          'theme' : 'fip-corala'
      });
  });
}(jQuery, jQuery(document)));

like in other acs-commons files

then it worked for my problems in AEM

@senn
Copy link
Contributor

senn commented Feb 11, 2025

Also having this issue with on-prem 6.5.22.
Solution above seems to work...

Can this be fixed and released asap?

@CursedSecret
Copy link

I'm also having this issue with on-prem 6.5.22.
The fix above works for me.

Can this solution be implemented and released asap?

senn pushed a commit to senn/acs-aem-commons that referenced this issue Feb 11, 2025
@senn senn linked a pull request Feb 11, 2025 that will close this issue
senn pushed a commit to senn/acs-aem-commons that referenced this issue Feb 11, 2025
@senn
Copy link
Contributor

senn commented Feb 11, 2025

I provided a PR which is just the solution above...

senn pushed a commit to senn/acs-aem-commons that referenced this issue Feb 12, 2025
senn pushed a commit to senn/acs-aem-commons that referenced this issue Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants