When I use message perform CCK Fullname
Cannot use a scalar value as an array in ..\includes\form.inc on line 2254

What should I do?

Thank you

CommentFileSizeAuthor
#3 scalar-attributes-parameter.patch1.67 KBalan d.

Comments

rconstantine’s picture

You have not given enough information for anyone to know what you are talking about.

alan d.’s picture

Status: Active » Needs work

Possibly on line 365, reformatted to make it easier to read:

<?php
'#attributes' => (!empty($field['max_length_middle_legal']) && $field['middle_initial'] != 1) 
      ? array('class' => 'cck_fullname_middle', 'style' => "width:". $field['max_length_middle_legal']*0.7 ."em;") 
      : (!empty($field['middle_initial']) && $field['middle_initial'] == 1 
          ? array('class' => 'cck_fullname_middle', 'style' => "width: 1em;") 
          : 25),
?>

The last value is a scalar rather than an array. Not sure on the internals yet, but this is looking like the most likely cause for this error.

Maybe

<?php
'#attributes' => (!empty($field['max_length_middle_legal']) && $field['middle_initial'] != 1) 
      ? array('class' => 'cck_fullname_middle', 'style' => "width:". $field['max_length_middle_legal']*0.7 ."em;") 
      : (!empty($field['middle_initial']) && $field['middle_initial'] == 1 
          ? array('class' => 'cck_fullname_middle', 'style' => "width: 1em;") 
          : array()),
?>
alan d.’s picture

StatusFileSize
new1.67 KB

@Peloose Can you try the patch, or if not, supply the exact details that you used to create the middle name or initial field. Thx.

Peloose’s picture

@rconstantine, What information must I provide?
We are sorry because I was just learning to use Drupal and PHP

Peloose’s picture

Ok, I'll try it another time. To remove it, I uninstall this module. Sorry, I do not know what to do. After much consideration I resolved to use the module namefield while waiting for updates that accommodate taxonomy.
But do not worry, I will still try to patch that you create and report the results.
thanks

alan d.’s picture

The patch should resolve the error, but it would be good if Ray has a look to ensure that it is not lacking any functionality. I think that this would be only be formatting issues if anything.

rconstantine’s picture

@peloose - no problem. Just try to give too much information rather than short snippets with no context.

In any case, the patch is correct.

smscotten’s picture

Status: Needs work » Needs review

Patch in #3 resolved the issue for me. Switching status to needs review rather than needs work.

Renee S’s picture

The patch in #922992: Middlename / remove middle initial TODO fixes this issue, and a few other things too.

tim foley’s picture

Was having the same issue listed above. Applied patch and seem to have full functionality. Thanks - Tim

alan d.’s picture

Status: Needs review » Reviewed & tested by the community

From the feedback, this looks good to go :)

alan d.’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Closed (outdated)

Closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.