[documentation] [Documentation bug] node_example_view doesn't return $node as it should

lyricnz drupal-docs at drupal.org
Sun Aug 27 02:56:37 UTC 2006


Issue status update for 
http://drupal.org/node/80803
Post a follow up: 
http://drupal.org/project/comments/add/80803

 Project:      Documentation
 Version:      <none>
 Component:    Documentation in CVS
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  lyricnz
 Updated by:   lyricnz
 Status:       active

I've updated node_example.module and submitted as
http://drupal.org/node/80894


But that's not related to this issue, which is about
http://api.drupal.org/api/head/function/node_example_view being
out-of-date (compared to CVS head, and the converting-to-4.8 doc)




lyricnz



Previous comments:
------------------------------------------------------------------------

Sat, 26 Aug 2006 14:09:32 +0000 : lyricnz

The Converting 4.7 modules to 4.8/HEAD [1] guide shows that hook_view()
needs to return $node, but this is not used in node_example_view [2]
for HEAD
[1] http://drupal.org/node/64279#node-view
[2] http://api.drupal.org/api/head/function/node_example_view




------------------------------------------------------------------------

Sat, 26 Aug 2006 14:13:43 +0000 : lyricnz

In fact (of course) the example is largely 4.7 sample code, the other
changes in this area aren't quite up-to-date. I'd submit new code, but
this is Day Three for me :)




------------------------------------------------------------------------

Sat, 26 Aug 2006 14:34:17 +0000 : webchick

I think that's awesome that you're on day 3 and are already comfortable
submitting issues. Keep it up! :D


In case you're feeling extra spunky ;) (or for anyone else for that
matter), here's how to fix this:


1. Take a checkout of the contrib/docs directory from contributions
HEAD [3]
2. Find the file docs/developer/examples/node_example.module.
3. Copy it to the modules directory in a \">Drupal HEAD [4] test site
you have
4. Tweak it until it works ;)
5. Make a patch [5], submit it here, and mark the issue "code needs
review."


Then one of the developer-type folks can test it out, verify that it
works, and get it applied to the API docs. :)


[3] http://drupal.org/node/321
[4] http://drupal.org/patch




------------------------------------------------------------------------

Sun, 27 Aug 2006 01:32:40 +0000 : lyricnz

Okay, I'll do that as a learning excercise, but node_example.module
doesn't appear to contain any hook_view implementations :)  


But I did find a bug in Comment module and Upload module (which I was
using to discover how to update the example code)!
http://drupal.org/node/80891






More information about the documentation mailing list