Media module: Error on insert media
@armababy not sure if I understand you completely.
I'm using the partial from the docs in the edit section.
'entityClass' => 'Modules\\\\Article\\\\Entities\\\\Article',
'entityId' => $article->id,
'zone' => 'coverimage'
The partials on the create page are from the create section:
@include('media::admin.fields.new-file-link-single', [ 'zone' => 'logo' ]) @include('media::admin.fields.new-file-link-single', [ 'zone' => 'header' ])
If you can you should change all partials to new
media::admin.fields.new-file-link-singleones like you have in create view.
Currently we forgot to back port new changes to old partials
If updating to new ones and use events is not for you, we wait for PR.
Documentation on edit view is a bit outdated on new method currently.
Basically you can use new partials in all your views and make 1 or 2 events that implements StoringMedia. You can use 1 event if no differences in code.
Ok, the new partial is also not really the solution, I'm able now to select an image, but it is not stored in the imageables table.
I hope that the back port will be available soon and the documentation will be updated as well.
@StanB Did you fire event on update method?
hmm, probably not.... I will check and fix it soon. I will let you know if it fixed it.
@StanB I'm currently using new partials on all views with 1 event.
Only thing is that it currently does not remove already attached media files, also does not update orders of multiple form.
Issue raised @github#214
it can detach items too as it is explained in the docs.
There is also no need to fire an event on update as that is not used.
I am able to reproduce the error on edit views indeed.
@motchju must have forgotten about those while doing he PR
I've applied changes from @motchju from here to the
file-link-multiplepartials . But in general.blade.php
window.opener.singleis still undefined, I'm not sure where @motchju you set that ?
we have discuss via slack, a new version that will fixed this behavior will arrive soon
This has been fixed now on version 1.25.5.
Please test and confirm
Thank you, version 1.25.5 is working correctly. Also on the preview environment.
Thanks for the support!