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

Usage on frontend #30

Open
JoryHogeveen opened this issue Feb 12, 2018 · 1 comment
Open

Usage on frontend #30

JoryHogeveen opened this issue Feb 12, 2018 · 1 comment

Comments

@JoryHogeveen
Copy link

Hi, I'm busy with a new field type for Pods that uses this icon picker. All works fine except for frontend forms.
Although the loader class doesn't support non-admin pages I did a workaround to enqueue all scripts etc.
All modal scripts etc. are also loaded so one would think the icon picker should work fine.

I get the following messages:

Uncaught TypeError: Cannot read property 'selectIcon' of undefined
    at HTMLDivElement.g (icon-picker.min.js?ver=0.5.0:1)
    at HTMLDocument.dispatch (jquery.js?ver=1.12.4:3)
    at HTMLDocument.r.handle (jquery.js?ver=1.12.4:3)
    at Object.trigger (jquery.js?ver=1.12.4:3)
    at Object.a.event.trigger (jquery-migrate.min.js?ver=1.4.1:2)
    at HTMLDivElement.<anonymous> (jquery.js?ver=1.12.4:3)
    at Function.each (jquery.js?ver=1.12.4:2)
    at a.fn.init.each (jquery.js?ver=1.12.4:2)
    at a.fn.init.trigger (jquery.js?ver=1.12.4:3)
    at icon-picker.min.js?ver=0.5.0:1

The error below is only when you click on Select icon

Uncaught TypeError: Cannot read property 'frameTitle' of undefined
    at n.initialize (icon-picker.min.js?ver=0.5.0:1)
    at n.e.View (backbone.min.js?ver=1.2.3:1)
    at n.constructor (wp-backbone.min.js?ver=4.9.3:1)
    at n.constructor (media-views.min.js?ver=4.9.3:1)
    at n [as constructor] (backbone.min.js?ver=1.2.3:1)
    at n [as constructor] (backbone.min.js?ver=1.2.3:1)
    at n [as constructor] (backbone.min.js?ver=1.2.3:1)
    at new n (backbone.min.js?ver=1.2.3:1)
    at e (icon-picker.min.js?ver=0.5.0:1)
    at HTMLAnchorElement.c (icon-picker.min.js?ver=0.5.0:1)
@JoryHogeveen
Copy link
Author

Found the issue.

Icon_Picker::init() is called on the wp_loaded action. When I change it to the init action it all works fine!

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

No branches or pull requests

1 participant