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

DB call in local/kaltura/version.php causes clean installations to fail #378

Open
liamgm opened this issue Aug 11, 2022 · 5 comments
Open

Comments

@liamgm
Copy link

liamgm commented Aug 11, 2022

In line 36 of local/kaltura/version.php, a SQL call is made on the prefix_config_plugins table. When making a new installation of Moodle that includes the kaltura plugin code, that table will not exist and so the line raises an exception. The db call should be made in an exception handling block or a test made to verify the table exists, otherwise set that variable to empty string or False.

@thepurpleblob
Copy link

thepurpleblob commented Aug 25, 2022

A "me too".

Just to be clear - if you have local_kaltura in your code base then Moodle will NOT install at all.

Exactly as above. You cannot have logic of any kind in the version.php file. The database calls in particular fail on a new site.

@bobopinna
Copy link

version.php shall not contains any other things that plugin object definition.

The code from line 34 is a patch for some previous bad version numbering, that is not needed for new installation.
I hope that plugin maintainers move that code out from version.php in a place that run it just once not everytime.

A workaround for new installation is to comment all the code (/* ... */) from line 34 till the end of file.

HTH

@lucaboesch
Copy link
Contributor

I was asked to open a ticket in support.kaltura.com

This is

Case Number
00444113

@davidscotson
Copy link

The commit ILMS-547 95d5dbe appears to fix this, though it still appears to be doing stuff in version.php that probably should be located in db/upgrade.php so that it only gets run once on when the plugin is upgraded.

@davidscotson
Copy link

Also, sightly older duplicate ticket is here: #357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants