UPGRADE.txt 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. Upgrading from ctools-6.x-1.x to ctools-7.x-2.x:
  2. - Remove ctools_ajax_associate_url_to_element as it shouldn't be necessary
  3. with the new AJAX api's in Drupal core.
  4. - All calls to the ctools_ajax_command_prepend() should be replace with
  5. the core function ajax_command_prepend();
  6. This is also the case for append, insert, after, before, replace, html,
  7. and remove commands.
  8. Each of these commands have been incorporated into the
  9. Drupal.ajax.prototype.commands.insert
  10. function with a corresponding parameter specifying which method to use.
  11. - All calls to ctools_ajax_render() should be replaced with calls to core
  12. ajax_render(). Note that ctools_ajax_render() printed the json object and
  13. exited, ajax_render() gives you this responsibility.
  14. ctools_ajax_render()
  15. becomes
  16. print ajax_render();
  17. exit;
  18. - All calls to ctools_static*() should be replaced with corresponding calls
  19. to drupal_static*().
  20. - All calls to ctools_css_add_css should be replaced with calls to
  21. drupal_add_css(). Note that the arguments to drupal_add_css() have changed.
  22. - All wizard form builder functions must now return a form array().
  23. - ctools_build_form is very close to being removed. In anticipation of this,
  24. all $form_state['wrapper callback']s must now be
  25. $form_state['wrapper_callback']. In addition to this $form_state['args']
  26. must now be $form_state['build_info']['args'].
  27. NOTE: Previously checking to see if the return from ctools_build_form()
  28. is empty would be enough to see if the form was submitted. This is no
  29. longer true. Please check for $form_state['executed']. If using a wizard
  30. check for $form_state['complete'].
  31. - Plugin types now must be explicitly registered via a registration hook,
  32. hook_ctools_plugin_type(); info once provided in magically-named functions
  33. (e.g., ctools_ctools_plugin_content_types() was the old function to
  34. provide plugin type info for ctools' content_type plugins) now must be
  35. provided in that global hook. See http://drupal.org/node/910538 for more
  36. details.
  37. - Plugins that use 'theme arguments' now use 'theme variables' instead.
  38. - Context, argument and relationship plugins now use 'add form' and/or
  39. 'edit form' rather than 'settings form'. These plugins now support
  40. form wizards just like content plugins. These forms now all take
  41. $form, &$form_state as arguments, and the configuration for the plugin
  42. can be found in $form_state['conf'].
  43. For all these forms, the submit handler MUST put appropriate data in
  44. $form_state['conf']. Data will no longer be stored automatically.
  45. For all of these forms, the separate settings #trees in the form are now
  46. gone, so form ids may be adjusted. Also, these are now all real forms
  47. using CTools form wizard instead of fake subforms as previously.