I am successfully preventing some content from being saved under certain conditions, but am having trouble handling the error message to the user.
The actual text does display, but there is additional mention of "Save failed with the followig error:", then nothing follows. It seems redundant since the text displays, but I don't know how to subdue it, or provide the correct information for it so that it doesn't appear incomplete to the user.
public function onContentBeforeSave($context=null, $article=null, $isNew=0) {
if($myTestFails){
$errormsg = 'My error message while saving categories...';
JError::raiseWarning(403, $errormsg);
return false;
}
}
Error
My error message while saving categories...
Save failed with the following error: