Problem/Motivation
Error: Cannot use object of type Drupal\Core\Entity\Entity\EntityFormDisplay as array in Drupal\filefield_sources\Controller\ImceController->page() (line 45 of modules/contrib/filefield_sources/src/Controller/ImceController.php).
Steps to reproduce
After enabling the module, at vanilla Drupal, access admin/structure/types/manage/article/form-display, click on the gear icon or "Widget Settings" of the image field & under "FILE SOURCES" enable "IMCE file browser" & save the configuration.
Proposed resolution
https://git.drupalcode.org/project/filefield_sources/-/blob/8.x-1.x/src/... code here should call the specific component, instead of the whole form display.
Remaining tasks
Provide a patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | file field sources.png | 30.66 KB | vasyok |
| #2 | 3248202-2.patch | 895 bytes | rishi.kulshreshtha |
Comments
Comment #2
rishi.kulshreshthaComment #3
alayham commentedTested the patch in #2 and it solved the problem.
using 9.2.8 and the dev version.
Comment #4
vasyok commentedPatch worked if cheecked :
IMCE file browser settings:
Full: Browsable directories are defined by IMCE configuration profiles. File operations are allowed.
Same result obtained, when we use:
Allow users to select files from Imce File Manager for this field. - ON
Enabled sources: IMCE file browser - OFF
Comment #5
aiphesHello,
Facing the same on D9.5.3 + filefield_sources versions : * 1.x-dev, but git provide 8.x-1.0-alpha5 with:
Do I need to patch ?
Thanks
Comment #6
rschwab commented+1 for RTBC. This fixes the error. Also changing to 2.x-dev to target D10, though this issue does still exist on the 8.x branch.
Comment #7
mlncn commentedThanks all! Sorry about the delay.