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

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/

hello thank you for your answer actually i defined a new field type to have it available in the cms do i need to define uploads for that new field type? i copied the WYSIWYG field code and renamed it to something else

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
PHP Programmer
interactivetools.com