0

I am using the following:

  • Drupal 8.6
  • Media
  • Media Library
  • Media Entity Browser 8.x-2.0-alpha1
  • Inline Entity Form 8.x-1.0-rc1
  • Entity Browser 8.x-2.1
  • Entity Embed 8.x-1.0-beta2

Mainly to upload documents. I have updated the media type: file [/admin/structure/media/manage/file/fields] to include an additional text area 'abstract'.

I have two problems.

1 In a WYSIWYG CKEditor field: I have added the default Media Entity Browser. This works fine for added existing media, but upload does not work. On the upload tab, I can upload a file, which shows as: icon - filename - remove button.

Click on the select media button and I get the following error: 1 error has been found: Choose a file, with a link to: /entity-browser/iframe/media_entity_browser?uuid=7a535c60a92fbe357951d3bb7440bc97bf8d9554&original_path=/entity-embed/dialog/full_html/media_entity_embed#edit-widget

which does nothing if clicked.

If I look at /admin/content/files, I can see the file I have just uploaded. But there is no corresponding media item: /admin/content/media

Any ideas how to get the media browser file upload to work?

2. On the content type I have and entity reference field, set to media and uses the widget: media library. I can add existing and upload new files no problem, BUT, when I upload a new file, I only have the option to edit the file name, not add the custom abstract textarea. I have the abstract textarea form element added to the media item in /admin/structure/media/manage/file/form-display which shows if you add media items by add media -> file /media/add/file

thank you for your help.

  • Can you post error logs from Drupal recent log messages or from your server logs" – Ismail Cherri Mar 9 at 20:06
  • For #2, you need to make sure you have the field added to the correct form display. I think media/add/file uses the "default" form display, while the media library uses a different form display, browser or library (I can't remember). – sonfd Mar 10 at 13:12
  • Hi @sonfd - fantastic, thank you. There is a 'media library' form display option: /admin/structure/media/manage/file/form-display/media_library aded the textfiled there and now I can add the abstract. Thank you. – ice70 Mar 11 at 7:10
  • Hi @IsmailCherri - I cleared both my apache log and drupal log, tried an upload through the Media Entity Browser pop up window and no errors were shown in either log. The drupal error message in the pop up window still displayed and the file did not upload. I also checked the browser [chrome] console, which was also clear. When I uploaded the file, I just get a file field to select a local file with no option to set the name - or to add the custom abstract field I now get in the media library 'add media' form fixed in #2. – ice70 Mar 11 at 7:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.