Jump to:
| Project: | Membership types and registration modification |
| Version: | 5.x-1.6 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I have a simple configuration where nf_registration_mod is is used two define two similar registration types that only differ on the role that is given to the user. The pageroute is the same, it's only one compulsory and unique node type called "profile".
Registration goes well, but some users can't update their profile: the submit button does not show. Note that i have the Diff module activated (but the node type "profile" does not have revisions activated), and the users who can't update their profile are the one who have the "view revisions" grant.
about line 1228 is the code that would remove the buttons:
<?php
//for diff module compatibility [copied and modified]; only override if the content type is a nodeprofile/pageroute type
if ($diff = module_exists('diff')) {
if ((isset($form['type'])) && ($form['type']['#value']. '_node_form' == $form_id) && (array_key_exists($form['type']['#value'], $types))) {
if (user_access('view revisions') && $form['nid']['#value'] > 0) {
$form['#after_build'][] = 'nf_registration_mod_adapt_node_form';//notice the use of the square brackets to ADD TO and not replace the diff #after_build
}
}
}//end diff module portion
?>I have not investigated further, but i guess there is a missing condition somewhere here... For the moment i use hook_form_alter in my own module to remove the $form['#after_build'] set by nf_registration_mod to have the buttons back.
Comments
#1
This module is designed for a specific setup and not any others. The interactions with the dependent modules is precarious. I'll check out your code and see if it makes sense to include. Otherwise I won't.
#2
Sorry for my bad english, the code i've inserted in my report is the original one. It is just where i think something could be done.
#3