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

Column not found: 1054 Unknown column 'overwrite_download_perm' in 'field list' when adding new publications #327

Closed
rfcmaXi opened this issue Jul 18, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@rfcmaXi
Copy link
Contributor

rfcmaXi commented Jul 18, 2024

Describe the bug
If you try to add a new publication via the plugin options, the error appears.

To Reproduce
Plugin-Settings -> Publications -> Add -> Make some entries and and save

Expected behavior
The inputs should be saved ;)

Log
PDOException thrown with message "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'overwrite_download_perm' in 'field list'"

Stacktrace:
#19 PDOException in /srv/www/ilias/Services/Database/classes/PDO/class.ilDBPdo.php:451
#18 PDO:exec in /srv/www/ilias/Services/Database/classes/PDO/class.ilDBPdo.php:451
#17 ilDBPdo:insert in /srv/www/ilias/Services/ActiveRecord/Connector/class.arConnectorDB.php:183
#16 arConnectorDB:create in /srv/www/ilias/Services/ActiveRecord/class.ActiveRecord.php:332
#15 ActiveRecord:create in /srv/www/ilias/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/classes/Conf/PublicationUsage/class.xoctPublicationUsageFormGUI.php:256
#14 xoctPublicationUsageFormGUI:saveObject in /srv/www/ilias/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/classes/Conf/PublicationUsage/class.xoctPublicationUsageGUI.php:229
#13 xoctPublicationUsageGUI:update in /srv/www/ilias/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/classes/class.xoctGUI.php:74
#12 xoctGUI:performCommand in /srv/www/ilias/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/classes/class.xoctGUI.php:68
#11 xoctGUI:executeCommand in /srv/www/ilias/Services/UICore/classes/class.ilCtrl.php:203
#10 ilCtrl:forwardCommand in /srv/www/ilias/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/classes/class.xoctMainGUI.php:114
#9 xoctMainGUI:executeCommand in /srv/www/ilias/Services/UICore/classes/class.ilCtrl.php:203
#8 ilCtrl:forwardCommand in /srv/www/ilias/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/classes/class.ilOpenCastConfigGUI.php:75
#7 ilOpenCastConfigGUI:executeCommand in /srv/www/ilias/Services/UICore/classes/class.ilCtrl.php:203
#6 ilCtrl:forwardCommand in /srv/www/ilias/Services/Component/classes/Settings/class.ilObjComponentSettingsGUI.php:162
#5 ilObjComponentSettingsGUI:forwardConfigGUI in /srv/www/ilias/Services/Component/classes/Settings/class.ilObjComponentSettingsGUI.php:119
#4 ilObjComponentSettingsGUI:executeCommand in /srv/www/ilias/Services/UICore/classes/class.ilCtrl.php:203
#3 ilCtrl:forwardCommand in /srv/www/ilias/Services/Administration/classes/class.ilAdministrationGUI.php:237
#2 ilAdministrationGUI:executeCommand in /srv/www/ilias/Services/UICore/classes/class.ilCtrl.php:203
#1 ilCtrl:forwardCommand in /srv/www/ilias/Services/UICore/classes/class.ilCtrl.php:178
#0 ilCtrl:callBaseClass in /srv/www/ilias/ilias.php:24

Environment (please complete the following information):

  • ILIAS version: v8.13
  • PHP version: PHP 8.0.30
  • Plugin version: v8.1.1
  • Opencast version 14.6
  • Browser: Firefox
@rfcmaXi rfcmaXi added the bug Something isn't working label Jul 18, 2024
@rfcmaXi
Copy link
Contributor Author

rfcmaXi commented Jul 18, 2024

Note: You can also simply edit an existing publication to throw the error.

An undefined database exception occurred. SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘overwrite_download_perm’ in ‘field list’ QUERY: UPDATE xoct_publication_usage SET usage_id = ‘download’, title = ‘Download Links’, display_name = ‘’, description = ‘Download links of processed videos in different resolutions for download button. ', group_id = NULL, channel = “api”, status = NULL, search_key = “tag”, flavour = “/delivery”, tag = “engage-download”, md_type = 2, allow_multiple = 1, mediatype = “”, overwrite_download_perm = 0, ext_dl_source = 1 WHERE usage_id = “download”

@ferishili
Copy link
Contributor

This is because you went to the latest version without updating your plugin via CLI.
To fix this you would need to perform update of the plugin via CLI from yout ILIAS root dir!
e.g. (not sure if the command is correct)
php setup/setup.php update --config=[the path to the conifg] --plugin=OpenCast

You would need to refer to the ILIAS docs for the update command!

@rfcmaXi
Copy link
Contributor Author

rfcmaXi commented Jul 25, 2024

Thank you for the relevant information!!! The need to run the CLI with DB steps for plugin changes is a bit surprising. However, I now understand where the approach or the necessity comes from and also that OC is the first plugin, of that we have in use, which makes use of the new modular option.

In this respect, I would at least like to give the hint to mention this in the readme :)

@rfcmaXi rfcmaXi closed this as completed Jul 25, 2024
@ferishili
Copy link
Contributor

I've tried to explain it here in Wiki but seems to be not enough!

@chfsx
Copy link
Contributor

chfsx commented Jul 26, 2024

I'm thinking about whether we want to make the installation/update "cli only". e.g. check in the beforeInstall and beforeUpdate method whether PHP_SAPI === 'cli', and if not, issue an error message and point to the installation process on how to install or update the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants