Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Баг с ссылкой вступления в блог #276

Closed
davetoxa opened this issue Aug 21, 2012 · 1 comment
Closed

Баг с ссылкой вступления в блог #276

davetoxa opened this issue Aug 21, 2012 · 1 comment
Milestone

Comments

@davetoxa
Copy link
Contributor

Теперь вступление в блог работает, но:

Ссылка так же доступна на главной, и если опять на неё нажать, то сваливается ошибка

2012/08/21 18:18:53 [error] [system.db.CDbCommand] Не удалось выполнить CDbCommand::execute(): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '85-1' for key 'user_blog_unique'. Выполнявшийся SQL-запрос: INSERT INTO user_to_blog (role, status, note, user_id, blog_id, create_date, update_date) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6). Bound with :yp0=1, :yp1=1, :yp2='', :yp3='85', :yp4='1', :yp5='1345558733', :yp6='1345558733'.
in C:\wamp\www\yupe\protected\modules\blog\models\Blog.php (226)
in C:\wamp\www\yupe\protected\modules\blog\controllers\BlogController.php (100)
in C:\wamp\www\yupe\index.php (15)
2012/08/21 18:18:53 [error] [exception.CDbException] exception 'CDbException' with message 'CDbCommand не удалось исполнить SQL-запрос: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '85-1' for key 'user_blog_unique'. The SQL statement executed was: INSERT INTO user_to_blog (role, status, note, user_id, blog_id, create_date, update_date) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6). Bound with :yp0=1, :yp1=1, :yp2='', :yp3='85', :yp4='1', :yp5='1345558733', :yp6='1345558733'' in C:\wamp\www\yupe\framework\db\CDbCommand.php:354
Stack trace:
#0 C:\wamp\www\yupe\framework\db\ar\CActiveRecord.php(1017): CDbCommand->execute()
#1 C:\wamp\www\yupe\framework\db\ar\CActiveRecord.php(796): CActiveRecord->insert(NULL)
#2 C:\wamp\www\yupe\protected\modules\blog\models\Blog.php(226): CActiveRecord->save()
#3 C:\wamp\www\yupe\protected\modules\blog\controllers\BlogController.php(100): Blog->join('85')
#4 C:\wamp\www\yupe\framework\web\actions\CInlineAction.php(50): BlogController->actionJoin()
#5 C:\wamp\www\yupe\framework\web\CController.php(309): CInlineAction->runWithParams(Array)
#6 C:\wamp\www\yupe\framework\web\CController.php(287): CController->runAction(Object(CInlineAction))
#7 C:\wamp\www\yupe\framework\web\CController.php(266): CController->runActionWithFilters(Object(CInlineAction), Array)
#8 C:\wamp\www\yupe\framework\web\CWebApplication.php(283): CController->run('join')
#9 C:\wamp\www\yupe\framework\web\CWebApplication.php(142): CWebApplication->runController('blog/blog/join')
#10 C:\wamp\www\yupe\framework\base\CApplication.php(162): CWebApplication->processRequest()
#11 C:\wamp\www\yupe\index.php(15): CApplication->run()
#12 {main}

REQUEST_URI=/yupe/index.php/blog/blog/join?blogId=1
HTTP_REFERER=http://46.167.99.67/yupe/index.php/blogs

@davetoxa
Copy link
Contributor Author

Увидел исправил @adminnu

commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant