[development] Drupal 7 API Change notification: Multiple important changes

Randy Fay randy at randyfay.com
Tue Sep 14 07:28:34 UTC 2010

*We try to notify this list when API changes are made in Drupal 7, so
contrib and custom developers have a chance to fix their code before they
have the pain of figuring out why it's broken.*

Today there are quite a number of changes and some will require changes by
many existing D7 modules. *The first two are pervasive* and will most likely
affect you if you've developed D7 modules that provide fields or use the
Managed File API.

(issue <http://drupal.org/node/902264>) *hook_field_schema*() must be moved
from the .module to the .install file. This affects *every module that
implements fields.  *Please update your module. In the process, if you use
t() in that function, turn it into $t().

(issue <http://drupal.org/node/874326#comment-3430420>) *Managed File API
functions like file_copy() can no longer use bare paths* for filepaths, they
must use URIs with public://, private://, or temporary:// (or another
Drupal-provided scheme). This will probably break your module if you use
file_copy(), file_move(), or the like. Check
here<http://randyfay.com/node/73>for a posting on file API changes
that have gone in recently.

(issue <http://drupal.org/node/878092#comment-3435332>) Format of links in
an entity's $entity->links has changed. If your module provides an entity
and it provides $entity->links, you'll have to fix this. You'll see from this
patch still in the issue
<http://drupal.org/node/878092#comment-3388496>that the same change is
about to happen to comments, so you'll probably want
to watch this issue.

(issue <http://drupal.org/node/756762#comment-3435462>) AJAX Form API
changes. These affect you only if your module uses #ajax['path'],
implementing a custom callback (which is discouraged and almost always
unnecessary in D7). But you'll want to read the
summary<http://drupal.org/node/756762#comment-3435462>if you do use

(issue <http://drupal.org/node/757154#comment-3408064>) More obscure change
to Form API so hook_form_BASE_FORM_ID_alter() is called between
hook_form_alter() and hook_form_FORM_ID_alter(), If you don't implement
hook_forms() this probably does not affect you.

Sorry to annoy you on a rainy Tuesday morning in Copenhagen :-)


Randy Fay
Drupal Module and Site Development
randy at randyfay.com
+1  970.462.7450
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100914/e23cbe10/attachment-0001.html 

More information about the development mailing list