There seems to be no unified documentation on how to create a module that actually works. The tutorial is currently a "hodge-podge" of instructions for 4.4, 4.5 and 4.6.

There is currently no documentation on how to actually write a module for 4.7 that might actually work.

For those still working on legacy code, the 4.6 and 4.5 versions of the pages should be archived and linked to.

Comments

sepeck’s picture

Status: Active » Fixed

kitt updated it to 4.7

oadaeh’s picture

And with 5.0 imminent, it'll need to be updated again real soon.

sepeck’s picture

beginner is writing one for 5.0. I think we'll just leave the 4.7 tutorial tagged for 4.7.

lekei’s picture

Thanks for the work sepeck! I'm afraid it seems that someone has already superseded the 4.7 documentation with the mythical 5.0.

Once again writing with Drupal feels like getting dragged behind a bus. 4.7 isn't even stable yet (in terms of essential modules fully working with it) yet head has moved on to 4.8 and the documentation is polluted with 5.0.

The damage to your skin caused by friction with asphalt is called "road rash". That trail of blood you see behind Drupal is "code rash".

heine’s picture

http://drupal.org/node/83055 has been changed to link to per version information. The rest of the module developers guide will be arranged similarly.

The HEAD (5.0) docs have not been finished yet, the 4.7 version will be split from 4.6.

lekei’s picture

Status: Fixed » Active

Still no module developer guide for 4.7 even though with neither CCK nor Flexinode available, 4.7 can't really be used without writing custom modules. We need documentation on how to write modules for 4.7 now.

5.0 should not even be in the primary documentation at this time. It is probably 8 months to a year off before there are enough stable modules to have 5.0 be usable.

Having references to 5.0 in the documentation makes the documentation more confusing and renders it untrustworthy.

heine’s picture

http://drupal.org/node/71954 is a tutorial for creating node types on 4.7 (can use an additional chapter).
--> Needs to be rearranged so it becomes:
-Creating node types
-- Creating node types on 4.6
-- Creating node types on 4.7
-- Creating node types on 5.0

http://drupal.org/node/17914 is a tutorial for creating modules (4.6/4.7ish):
--> Needs to be split, so 4.7 becomes a child node of http://drupal.org/node/83055
--> Needs to be extended
--> A 5.0 version is necessary

HEAD docs are absolutely essential to aid in module upgrading.

lekei’s picture

Perhaps, but HEAD should never be the default manual, the current release should.

Drupal releases are well known for version incompatibility and Drupal already has a bad rep for being unintelligible to new users. If the default manual is not applicable to the current stable release that will only make things worse.

heine’s picture

The Module tutorial chapters should look like http://drupal.org/node/83055.

We are discussing how to version the rest of the docs. As this is somewhat unrelated to the issue at hand, let's focus on the Module Tutorial.

webchick’s picture

For now I've switched the title on the module tutorial, to be for both 4.6 and 4.7, since text contains instructions for both.

The text should also be rewritten so the 4.6 stuff is refactored out, and only the 4.7 stuff remains, but I don't have that kind of time just now. ;)

lekei’s picture

Looks much less confusing now.

In writing my first module for 4.7 there are a couple of things that I think should be in the prefix, which are unclear:

  • Links to the example modules
  • a link to the menu api, and
  • the fact that you can't call some essential functions, you reference them name as a string with the theme() function (a totally non-obvious yet key concept).

    It took me a whole day to figure out how to get the pager function to work. Having these key concepts up-front in the prefix would have saved 90% of the grief.

  • ronaldmulero’s picture

    Status: Active » Closed (fixed)

    old issue