Bonfire icon indicating copy to clipboard operation
Bonfire copied to clipboard

Re:Ticket #629, Fixed Module name too short in Controller/View for permissions

Open disccomp opened this issue 8 years ago • 3 comments

A quick fix to allow permission names to be the full 100 characters specified in the ticket.

disccomp avatar May 23 '16 18:05 disccomp

As an aside, why does the controller re-specify validation rules when the correct rules already exist in the model?

disccomp avatar May 23 '16 18:05 disccomp

The answer to why the controller re-specifies the rules is most likely that the model was updated to include the rules but one or more references to the model was not. So, the controller can be updated to use:

$this->form_validation->set_rules($this->permission_model->get_validation_rules($type));

Then the view just has to be modified to allow 255 characters for the name field.

mwhitneysdsu avatar May 24 '16 13:05 mwhitneysdsu

Actually, now that I look back at the original issue, changing the maximum length of the name in the form will just make the problem worse. The reported issue is caused by the generated description being longer than the description field permits, in part because the generated description includes the name.

...and looking into it further, the permission form should have no effect on the original issue, which is strictly related to the form in the module builder, since the descriptions of the permissions are generated by the builder, rather than input in the form.

mwhitneysdsu avatar May 24 '16 13:05 mwhitneysdsu