[development] Debugging updates
Karen Stevenson
karen at elderweb.com
Tue Oct 23 14:13:46 UTC 2007
Thanks to everyone for all the suggestions on how to debug updates. Just as a FYI, here's what I ended up with:
1) I think the ideal solution would be to be able to store the devel queries in update.php, and then display all of them at the end of the update. I spent quite a bit of time trying to figure out how to get it working the way I wanted and gave up. I submitted an issue for this at http://drupal.org/node/185844 in case anyone else is interested and knows how to get it working.
2) Turning js off wasn't particularly helpful because the non-js version uses a meta refresh to take you from one page to another, so you still can't see anything you print to the page (unless you trigger an error or add an 'exit' to the code).
3) Var_dump() and print_r() won't work at all in the middle of an update, with or without js turned off.
3) The best solution seems to be using the option of returning array('success' => TRUE, 'query' => 'Something about the update'). I did run into one small issue which is that I was using a progressive update, so that didn't work the same. In a progressive update, I have to return a nested array:
array('#finished' => 1, array('success' => TRUE, 'query' => 'Something about the update'));
Karen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20071023/8e3bfef1/attachment.htm
More information about the development
mailing list