matthewkong/liferay-portal — pull request #280 by HSchueler (2013-07-09 18:52:58+00:00)
Title: LPS-37047

The issue was caused because structures/templates with content will show up as Not Null when created therefore passing in UPDATE instead of ADD producing the UI error, which the stacktrace that was caught is articleid not found. The fix will first test if the article is null since creating new general content will show up as null and if you try to test by article.istemplatedriven() first it will generate a null exception so we must test that the article is there first then test by templateid since that will show if the template is being created or updated.