nodereference field length

aeronox - January 13, 2008 - 09:54
Project:Enhanced Nodereference Autocomplete Widget
Version:5.x-1.2
Component:Code
Category:feature request
Priority:normal
Assigned:Josh Benner
Status:closed
Description

the nodereference input is limited to 128 characters - as this module allow multiple input, i would expect this number increased.

#1

Josh Benner - January 13, 2008 - 16:49

Good point. I'll change to 255.

#2

Josh Benner - January 13, 2008 - 17:21
Assigned to:Anonymous» Josh Benner
Status:active» fixed

Increased to 255

#3

aeronox - January 14, 2008 - 23:43

Nodes with long titles would quickly exceed that limit.

Perhaps an option to..

1) Show title in dropdown-popup list.
2) Shorten to [nid] in field.
3) When re-editing, do not load node titles.

It has potential to get anoying to update, though... not knowing which node you want to de-reference.

#4

Anonymous (not verified) - January 28, 2008 - 23:54
Status:fixed» closed

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

#5

Undeleterious - February 4, 2008 - 15:00
Status:closed» active

This limit is still restrictive. I have adjusted this in the code, but reccommend a 'max length' value in the widget settings when creating the field.

#6

Josh Benner - February 11, 2008 - 22:28
Category:bug report» feature request

I agree. I'll look into adding a widget option.

#7

Josh Benner - February 11, 2008 - 22:46
Version:5.x-1.0» 5.x-1.2
Status:active» closed

5.x-1.2 now features configurable field maximum length as a widget setting.

#8

Gidgidonihah - May 19, 2008 - 18:06
Status:closed» active

Not fixed.

Despite a setting of 255 (the default maxlength) on the widget setting, when something is submitted, I still receive the error. See attached screenshots.

AttachmentSize
error.jpg 35.83 KB

#9

Josh Benner - May 19, 2008 - 18:28
Status:active» postponed (maintainer needs more info)

You'll have to provide more information. I am able to set the field size to 255 with no problem and no errors when saving a node with more than 128 chars in the field.

Check versions of CCK, Nodreference, and nr_autocomplete and report here. Give any detail you can.

#10

Gidgidonihah - May 19, 2008 - 19:03

I was afraid I'd need more detail :p

But if it works for you, maybe I have an issue with my install since I came to this module because I was getting that error on the standard nodereference autocomplete.

Everything is the latest available official release. Might be an issue with another module that is installed?
I would love to give you more information, but I'm not really sure what to give.

I'll attach a list of installed modules. I figured it's the easiest way to see the information since it essentially duplicates my modules page. It's in OpenOffice Spreadsheet format, so if you can't open it, I can change the file format.

Anything else you'd like to know?

AttachmentSize
Modules.ods 14.72 KB

#11

Josh Benner - May 19, 2008 - 19:14

Do you have multiple values enabled for the nodereference field?

Are you using any custom form validation code in custom modules?

Looks like you have a couple custom modules that are interacting with CCK and possibly node forms -- so I'm not sure what they're doing.

If you think it may be another module interfering, I'd make a new local copy of the site and disable modules one by one, testing each time if the error persists. Alternately, if you're familiar with real-time debugging, stopping the execution near the validation stage and stepping through might help you uncover exactly what's going on.

I'm not really able to recreate your environment other than the basics -- and in my case, things seem to work.

#12

Gidgidonihah - May 19, 2008 - 19:48

No, I don't have multiple values.

The custom modules I have are for dependent select lists as described by moofie: http://blue.live4all.co.il/~mooffie/cms/node/15

Since it apparently is an issue on my end, I'll do some deeper research and get back with the results.

#13

Josh Benner - May 19, 2008 - 20:02
Status:postponed (maintainer needs more info)» by design

Okay, for single values it limits to 128 chars, as that is what node titles are limited to. This is also why you will have a limit of 128 chars with the autocomplete included with nodereference. While the enhanced autocomplete field will work with single value, adding any functionality above the autocomplete for single values that is included with the nodereference module is out of scope for this module.

#14

Josh Benner - May 19, 2008 - 20:03
Status:by design» closed

#15

Gidgidonihah - May 20, 2008 - 17:16

Oh, well that makes sense. I should have realized that i guess. I just assumed it hadn't before because what is not working now was working in the past, but I think that's a separate issue that I've figured out.

Unfortunately, that's a problem for me since node titles are not, in fact, strictly limited to 128 characters. That can be changed. I purposefully changed that by updating the database structure and using automatic node titles.
This is also possible using the maxlength module.

As such, I don't think it should default to 128 even for single values.
Do you think you could roll that change, or will I need to patch my install?
Thanks for your help.

#16

Josh Benner - May 20, 2008 - 17:18

If you roll a patch, I'd be more than happy to integrate it into the next release.

#17

Gidgidonihah - May 20, 2008 - 20:45

Well I just took a second to look at the code. About the easiest patch I've ever done.

AttachmentSize
nr_ac.patch 560 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.