Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294704

D7 to D8 migrate default_language covertation problem (update.php white screen)

$
0
0

Hi All

I try to migrate my d7 (7.22) site to d8 using latest D8 dev from git repo. (default site language - russian)
Prepare steps are folowing:
1. turn off all d7 modules and switch theme to bartik
2. remove all d7 files except /sites/default/files and settings.php
3. Git clone d8 into site root directory.
4. Start upgrade in browser http://d8.dev.bighameleon.com/core/update.php

After that I got white screen.
apache error logs shows me the next

[Sat Jul 20 12:00:41 2013] [error] [client 195.225.146.135] PHP Fatal error: Cannot use object of type stdClass as array in /home/dev/domains/d8.dev.bighameleon.com/core/lib/Drupal/Core/Language/LanguageManager.php on line 166
[Sat Jul 20 12:00:41 2013] [error] [client 195.225.146.135] PHP Stack trace:
[Sat Jul 20 12:00:41 2013] [error] [client 195.225.146.135] PHP 1. {main}() /home/dev/domains/d8.dev.bighameleon.com/core/update.php:0
[Sat Jul 20 12:00:41 2013] [error] [client 195.225.146.135] PHP 2. drupal_language_initialize() /home/dev/domains/d8.dev.bighameleon.com/core/update.php:457
[Sat Jul 20 12:00:41 2013] [error] [client 195.225.146.135] PHP 3. Drupal\\Core\\Language\\LanguageManager->init() /home/dev/domains/d8.dev.bighameleon.com/core/includes/bootstrap.inc:2380
[Sat Jul 20 12:00:41 2013] [error] [client 195.225.146.135] PHP 4. Drupal\\Core\\Language\\LanguageManager->getLanguage($type = 'language_interface') /home/dev/domains/d8.dev.bighameleon.com/core/lib/Drupal/Core/Language/LanguageManager.php:57
[Sat Jul 20 12:00:41 2013] [error] [client 195.225.146.135] PHP 5. Drupal\\Core\\Language\\LanguageManager->getLanguageDefault() /home/dev/domains/d8.dev.bighameleon.com/core/lib/Drupal/Core/Language/LanguageManager.php:109

I try to debug this trouble and found that d7 variable language_default stored in db (variable table) like object but in d8 it must be array

Like hotfix this I modify

<?php
function language_default() {
 
$info = variable_get('language_default', array(
   
'id'=> 'en',
   
'name'=> 'English',
   
'direction'=> 0,
   
'weight'=> 0,
   
'locked'=> 0,
  ));
 
$info['default'] = TRUE;
  return new
Language($info);
}
?>

to
<?php
function language_default() {
 
$info = (array)variable_get('language_default', array(
   
'id'=> 'en',
   
'name'=> 'English',
   
'direction'=> 0,
   
'weight'=> 0,
   
'locked'=> 0,
  ));
 
$info['default'] = TRUE;
  return new
Language($info);
}
?>

and update.php shows me welcome page as normal.

after that i check update_prepare_d8_bootstrap()
in this code

<?php
try {
   
$system_schema = drupal_get_installed_schem a_version('system');
  }
  catch (\
Exception $e) {
   
$system_schema = db_query('SELECT schema_version FROM {system} WHERE name = :system', array(':system'=> 'system'))->fetchField();
  }
?>

$system_schema return me 8031 but 7078 in system table present.

Now I perform further debugging of this issue.

I will be grateful for the any tips.


Viewing all articles
Browse latest Browse all 294704

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>