Cannot create a shortcut for an authors group.
I wanted to create some shortcuts to return content by authors in a search result and got this database error when trying to do a row insert.
Here's the error:
Exception Caught
SQLSTATE[HY000]: General error: 1364 Field 'sort_order' doesn't have a default value:
INSERT INTO 'exp_low_search_shortcuts' ('shortcut_id', 'site_id', 'group_id', 'shortcut_name', 'shortcut_label', 'parameters') VALUES (NULL, '1', '1', 'jgooch', 'Jamie Gooch', '{"channel\"":\""content\"",\""username\"":\""jgooch\""}')
ee/legacy/database/drivers/mysqli/mysqli_connection.php:116
Stack Trace: Please include when reporting this error
#0 ee/legacy/database/drivers/mysqli/mysqli_driver.php(111): CI_DB_mysqli_connection->query('INSERT INTO 'ex...')
#1 ee/legacy/database/DB_driver.php(269): CI_DB_mysqli_driver->_execute('INSERT INTO 'ex...')
#2 ee/legacy/database/DB_driver.php(179): CI_DB_driver->simple_query('INSERT INTO 'ex...')
#3 ee/legacy/database/DB_active_rec.php(1370): CI_DB_driver->query('INSERT INTO 'ex...')
#4 user/addons/low_search/model.low_search.php(209): CI_DB_active_record->insert('exp_low_search_...', Array)
#5 user/addons/low_search/mcp.low_search.php(2079): Low_search_model->insert(Array)
#6 [internal function]: Low_search_mcp->save_shortcut()
#7 ee/EllisLab/ExpressionEngine/Controller/Addons/Addons.php(1661): call_user_func_array(Array, Array)
#8 ee/EllisLab/ExpressionEngine/Controller/Addons/Addons.php(945): EllisLab\ExpressionEngine\Controller\Addons\Addons->getModuleSettings('low_search', 'save_shortcut', Array)
#9 [internal function]: EllisLab\ExpressionEngine\Controller\Addons\Addons->settings('low_search', 'save_shortcut')
#10 ee/EllisLab/ExpressionEngine/Core/Core.php(240): call_user_func_array(Array, Array)
#11 ee/EllisLab/ExpressionEngine/Core/Core.php(109): EllisLab\ExpressionEngine\Core\Core->runController(Array)
#12 ee/EllisLab/ExpressionEngine/Boot/boot.php(146): EllisLab\ExpressionEngine\Core\Core->run(Object(EllisLab\ExpressionEngine\Core\Request))
#13 public_html/phoenix.php(147): require_once('...')
#13 public_html/phoenix.php(147): require_once('...')"
Replies
Low 7 Jul 2018 07:07
Can you try and run this query?
John 9 Jul 2018 14:48
YES! That suggestion fixed the bug.