diff --git a/module/common/model.php b/module/common/model.php
index c427854156..a1faec6629 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -395,7 +395,7 @@ class commonModel extends model
$iconWord = $objectType == 'doc' ? 'W' : ''; // No ducument icon, print word instead of icon.
$params = '';
- if($objectType == 'bug' or $objectType == 'testcase') $params = "productID=$productID";
+ if(strpos('bug|testcase|story', $objectType) !== false) $params = "productID=$productID";
if($objectType == 'doc') $params = "objectType=&objectID=0&libID=0";
$html .= '
' . html::a(helper::createLink($objectType, $createMethod, $params, '', $isOnlyBody), "$iconWord " . $lang->createObjects[$objectType], '', $isOnlyBody ? "class='iframe'" : '') . '';
diff --git a/module/story/control.php b/module/story/control.php
index ee6c31c31a..feb50ea82c 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -48,6 +48,8 @@ class story extends control
*/
public function create($productID = 0, $branch = 0, $moduleID = 0, $storyID = 0, $objectID = 0, $bugID = 0, $planID = 0, $todoID = 0, $extra = '', $type = 'story')
{
+ if($productID == 0) $this->locate($this->createLink('product', 'create'));
+
$this->story->replaceURLang($type);
if($this->app->tab == 'product')
{