[development] Drupal 7 API Change notification: Late changes including FAPI select and CSS/JS Aggregation

Randy Fay randy at randyfay.com
Sat Oct 16 22:17:17 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.*

There are a number of changes over the last couple of weeks. Two of these
(CSS/JS Aggregation and FAPI select #required) are re-do's after the
original API change was hotly discussed, so hoping you didn't take those too
seriously when they were announced before.

(issue <http://drupal.org/node/744384>) The signature of *
drupal_anonymous_user*() has changed - it no longer takes an optional
$session. If you use drupal_anonymous_user($session), it won't work right
any more. Also in this issue, the behavior of session updates changed:
Although the session data will always be current, the timestamp will not be
with anonymous users.

(issue <http://drupal.org/node/881530>) If you use *field_create_field*() to
create a *term reference field*, you have to use a vocabulary machine name,
not $vid. Validation handlers or widget code will be affected in the same
way.

(issue <http://drupal.org/node/769226>) *CSS and Javascript aggregation* was
changed (again) in this issue. Somebody needs to write a blog post or reply.
The actual resolution went through many difficult iterations since the last
time it got committed. It has significant impact on performance and best
practice for module developers, but I was unable to grok the actual outcome.

(issue <http://drupal.org/node/140783>) *FAPI Select elements with #required
* was reworked again since the last API change notification about this.
#required = FALSE became the default again, and the new #empty_value and
#empty_option influence whether an additional empty value is added. Details
are in the issue summary here<http://drupal.org/node/140783#comment-3519770>and
here <http://drupal.org/node/140783#comment-3533170>.

(issue <http://drupal.org/node/356036>) *field_content_languages*() now
returns all languages (enabled and disabled) instead of just enabled
languages.

(issue <http://drupal.org/node/930122>) The Drupal variable
file_directory_temp (variable_get('file_directory_temp')) has gone away. All
who need this information should be using file_directory_temp() anyway, and
in reality references should be to temporary://<whatever> when working with
temporary files.

(issue <http://drupal.org/node/438224>) The permission named '*post comments
without approval*' was renamed to 'skip comment approval'. If you have a
test or other use of this permission, your code is broken.

Beta now! We're getting there.

As always, if you know more about these than I do (it doesn't take much)
then reply to this and educate us better about it. And contribute to the
appropriate documentation as well.

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/20101016/fec0832b/attachment.html 


More information about the development mailing list