diff --git a/administrator/components/com_content/Model/ArticleModel.php b/administrator/components/com_content/Model/ArticleModel.php index 5ac33546889a1..666dab0e516a5 100644 --- a/administrator/components/com_content/Model/ArticleModel.php +++ b/administrator/components/com_content/Model/ArticleModel.php @@ -635,8 +635,6 @@ public function getForm($data = array(), $loadData = true) } $jinput = Factory::getApplication()->input; - $db = $this->getDbo(); - $query = $db->getQuery(true); /* * The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. @@ -713,6 +711,12 @@ public function getForm($data = array(), $loadData = true) } } + // Remove show_associations field if associations is not enabled + if (!$assoc) + { + $form->removeField('show_associations', 'attribs'); + } + return $form; } @@ -914,7 +918,6 @@ public function save($data) } $stageId = (int) $workflow->stage_id; - $workflowId = (int) $workflow->id; // B/C state $data['state'] = (int) $workflow->condition; @@ -1028,7 +1031,6 @@ public function save($data) } $stageId = (int) $workflow->stage_id; - $workflowId = (int) $workflow->id; // B/C state $table->state = $workflow->condition;