Middle name is not available unless required

bomarmonk - January 3, 2008 - 07:54
Project:Fullname field for CCK
Version:5.x-1.5
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

It looks like you can have an optional middle initial, but if you want a middle name available, you have to make this part of the name required, otherwise you just have a middle initial available. Using Drupal 5.5, PHP 5, and MySQL 5.

#1

rconstantine - January 3, 2008 - 17:05
Category:bug report» support request

Huh? I didn't quite follow what you said. Plus, I use middle names and never require them in my installs, so I'm not sure what problem you're having. For middle names (not initials) just uncheck the middle initial box and the check the middle name as used but not required. It sounds like you just didn't understand the settings, so unless you prove otherwise, I'm switching this to a support request.

#2

bomarmonk - January 4, 2008 - 01:34

Sorry if my brief bug report was unclear. Let me explain (and I'll include pretty pictures to make the issue clearer). I have a CCK content type in Drupal 5.5 that uses the full name field as its title. I added the full name field after several nodes were already created using the content type and I think I originally had the full name to "use middle initial only." After realizing that I wanted to have the full middle name be an option, I unchecked this box on the settings page for my CCK content type. I saved these settings and made sure that the "legal middle" under "required parts" was not checked (again, I wanted the middle name to be optional). After saving these settings (see screenshot), my content form for this CCK type will only show the middle initial (see screenshot). However, if I go back to "required parts" and require "legal middle," the full middle name input field shows up on the edit form. Odd. I doubt this is the intended behavior of this module, but you are welcome to file it as a support request if you want to (although, I think the settings are rather user friendly). I am seriously not trying to waste your time, rather, I am trying to help you make your module work more effectively. If you would like, please ask, and I can provide any additional information that might help you resolve this. Maybe it is something peculiar to my situation; I am using the full name field with the automatic node title module. Other than this, I'm not sure what would be making my case a special situation...

AttachmentSize
full_name_form.jpg 39.62 KB
full_name-settings.jpg 62.43 KB

#3

rconstantine - January 4, 2008 - 04:54

Oh, I see. What appears to be the problem is the note under the "Use middle initial only?" checkbox. Note that it says to set it only once. Depending on your point of view, this is either a CCK limitation, or laziness on my part. CCK does not want to update tables and columns for which it otherwise takes responsibility. There are several instances that make me pull my hair out because on the one hand CCK manages the tables, and on the other it doesn't. This is one of those cases. I could do a table alter every time that checkbox is changed, but that just doesn't seem like a good idea to me.

So the preferred procedure for changing your mind about that checkbox at the moment is to take your site off line, delete that field from that node type, then create a new field (you should be able to reuse the name just fine, though I'm not sure) for that node type with the proper settings. Thanks for the screen shots. They always help.

Your other alternative is to manually adjust your database columns for your middle names using phpmyadmin or similar interface (or command line) tool.

Does that make sense? Originally, the column was set to varchar(1) when you used initials. Nothing updated that. If you don't want to set a length, change it to longtext (IIRC), otherwise change it to varchar(XX) where XX is the desired length.

#4

bomarmonk - January 5, 2008 - 08:56

I tried manually altering the table, but for some reason this did not work. I did find, I think, an easy way to allow the middle name after it was initially set as initial only: go to the options for "legal name maximum field length" and change the "1" in the middle name settings back to a blank. Voila! It seems simple enough, although that checkbox seems misleading. Maybe the checkbox should simply be removed and those wanting the initial only can set this in the "legal name maximum field length" area. Thanks again for your help.

#5

rconstantine - January 5, 2008 - 09:15
Status:active» fixed

I'll take that under advisement. It seems I had a good reason for making them distinct at one point. I'll have to see if I left myself any clues.

#6

Anonymous - January 19, 2008 - 09:22
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.