Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the README and in the module's help, it uses $entity->field_product_price[LANGUAGE_NONE][0]['value']
, when it should be using field_get_items().
This would also clear up issues like #1022192: Undefined offset: 0 when using $entity->field_name[0]['value'].
Comments
Comment #1
colanAdding tag.
Comment #2
colanThe web documentation has been updated. The README was removed in c3876eb.
Comment #3
tim.plunkettRemoving the README is a terrible way to "fix" this problem. READMEs are very important to have.
Comment #4
colanNot if it's redundant information that already exists in the documentation on the web. Click on the documentation link from the main project page to find everything. There's really no point duplicating data everywhere; it's better to have one authoritative source.
You'll note that field_get_items() is used in the documentation over at http://drupal.org/node/126522.
Comment #5
tim.plunkettUnder the "minimum requirements" for maintaining the documentation of a module:
Comment #6
colanAs I didn't see any justification for this, I started a more general discussion over at https://drupal.org/node/955134#comment-5552154. Please stand by.
Comment #7
Cablestein CreditAttribution: Cablestein commentedI am tending to not agree with that notion.
I always make use of both readme's and web doc's depending on situation & convenience. Sometimes the readme is right under my cursor so I open it and/or I quickly scan the file preview of Explorer without having to open the file. Sometimes I'm on the website already and it's more convenient to click "Documentation" rather than trying to navigate to the module folder. If it means duplication and a bit more clutter, I don't care because I think for a very long time I will still work this way.
Also sometimes a website or module or whatever may be DOWN or edited or changed in some fashion after the fact. I don't want to have to worry about that and feel safe knowing some information is local and unchanging.
One more thing, personally I do not have an internet connection at home (going on 4 years now), but the odd time I bring module zip's on a USB onto my laptop for local server work. Readme files are very handy in that situation =P.
For whatever reason, readme's are usually clearer =P.