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.6 ee('CP/FilePicker') produced dialog produces a console error when clicking "upload" if no file field is present #2412

Closed
tjdraper opened this issue Sep 27, 2022 · 6 comments · Fixed by #2413 or #2493

Comments

@tjdraper
Copy link

In my field type, Ansel, I use a native file picker dialog. And we recently fixed a related bug, and I've opened a new related bug.

In this bug, if a native file field is not present in the field set for the channel, clicking the upload button on the dialog will result in a console error, and nothing happens.

image

If a native file field is present in the channel's fields, the upload button works as expected.

@tjdraper
Copy link
Author

Wait, the linked PR says it’s removing the ability to upload in the modal. But that ability has always been available until now and I’m specifically enabling it in my call to CP/FilePicker. So is removing the ability the correct thing to do?

@litzinger
Copy link
Contributor

I'm with TJ on this one... why remove the option to upload though the modal? That functionality has been in place since... EE 3?

@Yulyaswan
Copy link
Collaborator

Looks like I mixed some parts
Working on it now.
We will leave functionality how it should be, with the Upload button

@mvdesign
Copy link

mvdesign commented Oct 4, 2022

I guess it's probably self-evident, but I'm getting this through the native RTE CKEditor image/upload tool, too.

bryannielsen added a commit that referenced this issue Oct 24, 2022
…l-issue-EECORE-2138

Resolved #2411, #2412 where filepicker was not always working outside of File field
@tjdraper
Copy link
Author

tjdraper commented Nov 1, 2022

@bryannielsen @Yulyaswan As of ExpressionEngine 7.2.0 DP 14, which, as far as I can tell, has the commits referenced in the MR that fix this, I'm still seeing this same behavior. I have to have a native file field on the entry page in order for the file picker to behave correctly.

If these commits aren't in DP 14 please let me know. I did a compare against the tag and it looked like they were in there.

intoeetive added a commit that referenced this issue Nov 1, 2022
bryannielsen added a commit that referenced this issue Nov 2, 2022
…-no-file-field

Resolved #2412 where using File Picker without File field was causing JavaScript error
@bryannielsen
Copy link
Contributor

@tjdraper sorry for the misunderstanding, we were testing using a textarea with file picker and not the filepicker code snippet you had in #2390

I tested the latest fix from Yuri with your code and confirmed the bug as well as the fix. This fix should be in the next DP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment