List Info

Thread: Re: Debugging updates




Re: Debugging updates
country flaguser name
United States
2007-10-23 09:13:46
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
Re: Debugging updates
user name
2007-10-23 09:54:02
I have not tried this module, but it displays the output in a separate
window, and that would help in the case of update.php.

Perhaps it should be integrated in devel?

http://drupal.org/project/debug
Re: Debugging updates
country flaguser name
United Kingdom
2007-10-23 10:00:01
Hi Karen,

> 3) Var_dump() and print_r() won't work at all in the
middle of an update, with
> or without js turned off.


You've probably already tried this, but just in case you
haven't, have
you tried using
print_r($some_var, true)
so that the print_r becomes a variable so to speak?

-- 
Cheers,
 Martin                          mailto:develfronbow.co.uk


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )