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

7.1.5 ee('CP/FilePicker') produced button throw's a JavaScript exception: Uncaught ReferenceError: FileField is not defined #2390

Closed
tjdraper opened this issue Sep 14, 2022 · 0 comments · Fixed by #2391
Labels
Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.

Comments

@tjdraper
Copy link

In my field type, I use a native file picker dialog, which I have done since EE 3 with ee('CP/FilePicker') However, in EE 7.1.5, this appears to be broken as the JavaScript appears to be looking for a FileField? I don't know, it's hard to tell because it's minified JS and I find debugging JS I didn't write to be hard to debug in any event.

Here’s my code to produce the file picker link:

$picker = ee('CP/FilePicker')->make(4);

$link = $picker->getLink('Select existing image')
    ->enableFilters()
    ->enableUploads()
    ->asList()
    ->render();

That code works in EE 6 and previous but fails in EE 7:

image

Here it is working in EE 6:

image

If I need to do something different in EE 7 let me know, but since the CP/FilePicker still exists I would expect it to still work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.
Projects
None yet
2 participants