Fixed Media: "Media Fields" add error

DarkFire

Member
Affected version
2.0.0 Beta 2
XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'match_params' in 'field list' in src/XF/Db/AbstractStatement.php at line 183
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 34
  2. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 44
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 67
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 143
  5. XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1704
  6. XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1448
  7. XF\Mvc\Entity\Entity->save() in src/XF/Mvc/FormAction.php at line 69
  8. XF\Mvc\FormAction->XF\Mvc\{closure}() in src/XF/Mvc/FormAction.php at line 159
  9. XF\Mvc\FormAction->run() in src/XF/Admin/Controller/AbstractField.php at line 175
  10. XF\Admin\Controller\AbstractField->actionSave() in src/XF/Mvc/Dispatcher.php at line 232
  11. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 85
  12. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  13. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1777
  14. XF\App->run() in src/XF.php at line 320
  15. XF::runApp() in admin.php at line 13
 
Thanks.

This should be sorted for the next release.

You can run the following query to get the table up to date:
SQL:
ALTER TABLE `xf_mg_media_field`
MODIFY COLUMN `display_group` VARCHAR(25) NOT NULL DEFAULT 'below_media',
MODIFY COLUMN `field_type` VARBINARY(25) NOT NULL DEFAULT 'textbox',
MODIFY COLUMN `match_type` VARBINARY(25) NOT NULL DEFAULT 'none',
DROP `match_regex`,
DROP `match_callback_class`,
DROP `match_callback_method`,
ADD `match_params` BLOB NOT NULL AFTER `match_type`
 
Back
Top Bottom