By sicapitan on
I looked everywhere and there are just half baked answers which don't apply or code which doesn't work.
I renamed my Story content type to article
I can theme the create new article fine, it is just editing it
if ((arg(0) == 'node') && (arg(2) == 'edit')) {
$node = node_load(array('nid' => arg(1)));
if ( $node->type == 'article' ) {
function phptemplate_node_form($form) {
return _phptemplate_callback('article_edit', array('user' => $user, 'form' => $form));
}
}
}
It doesn't enter the function phptemplate_node_form.
One idea was to use hook_form_alter to modify the prefix and suffix or something but I couldn't find anything on that either.
Comments
Some success...
This will call my page but now all the form related information about my fields is missing from $node.
Is there a way to use node_load to get all the data plus the field types so I can render it with dupal_render including the field value?
Diff module is overriding node_form
Hi sicapitan,
We were having the same problem and were going nuts with it... we spent couple hours trying to fix it and after few hours debugging my coworker found out that the diff module was overriding the phptemplate_node_form... try to disable it and see if it fixes your problem.
Now if you are not using the diff module, try and search for "_form_alter" in your modules since one of them must be overriding the node_form.
Hope that helps :)
patch submitted
if this patch gets in, diff and stop theming the node form: http://drupal.org/node/133028. for drupal 6 only.
my solution
I too found that diff.module was causing the problem with phptemplate_node_form not working as expected. I was able to get phptemplate_node_form to work by modifying line 616 of diff.module (version 5.x-2.0) like so: