Hi,

When I create, add or edit a cck field (text, number... every kind of field) and click on "save", I get the following error message:

The default value PHP code returned an incorrect value.
Expected format:

return array(
  0 => array('value' => Wert für value, 'format' => Wert für format),
  // Normalerweise würde man hier aufhören. Soll der ‚Standardwert‘
  // mehrwertig sein, können weitere Werte eingetragen werden:
  1 => array('value' => Wert für value, 'format' => Wert für format),
  2 => ...
);

Returned value: 

I should mention that I've installed the cck content taxonomy formatter module. I'm not 100% sure - that's way I'm posting it here - but it may be that I get this error message since I have installed this module. Now it's disabled and deleted. Nevertheless I still receive the error messages. I can save the fields but after saving, the system don't return to the content type field overview display.

I use Drupal 6.9 with the following CCK modules:
Content Field Privacy :: 6.x-1.x-dev (installed after error message)
Email :: 6.x-1.1
emfield :: 6.x-1.x-dev (one of the first modules I have installed and never had problems with this yet)
filefield :: 6.x-3.0-alpha7 (installed after error message)
imagefield :: 6.x-3.0-alpha4 (never had problems with this module)
Link :: 6.x-2.5 (never had problems with this module)
View field :: 6.x-1.x-dev (never had problems with this module)

Please let me know if you need more information.

Thanks in advance for your help.

Regards,
Stefan

Comments

jcmartinez’s picture

Status: Active » Fixed

I see this issue is more than a year old and the author probably solved it already but if you are here is because you are having the same issue.
Here is the solution:
This error happens when you are creating or editing a CCK field that allows you using PHP code to provide a default value or to control additional advanced features. If you are using a WYSIWYG editor and the editor is active on the box where PHP code is supposed to be entered, then it is likely that you get this error because the editor may be placing some HTML code into the box without you knowing about it.
Try disabling the WYSIWYG on that box and delete any HTML tag (br, p, div). This should solve your problem.

Status: Fixed » Closed (fixed)
Issue tags: -CCK, -field, -incorrect value

Automatically closed -- issue fixed for 2 weeks with no activity.