[development] Drupal 7 API Change notification: Key changes

Randy Fay randy at randyfay.com
Mon Nov 1 04:32:27 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.*

(issue <http://drupal.org/node/950138>)  New *field_widget_field*() / *
field_widget_instance*() API functions to encapsulate access to Field API
$form_state data. *If your module defines a field and a widget for that
field*, you may well be affected if your widget depends on $element
callbacks (#process, #element_validate, #value_callback). See the excellent
API change summary <http://drupal.org/node/950138#comment-3649842>; it's
recommended to wait on implementing this until D7 beta 3.

(issue <http://drupal.org/node/934050>) In the {filter} and {filter_format}
tables, '*format' became a string instead of the traditional int*, to
accomodate machine names for filters. Although existing installs will simply
be updated to '1' being the string format of 'plain text', '2' being the
string format of 'filtered html', or whatever, a new install actually has
formats of 'plain_text', 'filtered_html', 'full_html', and the like. If your
module actually looks at the contents of {filter} or {filter_format} then
you may have work to do.

(issue <http://drupal.org/node/914458>) *filter_format_delete*() was changed
to *filter_format_disable*(), and its behavior has changed. *
hook_filter_format_delete*() became *hook_filter_format_disable*(). And
{filter_format} table has a new  'status' column that must be respected in
queries. In short: *If you're working with filters, look at this one*. Read
the excellent API change summary<http://drupal.org/node/914458#comment-3625890>
.

(issue <http://drupal.org/node/902008>) Field modules which are actually
optional are no longer listed as required dependencies. Therefore, if your
module depends on an optional field module (like 'options' or 'list') then
you have to explicitly list in in the dependencies[] in the .info file of
your own module.

(issue <http://drupal.org/node/942690>) STREAM_WRAPPERS_REMOTE,
STREAM_WRAPPERS_LOCAL, and some related constants were removed (and moved
around) in stream_wrappers.inc. If you have implemented a stream wrapper,
this will probably be worth looking at.

I suspect that there may be some breakage in the Examples project from these
changes.

Thanks,
-Randy
-- 
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/20101031/90c5b922/attachment.html 


More information about the development mailing list