You need to be logged in to post in the forum - Log In
An active JCE Pro Subscription is required to post in the forum - Buy a Subscription
- Support
- Forum
- JCE Editor
- Mediatype files not working anymore
Support is currently Online
Official support hours:
Monday To Friday
From 09:00 To 17:00 Europe/London (BST)
From 09:00 To 17:00 Europe/London (BST)
Hello,
I am using MediaJCE field in my custom form as follows:
This was functional some times ago, however now, in version 2.9.5 (not sure since which version this happened), this will open just images browser.
I I check the generated code data url seems to be generated correctly with mediatype=files
However if I check network panel in chrome, the real URL called is with mediatype=images
Is there anything I need to change in my XML, or is this a bug?
thank you in advance
Pavel
I am using MediaJCE field in my custom form as follows:
<field name="filename" type="mediajce" mediatype="files" label="Choose file" />
This was functional some times ago, however now, in version 2.9.5 (not sure since which version this happened), this will open just images browser.
I I check the generated code data url seems to be generated correctly with mediatype=files
data-url="index.php?option=com_jce&task=plugin.display&plugin=browser&standalone=1&client=1&element=jform_n3tfields__atachments__atachments0__filename&mediatype=files&context=22&fieldid={field-media-id}&ismoo=0&folder=some-folder"
However if I check network panel in chrome, the real URL called is with mediatype=images
index.php?option=com_jce&task=plugin.display&plugin=browser&standalone=1&client=1&element=jform_n3tfields__atachments__atachments0__filename&converted=1&mediatype=images&context=10029
Is there anything I need to change in my XML, or is this a bug?
thank you in advance
Pavel
Hi Ryan,
I tried to prepare some example for you, and seems I found reason - the field is used within subform like this
if used standalone
It works fine, but in subform it is not working correctly.
Pavel
I tried to prepare some example for you, and seems I found reason - the field is used within subform like this
<fieldset name="attachments" label="Attachments">
<field name="atachments" type="subform" multiple="true" layout="joomla.form.field.subform.repeatable-table" label="Attachments">
<form>
<field name="title" type="text" label="Title" />
<field name="filename" type="mediajce" mediatype="files" label="Filename" />
</form>
</field>
</fieldset>
if used standalone
<fieldset name="attachments" label="Attachments">
<field name="test" type="mediajce" mediatype="files" label="Test" />
</fieldset>
It works fine, but in subform it is not working correctly.
Pavel
Hi Ryan,
I made further investigation, and the issue was introduced in 2.9.4. Specifically in JS file /plugins/system/jce/js/media.js.
If I copy this file from 2.9.3 over 2.9.5, selection works properly.
There is new function introduced in this file, "updateMediaUrl" targeting subforms. In my case, it changes working data-uri
with simplified one
This causes parameter mediatype to diseappear, so only images are displayed.
Pavel
I made further investigation, and the issue was introduced in 2.9.4. Specifically in JS file /plugins/system/jce/js/media.js.
If I copy this file from 2.9.3 over 2.9.5, selection works properly.
There is new function introduced in this file, "updateMediaUrl" targeting subforms. In my case, it changes working data-uri
index.php?option=com_jce&task=plugin.display&plugin=browser&standalone=1&294969581b23b067c08b297f015b88ce=1&client=1&element=jform_n3tfields__atachments__atachments0__filename&mediatype=files&context=22&fieldid={field-media-id}&ismoo=0&folder=sici-stroje/emily
with simplified one
index.php?option=com_jce&task=mediafield.display&fieldid=jform_n3tfields__atachments__atachments0__filename
This causes parameter mediatype to diseappear, so only images are displayed.
Pavel
Please try JCE Pro 2.9.6 RC - https://www.joomlacontenteditor.net/downloads/editor/pro/development
Just because you're not paranoid doesn't mean everybody isn't out to get you.
I still have this issue, in the network inspector I see that the 'files' (nor media) is not transferred correctly to the mediatype parameter. Instead I see mediatype=undefined in the request that gets the files from a certain directory. I use 2.9.6 pro and cleared browser cache (to get the right media.js which seems to be the culprit).
Edit: I installed 2.9.7 beta 7 and it works now.
Edit: I installed 2.9.7 beta 7 and it works now.
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!