Meeting created without a subject #2510
Labels
Priority:Critical
Issues & PRs that are critical; broken core functionality, fatal errors - there are no workarounds
Status:Fix Proposed
A issue that has a PR related to it that provides a possible resolution
Type:Bug
Bugs within the core SuiteCRM codebase
Issue
It is possible to create a meeting without a subject despite this being a mandatory field.
Expected Behavior
When you try to save a meeting without a subject then the invalid subject field is highlighted and the meeting is not saved. The user remains on the meeting Create form.
Actual Behavior
When you try to save a meeting without a subject then the invalid subject field is highlighted and a standard Chrome unload pop-up is displayed asking if you wish to leave the site. If you click Leave in the pop-up then a meeting is created with a blank subject. The meeting Details view form is displayed
Possible Fix
Change the custom save button type on the create meeting form from 'submit' to 'button'.
Edit modules/meetings/metadata/editviewdefs.php line 60. Change it from:
'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id ="SAVE_HEADER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.meetings.fill_invitees();document.EditView.action.value=\'Save\'; document.EditView.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}document.EditView.return_id.value=\'\'; {/if} formSubmitCheck();"type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
to
'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id ="SAVE_HEADER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.meetings.fill_invitees();document.EditView.action.value=\'Save\'; document.EditView.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}document.EditView.return_id.value=\'\'; {/if} formSubmitCheck();"type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
Steps to Reproduce
SuiteCRM Demo
Instructions relate to Suite P theme and Chrome, but same behaviour is exhibited in all themes and Firefox
Context
Testing SuiteCRM
Your Environment
The text was updated successfully, but these errors were encountered: