I just had a problem where I entered an ISBN 10/13 number with several hyphens in it and the fields for ISBN truncated the number down too far, cutting off the last few digits.
I think we should do one or more of the following:
a) Put in the help text/description for the fields that you should not include any hyphens
b) Remove hyphens from the fields before saving the values
c) Increase the minimum characters allowed in the field to include a few more
d) Add an example of an ISBN 10/13 number to the fields' help/description text
I had just copy/pasted the numbers from O'Reilly, which included I think extra characters and definitely the hyphens...
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | Better-ISBN-Help-Text-1869544-6b.patch | 2.46 KB | mgifford |
Comments
Comment #1
jhodgdonOr maybe a validation step that says "You entered too many characters"?
Comment #2
mgiffordI don't actually have access to this in the live environment but you're talking about /node/add/book-listing
In D7 this is defined by two content types /admin/structure/types/manage/book-listing/fields
The help text is in []. It isn't consistent which is annoying.
I don't think we have any validation, but I like the idea https://drupal.org/project/clientside_validation
I'm not sure we get enough books here to require it though.
Comment #3
jhodgdonThat help text looks OK, except instead of "ie." it should say "for example, ". This mistake is made a lot -- i.e. actually means "that is" not "for example" -- you can also use "e.g., " but I think it's preferable just to write out "for example".
Comment #4
mgiffordOk, so like this:
I was tempted to move this to Drupal.org content, but I guess it's more about just adjusting a content type.
Do we need someone to mark this RTBC?
Comment #5
jhodgdonThere is no patch yet to mark "needs review" or "RTBC".
I think your proposed text is OK... but there is an extra ] in the first one... actually, why have [] in there at all? And why does it need to be so wordy? How about making this much more concise:
ISBN-10 field help:
Maximum: 10 characters; omit hyphens and spaces. ISBN-10 is also the Amazon ID (ASIN) for books. Example: 0596515804
ISBN-13 field help:
Maximum: 14 characters; can have 1 hyphen, no spaces. Example: 978-1449392611
Comment #6
mgiffordHere's a patch. I just used the [] as a short form for the help text. I'm fine with the short text. It's a bit terse, but fine.
Comment #7
drummFeatures patches usually need to be made by changing the configuration in the UI, exporting, and using that to make the diff. For example, this patch doesn't cover the translatables at the bottom of drupalorg_book_listings.features.field.inc.
Comment #8
mgiffordThis is a lot of work for 2 help text changes that most folks will ever see.
Useful to know the process though for bigger changes.
Is there a better place for me to do this? If not, can I have write access?
[mgifford@devwww default]$ drush features-update drupalorg_book_taxonomies
Module appears to already exist in sites/default/modules/drupalorg/features/drupalorg_book_taxonomies
Do you really want to continue? (y/n): y
file_put_contents(sites/default/modules/drupalorg/features/drupalorg_book_taxonomies/drupalorg_book_taxonomies.features.taxonomy.inc): failed to open stream: Permission denied drush.inc:792 [warning]
file_put_contents(sites/default/modules/drupalorg/features/drupalorg_book_taxonomies/drupalorg_book_taxonomies.info): failed to open stream: Permission denied drush.inc:792 [warning]
file_put_contents(sites/default/modules/drupalorg/features/drupalorg_book_taxonomies/drupalorg_book_taxonomies.module): failed to open stream: Permission denied drush.inc:792 [warning]
Created module: drupalorg_book_taxonomies in sites/default/modules/drupalorg/features/drupalorg_book_taxonomies
I mentioned this on IRC (not sure if you got back to me or not @drumm) on a related issue.
Comment #9
drummYou can either:
Comment #10
mgiffordI'll come back to that for a deeper issue. I think it's a small handful of folks who even have access to this page to publish Book Listings. I'd be curious to know if there are more than 50 people who have access to it...
It seemed like an easy win so I thought I'd pitch in, but that's really too much effort for too small a gain.
That approach I can try to leverage elsewhere.