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...

CommentFileSizeAuthor
#6 Better-ISBN-Help-Text-1869544-6b.patch2.46 KBmgifford

Comments

jhodgdon’s picture

Or maybe a validation step that says "You entered too many characters"?

mgifford’s picture

Priority: Normal » Minor
Issue summary: View changes

I 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

  • ISBN-10 has a text size of 10 characters [Note: The ISBN-10 is also the Amazon ID (ASIN) for books. It is used to build the Amazon purchase links.]
  • ISBN-13 has a text size of 14 characters [All books have an ISBN-13, which is the new standard for book identification.]

The help text is in []. It isn't consistent which is annoying.

  • ISBN-10 has a text size of 10 characters [The ISBN-10 is also the Amazon ID (ASIN) for books. It is used to build the Amazon purchase links with Drupal Association's Amazon affiliate (linked by the text Order from Amazon.com). This should not include any hyphens or spaces (ie. 0596515804).]]
  • ISBN-13 has a text size of 14 characters [All books have an ISBN-13, which is the standard for book identification. This can include a hyphen but not any spaces (ie. 978-1449392611).]

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.

jhodgdon’s picture

That 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".

mgifford’s picture

Status: Active » Needs review
Issue tags: +isbn

Ok, so like this:

  • ISBN-10 has a text size of 10 characters [The ISBN-10 is also the Amazon ID (ASIN) for books. It is used to build the Amazon purchase links with Drupal Association's Amazon affiliate (linked by the text Order from Amazon.com). This should not include any hyphens or spaces (For example: 0596515804).]
  • ISBN-13 has a text size of 14 characters [All books have an ISBN-13, which is the standard for book identification. This can include a hyphen but not any spaces (For example: 978-1449392611).]

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?

jhodgdon’s picture

Status: Needs review » Active

There 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

mgifford’s picture

Status: Active » Needs review
StatusFileSize
new2.46 KB

Here'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.

drumm’s picture

Status: Needs review » Needs work

Features 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.

mgifford’s picture

This 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.

drumm’s picture

You can either:

  • Export to a different location, not overwriting the site's active module. Then upload the tgz here, or a diff against a clean Git checkout.
  • Use a different dev site, without a copy of drupalorg in sites/default.
  • Request a new dev site. (Probably not for this issue, not worth a whole dev site for a little string change.)
mgifford’s picture

I'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.