• Hello Guest,
    There are new packages allow you download any resources with a single purchase. Click here to upgrade your account ;)

[FIXED] Unable to create events

Waves

New Member
Upgraded the add-on to latest one and users receive error when adding events:

  • XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '4115-22' for key 'PRIMARY'
  • src/XF/Db/AbstractStatement.php:217
Stack trace
Code:
INSERT  INTO `xf_tl_group_event_watch` (`event_id`, `user_id`) VALUES (?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(221): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/addons/Truonglv/Groups/Repository/Event.php(87): XF\Db\AbstractAdapter->insert('xf_tl_group_eve...', Array)
#5 src/addons/Truonglv/Groups/Pub/Controller/Event.php(226): Truonglv\Groups\Repository\Event->watchEvent(Object(Truonglv\Groups\Entity\Event))
#6 src/XF/Mvc/Dispatcher.php(321): Truonglv\Groups\Pub\Controller\Event->actionAdd(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('Truonglv\\Groups...', 'Add', Object(XF\Mvc\RouteMatch), Object(Truonglv\Groups\Pub\Controller\Event), NULL)
#8 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Truonglv\Groups\Pub\Controller\Event), NULL)
#9 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#11 src/XF.php(390): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}

UPDATE: It appears it does create the event but still prints out this error and ends up creating duplicate events whistle giving users 'server error occured'
 
Top