Jump to content

"not ready to use" error of FieldtypeImage


didhavn
 Share

Recommended Posts

Hey all.

I am trying to create an image-field from API. It is working fine, but opening the page with the new image-field leads to the following error:

FieldtypeImage: Field "servicetype_image_1129" is not yet ready to use and needs to be configured.

For all other fields I am creating in this module (e.g. checkbox, textarea)...everything is working without errors.

This is my code to create the image-field:

$f_img = new Field();
$f_img->type  = $this->modules->get("FieldtypeImage");
$f_img->name  = 'servicetype_image_' . $page->id;
$f_img->label = $page->get('title')->getDefaultValue() . ' Service-Type Image';
$f_img->set('tags',$tag);
$f_img->set('icon',$icon);
$f_img->set('maxFiles', '1');
$f_img->set('noLang', 1);
$f_img->set('adminThumbs', 1);
$f_img->set("textformatters", array("TextformatterEntities"));
$f_img->save();

Anybody an idea what is causing the problem?

Thanks a lot in advance!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...