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 is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#115236 Select PDF files in a custom field error

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Saturday, 11 November 2023 14:58 GMT

Seppy
Hello

I have installed the latest version of JCE Editor.

Before I did the update, I was able to select PDF files in a custom field.
I was able to do this because I added "pdf" to the browser.php file.

$map = array(
'images' => 'jpg,jpeg,png,apng,gif,webp,avif,pdf',
'media' => 'avi,wmv,wm,asf,asx,wmx,wvx,mov,qt,mpg,mpeg,m4a,m4v,swf,dcr,rm,ra,ram,divx,mp4,ogv,ogg,webm,flv,f4v,mp3,ogg,wav,xap,pdf',
.....
'files' => $filetypes,
);

Unfortunately, since the update to the new version, I can no longer select the PDF files.
If I also add "pdf" to this file, I get an "Invalid Plugin" error when opening the JCE Editor in the custom field.

How can I fix this so that I can select the PDF files again?

Ryan
You don't need to edit the browser.php file, as the mediatype will default to "files" which includes "pdf". You can also set a "mediatype" attribute in the xml for the media field, eg:

<field
name="my_media"
type="media"
mediatype="files"
/>

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.