wysiwyg Uploads

4 posts by 3 authors in: Forums > CMS Builder
Last Post: September 18, 2019   (RSS)

By moh3 - September 4, 2019 - edited: September 4, 2019

Dear CMS builder i'm trying to enable uploads for an wysiwyg editor but i get an error Field 'test' isn't an upload field! although i check the box to enable the uploads can you please help

thanks

By Damon - September 6, 2019

Hi,

If you are getting this error:
Field 'test' isn't an upload field!
when trying to upload in the WYSIWYG editor, uploads are not enabled. 

Edit that Section Editor, modify the test field that is a WYSIWYG field, check the box to Allow Uploads and Save.

This will allow uploads.

If this doesn't work, send in a Support Request and we can take a look:
https://www.interactivetools.com/support/request/?priority=free

Thanks!

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By daniel - September 18, 2019

Hi moh3,

Defining entirely new field types can be a complex task, though I can point you at the location of your specific error. In /cmsb/lib/menus/default/uploadForm_functions.php there is a line:

  if ($schema[$fieldname]['type'] != 'upload' && $schema[$fieldname]['type'] != 'wysiwyg') { die("Field '" .htmlencode($fieldname). "' isn't an upload field!"); }

Which would need to be modified to include your new field type, something like this:

  if ($schema[$fieldname]['type'] != 'upload' && $schema[$fieldname]['type'] != 'wysiwyg' && $schema[$fieldname]['type'] != 'newtype') { die("Field '" .htmlencode($fieldname). "' isn't an upload field!"); }

However, I can't guarantee that this will be the only roadblock you encounter; there may be other places in the code that require similar modifications. I'll also caution that making changes to core CMSB files like this isn't generally recommended, as it is difficult for us to support, and can be overwritten when upgrading.

If you can describe what you're trying to do with this new field, I can try to help think of an alternate solution - if you're interested!

Cheers,

Daniel
Technical Lead
interactivetools.com