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

Folder field on filepicker seems broken #1465

Closed
Lazza opened this issue Jun 8, 2018 · 9 comments
Closed

Folder field on filepicker seems broken #1465

Lazza opened this issue Jun 8, 2018 · 9 comments
Assignees
Labels

Comments

@Lazza
Copy link

Lazza commented Jun 8, 2018

I have updated to 1.8.3 and now the folder field in my custom blueprint does not seem to work anymore:

header.brands_1:
  type: filepicker
  folder: 'theme@:/images/brands'
  preview_images: true
  toggleable: true

In previous versions, it used to list files that are in my theme folder, now it shows files in the page. How can I overcome this problem?

Thank you.

@w00fz w00fz assigned mahagr and unassigned w00fz Jun 8, 2018
@pamtbaau
Copy link

pamtbaau commented Jun 13, 2018

Same here. Filepicker in blueprints.yaml for theme settings works fine. Same field definition (apart from fieldname) in blueprints/default.yaml does not show any image. Also page@:/images in blueprints/default.yaml does not work.

headerImage:
  type: filepicker
  folder: 'theme@:/images'
  label: Select image as header
  preview_images: true
  accept:
    - .png
    - .jpg

Update 1:
When adding an image next to the page file, it is seen by the filepicker, but still ignoring folder: 'theme@:/images'

Update 2:
Rollbacked admin plugin step by step. Filepicker stopped working as of commit [ee8e488] 'Added custom object support for filepicker field'.

@mahagr
Copy link
Member

mahagr commented Jun 14, 2018

@Lazza @pamtbaau I fixed the issue, if you need the fix right away, please see my fix. :)

@Lazza
Copy link
Author

Lazza commented Jun 16, 2018

@mahagr unfortunately it does not seem to work properly. Is there any debug info I should provide?

@pamtbaau
Copy link

pamtbaau commented Jun 17, 2018

@Lazza The fix has not yet been merged into the master branch.
When I clone the develop branch into my user/plugins/admin folder, it works fine for me.

@Lazza
Copy link
Author

Lazza commented Jun 20, 2018

@pamtbaau I will try... but why is the commit mentioned in the release notes for 1.8.4 then? 😅

Edit: it works with the developer branch.

@LoveYouFyi
Copy link

Has this fix been applied to whichever branch is being used when updating the plugin from the admin panel? The 'folder' field is not working for me. I'm using all the latest codebase.

@LoveYouFyi
Copy link

FYI -- Tested Developer branch as well, and not able to get it to work. Still shows the images directly within the @self page instead of images from any other directory specified in 'folder'

.text_image__image:
type: filepicker
folder: 'theme@:/images/pages'
preview_images: true
acccept:
- .png
- .jpg
- .gif
- .svg

@mahagr mahagr reopened this Feb 15, 2019
@mahagr mahagr removed the fixed label Feb 15, 2019
@mahagr
Copy link
Member

mahagr commented Dec 13, 2019

This works just fine in Admin 1.9.12 for me.

@mahagr mahagr closed this as completed Dec 13, 2019
@mahagr
Copy link
Member

mahagr commented Dec 13, 2019

Used this page blueprint to test the issue:

extends@: default

form:
  fields:
    tabs:
      fields:
        image:
          type: tab
          title: Image
          fields:
            header.text_image__image:
              type: filepicker
              label: Image
              folder: 'theme@:/images'
              preview_images: true
              acccept:
                - .png
                - .jpg
                - .gif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants