Fixed database error caused by onContenetAfterSave

onContentAfterSave now checks if article has catid and attribs before
doing anything.