[FIXED] Cannot create events, "requested group could not be found".

Hi @Jackko Can you post full stack errors here? With http request data as well.
 
This one ?
Stack trace

INSERT INTO `xf_tl_group_event` (`group_id`, `event_name`, `address`, `timezone`, `latitude`, `longitude`, `begin_date`, `end_date`, `created_date`, `user_id`, `username`, `event_id`, `first_comment_id`, `cover_date`, `comment_count`, `tags`, `first_comment_likes`, `last_comment_id`, `last_comment_date`, `last_comment_user_id`, `last_comment_username`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1264, '22003')
#1 src/XF/Db/Mysqli/Statement.php(78): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1264, '22003')
#2 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(161): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1403): XF\Db\AbstractAdapter->insert('xf_tl_group_eve...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1135): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/Truonglv/Groups/Service/Event/Creator.php(126): XF\Mvc\Entity\Entity->save(true, false)
#7 src/XF/Service/ValidateAndSavableTrait.php(40): Truonglv\Groups\Service\Event\Creator->_save()
#8 src/addons/Truonglv/Groups/Pub/Controller/Event.php(215): Truonglv\Groups\Service\Event\Creator->save()
#9 src/XF/Mvc/Dispatcher.php(249): Truonglv\Groups\Pub\Controller\Event->actionAdd(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(89): XF\Mvc\Dispatcher->dispatchClass('Truonglv\\Groups...', 'add', 'json', Object(XF\Mvc\ParameterBag), 'tl_groups', Object(Truonglv\Groups\Pub\Controller\Event), NULL)
#11 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#13 src/XF.php(329): XF\App->run()
#14 index.php(13): XF::runApp('XF\\Pub\\App')
#15 {main}




Request state



array(4) {
["url"] => string(28) "/groups/event/add?group_id=1"
["referrer"] => string(64) "https://www.xxxx.com/index.php?groups/event/add&group_id=1"
["_GET"] => array(1) {
["group_id"] => string(1) "1"
}
["_POST"] => array(17) {
["event_name"] => string(29) "testevent für Teststammtisch"
["description_html"] => string(36) "<p>testevent für Teststammtisch</p>"
["attachment_hash"] => string(32) "1751788f37f390828b39a3b4a15d0a54"
["attachment_hash_combined"] => string(94) "{"type":"tl_group_comment","context":{"group_id":1},"hash":"1751788f37f390828b39a3b4a15d0a54"}"
["tags"] => string(0) ""
["begin_date_"] => string(19) "2018-11-18 02:37 PM"
["begin_date"] => string(19) "2018-11-18 02:37 PM"
["end_date_"] => string(19) "2018-11-19 02:37 PM"
["end_date"] => string(19) "2018-11-19 02:37 PM"
["timezone"] => string(16) "Europe/Amsterdam"
["address"] => string(14) "Timbuktu, Mali"
["latitude"] => string(10) "16.7665887"
["longitude"] => string(18) "-3.002561499999956"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(38) "/index.php?groups/event/add&group_id=1"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
 
Last edited:
Hi @Jackko
For temporary fix please run the following queries:
Code:
ALTER TABLE `xf_tl_group_event` CHANGE `latitude` `latitude` DECIMAL(11, 7) NOT NULL
Code:
ALTER TABLE `xf_tl_group_event` CHANGE `longitude` `longitude` DECIMAL(11, 7) NOT NULL
 
Back
Top