Jump to content

The problem with installation LanguageSupport module while using RockMigrations


Recommended Posts

Posted

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?

Posted

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.

  • Thanks 1
Posted

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?image.thumb.png.bc94f8dbf81e2ede73596f0c80a0c09a.png

 

Posted

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?

Posted
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

  • Thanks 1
Posted

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?

Posted
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!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...