{"action":"opened","issue":{"url":"https://api.github.com/repos/humhub/humhub/issues/880","labels_url":"https://api.github.com/repos/humhub/humhub/issues/880/labels{/name}","comments_url":"https://api.github.com/repos/humhub/humhub/issues/880/comments","events_url":"https://api.github.com/repos/humhub/humhub/issues/880/events","html_url":"https://github.com/humhub/humhub/issues/880","id":65725398,"number":880,"title":"0.11.0 User Follows another User","user":{"login":"WASasquatch","id":1151589,"avatar_url":"https://avatars.githubusercontent.com/u/1151589?v=3","gravatar_id":"","url":"https://api.github.com/users/WASasquatch","html_url":"https://github.com/WASasquatch","followers_url":"https://api.github.com/users/WASasquatch/followers","following_url":"https://api.github.com/users/WASasquatch/following{/other_user}","gists_url":"https://api.github.com/users/WASasquatch/gists{/gist_id}","starred_url":"https://api.github.com/users/WASasquatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WASasquatch/subscriptions","organizations_url":"https://api.github.com/users/WASasquatch/orgs","repos_url":"https://api.github.com/users/WASasquatch/repos","events_url":"https://api.github.com/users/WASasquatch/events{/privacy}","received_events_url":"https://api.github.com/users/WASasquatch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-01T16:32:17Z","updated_at":"2015-04-01T16:32:17Z","closed_at":null,"body":"Again with the errors from the DB users cannot follow other users\r\n\r\n```txt\r\n\r\nCDbException\r\n\r\nCDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Activity-7' for key 'index_object_model'. The SQL statement executed was: INSERT INTO `content` (`user_id`, `visibility`, `guid`, `object_model`, `object_id`, `created_at`, `created_by`, `updated_at`, `updated_by`, `archived`, `sticked`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, NOW(), :yp5, NOW(), :yp6, :yp7, :yp8). Bound with :yp0=17, :yp1=1, :yp2='4ed88cc6-b68f-48ef-bc6c-6886acc43767', :yp3='Activity', :yp4=7, :yp5=17, :yp6=17, :yp7='0', :yp8=0\r\n\r\n/home/***/***/***/public_shtml/development/protected/vendors/yii/db/CDbCommand.php(358)\r\n\r\n346         {\r\n347             if($this->_connection->enableProfiling)\r\n348                 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');\r\n349 \r\n350             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;\r\n351             $message=$e->getMessage();\r\n352             Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',\r\n353                 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');\r\n354 \r\n355             if(YII_DEBUG)\r\n356                 $message.='. The SQL statement executed was: '.$this->getText().$par;\r\n357 \r\n358             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',\r\n359                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);\r\n360         }\r\n361     }\r\n362 \r\n363     /**\r\n364      * Executes the SQL statement and returns query result.\r\n365      * This method is for executing an SQL query that returns result set.\r\n366      * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative\r\n367      * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing\r\n368      * them in this way can improve the performance. Note that if you pass parameters in this way,\r\n369      * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.\r\n370      * Please also note that all values are treated as strings in this case, if you need them to be handled as\r\n\r\nStack Trace\r\n#0 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/db/ar/CActiveRecord.php(1077): CDbCommand->execute()\r\n#1 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/db/ar/CActiveRecord.php(806): CActiveRecord->insert(null)\r\n#2 \t\r\n–\r\n /home/***/***/***/public_shtml/development/protected/components/HActiveRecordContent.php(174): CActiveRecord->save()\r\n\r\n169         }\r\n170 \r\n171         $this->content->updated_at = $this->updated_at;\r\n172         $this->content->updated_by = $this->updated_by;\r\n173 \r\n174         $this->content->save();\r\n175         parent::afterSave();\r\n176 \r\n177         if ($this->isNewRecord && $this->autoAddToWall) {\r\n178             $this->content->addToWall();\r\n179         }\r\n\r\n#3 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/db/ar/CActiveRecord.php(1097): HActiveRecordContent->afterSave()\r\n#4 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/db/ar/CActiveRecord.php(806): CActiveRecord->insert(null)\r\n#5 \t\r\n–\r\n /home/***/***/***/public_shtml/development/protected/modules_core/user/models/UserFollow.php(74): CActiveRecord->save()\r\n\r\n69                 $activity->content->user_id = $this->user->id;\r\n70                 $activity->content->visibility = Content::VISIBILITY_PUBLIC;\r\n71                 $activity->type = \"ActivityUserFollowsUser\";\r\n72                 $activity->object_model = \"User\";\r\n73                 $activity->object_id = $this->object_id;\r\n74                 $activity->save();\r\n75                 $activity->content->addToWall($this->user->wall_id);\r\n76             }\r\n77         }\r\n78 \r\n79         return parent::beforeSave();\r\n\r\n#6 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/db/ar/CActiveRecord.php(1071): UserFollow->beforeSave()\r\n#7 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/db/ar/CActiveRecord.php(806): CActiveRecord->insert(null)\r\n#8 \t\r\n–\r\n /home/***/***/***/public_shtml/development/protected/modules_core/user/behaviors/HFollowableBehavior.php(78): CActiveRecord->save()\r\n\r\n73             $follow->send_notifications = 1;\r\n74         } else {\r\n75             $follow->send_notifications = 0;\r\n76         }\r\n77 \r\n78         if (!$follow->save()) {\r\n79             return false;\r\n80         }\r\n81         return true;\r\n82     }\r\n83 \r\n\r\n#9 \t\r\n unknown(0): HFollowableBehavior->follow()\r\n#10 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/base/CComponent.php(261): call_user_func_array(array(HFollowableBehavior, \"follow\"), array())\r\n#11 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/db/ar/CActiveRecord.php(227): CComponent->__call(\"follow\", array())\r\n#12 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/modules_core/user/controllers/ProfileController.php(75): CActiveRecord->__call(\"follow\", array())\r\n#13 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/modules_core/user/controllers/ProfileController.php(75): User->follow()\r\n#14 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/web/actions/CInlineAction.php(49): ProfileController->actionFollow()\r\n#15 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/web/CController.php(308): CInlineAction->runWithParams(array(\"uguid\" => \"6f8a7435-9482-41d0-9044-9f429bc3da90\"))\r\n#16 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/web/filters/CFilterChain.php(133): CController->runAction(CInlineAction)\r\n#17 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/web/filters/CFilter.php(40): CFilterChain->run()\r\n#18 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/web/CController.php(1145): CFilter->filter(CFilterChain)\r\n#19 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/web/filters/CInlineFilter.php(58): CController->filterAccessControl(CFilterChain)\r\n#20 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/web/filters/CFilterChain.php(130): CInlineFilter->filter(CFilterChain)\r\n#21 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/web/CController.php(291): CFilterChain->run()\r\n#22 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array(\"accessControl\"))\r\n#23 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/web/CWebApplication.php(282): CController->run(\"follow\")\r\n#24 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/web/CWebApplication.php(141): CWebApplication->runController(\"user/profile/follow\")\r\n#25 \t\r\n+\r\n /home/***/***/***/public_shtml/development/protected/vendors/yii/base/CApplication.php(180): CWebApplication->processRequest()\r\n#26 \t\r\n+\r\n /home/***/***/***/public_shtml/development/index.php(39): CApplication->run()\r\n2015-04-01 16:31:09 Apache/2.2 Yii Framework/1.1.15\r\n```"}}