Clarity Posted October 16, 2023 Share Posted October 16, 2023 Hello, @bernhard! I'm trying to install LanguageSupport module using RockMigrations with method addLanguageSupport(), but I have an error related to that module is not in the list of installable files, so I can't install it. Can you please tell me what is wrong? Link to comment Share on other sites More sharing options...
bernhard Posted October 16, 2023 Share Posted October 16, 2023 Hi @Clarity I'm always using this snippet: <?php // install german language pack for the default language // this will install language support, download the ZIP and install it $rm->setLanguageTranslations('DE'); $rm->installModule('LanguageSupportFields'); $rm->installModule('LanguageSupportPageNames'); $rm->installModule('LanguageTabs'); $rm->setFieldData('title', ['type' => 'textLanguage']); I do that once and then comment everything out so that it does not run on every migration. Once I have the files in the project I simply git push them to live. 1 Link to comment Share on other sites More sharing options...
Clarity Posted October 19, 2023 Author Share Posted October 19, 2023 Hello, @bernhard! I tried to install it, but $module variable in installModule() here returns null and the installation of this module was not successful. Maybe there is something else that I don't take in account? Link to comment Share on other sites More sharing options...
bernhard Posted October 19, 2023 Share Posted October 19, 2023 Hey @Clarity it seems you have something else going on, because the error says that headers already sent with some output... Could you please provide a step by step instruction with the blank site profile that lets me reproduce the issue? Link to comment Share on other sites More sharing options...
Clarity Posted October 19, 2023 Author Share Posted October 19, 2023 I start with a blank profile and then run only this script. Link to comment Share on other sites More sharing options...
bernhard Posted October 19, 2023 Share Posted October 19, 2023 Why don't you just put line 14-19 into /site/migrate.php ? Then you can run "php site/modules/RockMigrations/migrate.php" 1 Link to comment Share on other sites More sharing options...
Clarity Posted October 19, 2023 Author Share Posted October 19, 2023 Thank you, it works! But how to install other languages? I see only DE and FI options here. Link to comment Share on other sites More sharing options...
bernhard Posted October 19, 2023 Share Posted October 19, 2023 Quote @param string $translations Url to language zip OR 2-letter-code (eg DE) You can either provide the shortcut (works for DE and FI) or the full url to the zip file 1 Link to comment Share on other sites More sharing options...
Clarity Posted October 19, 2023 Author Share Posted October 19, 2023 Thanks, I was able to install the LanguageSupport module using migrate.php. But I have a question. I use this module from other script outside migrate.php. Is it possible to use this file instead of migrate.php? Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted October 19, 2023 Share Posted October 19, 2023 It seems to be a permissions issue. When Rock Migrations is run the regular way, it makes the $user a superuser with a sudo() method. If you run your migrations from your own script you probably need to do the same there. 2 1 Link to comment Share on other sites More sharing options...
Clarity Posted October 20, 2023 Author Share Posted October 20, 2023 14 hours ago, Ivan Gretsky said: It seems to be a permissions issue. When Rock Migrations is run the regular way, it makes the $user a superuser with a sudo() method. If you run your migrations from your own script you probably need to do the same there. Thank you, it indeed works! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now