By pvanderspek on
I've created a custom form for my module. Submitting the form does result in the requested changes in the database, but in my browser I only see a blank screen with the URL for the page which held the form, even though I have a redirect in my submit-handler. Below the code for the submit-handler:
function nodeorder_admin_display_form_submit($form, &$form_state) {
$sql = "UPDATE ...";
$tid = -1;
foreach ($form_state['values'] as $node) {
db_query($sql, ....);
$tid = $node['tid'];
}
drupal_set_message(t('Update succeeded.'));
cache_clear_all();
$form['#redirect'] = 'nodeorder/term/' . $tid;
}
I also tried
$form_state['redirect'] = 'nodeorder/term/' . $tid;
but that doesn't work either.
I hope someone can point me in the right direction.
Comments
I thought the problem was a
I thought the problem was a missing return-statement but that wasn't it either.
White screen of death
I just found the page on the white screen of death and so I looked in error logs of apache and found this:
Maybe someone knows how the white screen and the error above are related?
Ok, the mod_security error
Ok, the mod_security error has nothing to do with it. It seems to be happening with other pages as well. Probably a misconfiguration by my provider.
I just found the following
I just found the following error in the drupal log
I found the problem.
I found the problem. Apparently the files weren't transferred properly to my server and a weird character was inserted before <?php
Removing it, resolved the problem