Steps to reproduce:

1) Install D7 site
2) enable locale module
3) add second language
4) dump database and try to run D8 upgrade

Fatal error: Class 'Drupal\locale\StringDatabaseStorage' not found in /home/andypost/www/core8/core/modules/locale/locale.module on line 417

Yet one
#1919002-10: Upgrade to D8 broken when D7 has more then one language enabled

Proposed Resolution

TBD

Remaining tasks

CommentFileSizeAuthor
#27 language_content_upgrade.png21.44 KBandypost
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

Issue tags: +Needs tests

We have language upgrade path tests, wondering why they don't fail, can you have a look at that?

andypost’s picture

I'm now trying, because of #731724: Convert comment settings into a field to make them work with CMI and non-node entities depends on it. Probably this depends on comments but I tested this on vanila HEAD

andypost’s picture

core8/sites/d8.l$ drush updb
class_implements(): Class Drupal\locale\TranslationsStream does not exist and could not be loaded file.inc:204                                                [warning]
in_array() expects parameter 2 to be array, boolean given file.inc:204                                                                                        [warning]
PHP Fatal error:  Call to undefined function cache_clear_all() in /var/local/mods/drush/commands/core/drupal/update.inc on line 199

Fatal error: Call to undefined function cache_clear_all() in /var/local/mods/drush/commands/core/drupal/update.inc on line 199
Drush command terminated abnormally due to an unrecoverable error.                                                                                            [error]
Error: Call to undefined function cache_clear_all() in /var/local/mods/drush/commands/core/drupal/update.inc, line 199

php.log

[16-Feb-2013 15:20:43 UTC] Uncaught PHP Exception Exception: "Drupal\Core\DrupalKernel::serialize() must return a string or NULL" at /home/andypost/www/core8/core/modules/dblog/dblog.module line 153
[16-Feb-2013 15:20:43 UTC] Exception thrown when handling an exception (Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd8.cache_views_info' doesn't exist: SELECT cid, data, created, expire, serialized, tags, checksum_invalidations, checksum_deletions FROM {cache_views_info} WHERE cid IN (:cids_0); Array
(
    [:cids_0] => views:access
)
)
[16-Feb-2013 15:28:21 UTC] Uncaught PHP Exception PDOException: "You cannot serialize or unserialize PDO instances" at /home/andypost/www/core8/core/modules/dblog/dblog.module line 153
[16-Feb-2013 15:28:21 UTC] Exception thrown when handling an exception (Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd8.cache_views_info' doesn't exist: SELECT cid, data, created, expire, serialized, tags, checksum_invalidations, checksum_deletions FROM {cache_views_info} WHERE cid IN (:cids_0); Array
(
    [:cids_0] => views:access
)
)
[16-Feb-2013 15:36:44 UTC] PHP Fatal error:  Class 'Drupal\locale\StringDatabaseStorage' not found in /home/andypost/www/core8/core/modules/locale/locale.module on line 417
[16-Feb-2013 15:36:44 UTC] PHP Fatal error:  require_once(): Failed opening required '/home/andypost/www/core8/includes/locale.inc' (include_path='.:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear') in /home/andypost/www/core8/core/includes/language.inc on line 459
[16-Feb-2013 23:18:28 UTC] Uncaught PHP Exception PDOException: "You cannot serialize or unserialize PDO instances" at /home/andypost/www/core8/core/modules/dblog/dblog.module line 153

http://qa.drupal.org/pifr/test/446893 shows again #1916556-1: Random test failures - The string cannot be saved

YesCT’s picture

Issue tags: +Novice, +Needs manual testing, +D8MI

tagging novice to do manual testing to reproduce

sun’s picture

Status: Active » Postponed (maintainer needs more info)

Drush's upgrade facility might not be fully ported yet. In any case, @andypost, can you make sure that you're able to reproduce this without Drush?

andypost’s picture

Status: Postponed (maintainer needs more info) » Active

@sun issue summary filed with error I got in browser. #3 the php error log and attempt in drush

andypost’s picture

Priority: Critical » Major

Still waiting for confirmation

Gábor Hojtsy’s picture

Priority: Major » Critical

@andypost: would be great to track down why is locale_storage() called (that is where the error is coming from). It could be t() "accidentally" called in the upgrade path.

Gábor Hojtsy’s picture

Priority: Critical » Major

Crosspost.

vijaycs85’s picture

Here is what I did git a new error:

1. git clone 7.x
2. Installed
3. Enabled locale and added new language
4. git checkout 8.x
5. visit update.php

Getting PHP Fatal error: Call to a member function get() on a non-object in E:\htdocs\drupal-7\core\includes\theme.maintenance.inc on line 59 and line:59 is $module_handler = drupal_container()->get('module_handler');

UPDATE:
Adding log for more info:

PHP Fatal error:  Call to a member function get() on a non-object in E:\htdocs\drupal-7\core\includes\theme.maintenance.inc on line 59 
PHP Stack trace:
 PHP   1. _drupal_exception_handler() E:\htdocs\drupal-7\core\includes\bootstrap.inc:0
 PHP   2. _drupal_log_error() E:\htdocs\drupal-7\core\includes\bootstrap.inc:2262
 PHP   3. drupal_maintenance_theme() E:\htdocs\drupal-7\core\includes\errors.inc:185
 PHP   4. _drupal_maintenance_theme() E:\htdocs\drupal-7\core\includes\bootstrap.inc:2656 
andypost’s picture

Confirm #10 for now it seems like some t() or format_plural() called too early

jthorson’s picture

RE: #8 ... in #1907960-61: Helper issue for "Comment field", I tracked down which string was tripping the exception for that issue.

andypost’s picture

The issue with "helper" is different - we can't use get_t() in hook_update_N() So it lives in #1916556: Random test failures - The string cannot be saved

This one is different. And I also fount that we have wrong node-type in upgrade tests file drupal-7.filled.standard_all.database.php
node_types table defines D7 (article) type but actual data was copy-pasted as D6(story)

db_insert('node')->fields(array(
  'nid',
  'vid',
  'type',
  'language',
  'title',
  'uid',
  'status',
  'created',
  'changed',
  'comment',
  'promote',
  'sticky',
  'tnid',
  'translate',
))
->values(array(
  'nid' => '1',
  'vid' => '2',
  'type' => 'page',
  'language' => 'und',
  'title' => 'node title 1 rev 1 (i=0) rev2 2',
  'uid' => '3',
  'status' => '0',
  'created' => '1262754000',
  'changed' => '1338795201',
  'comment' => '0',
  'promote' => '0',
  'sticky' => '0',
  'tnid' => '0',
  'translate' => '0',
))
...
->values(array(
  'nid' => '13',
  'vid' => '25',
  'type' => 'story',
  'language' => 'und',
  'title' => 'node title 13 rev 25 (i=12)',
  'uid' => '4',
  'status' => '1',
  'created' => '1263790800',
  'changed' => '1338795201',
  'comment' => '0',
  'promote' => '0',
  'sticky' => '0',
  'tnid' => '0',
  'translate' => '0',
))
....

db_insert('node_type')->fields(array(
  'type',
  'name',
  'base',
  'module',
  'description',
  'help',
  'has_title',
  'title_label',
  'custom',
  'modified',
  'locked',
  'disabled',
  'orig_type',
))
->values(array(
  'type' => 'page',
  'name' => 'Basic page',
  'base' => 'node_content',
  'module' => 'node',
  'description' => "Use <em>basic pages</em> for your static content, such as an 'About us' page.",
  'help' => '',
  'has_title' => '1',
  'title_label' => 'Title',
  'custom' => '1',
  'modified' => '1',
  'locked' => '0',
  'disabled' => '0',
  'orig_type' => 'page',
))
->values(array(
  'type' => 'article',
  'name' => 'Article',
  'base' => 'node_content',
  'module' => 'node',
  'description' => 'Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.',
  'help' => '',
  'has_title' => '1',
  'title_label' => 'Title',
  'custom' => '1',
  'modified' => '1',
  'locked' => '0',
  'disabled' => '0',
  'orig_type' => 'article',
))
...

Gábor Hojtsy’s picture

@andypost: you should not use any get_t(), t(), st() or whatever in the upgrade path anyway. It could be possible to make it work, but I'm not sure... Anyway, that would already happen with one foreign language I guess, so not sure what special is happening with 2.

andypost’s picture

@Gabor issue about usage of t() in updates #1916556-5: Random test failures - The string cannot be saved

This one about upgrade that currently broken

andypost’s picture

danielnolde’s picture

Issue summary: View changes

Updated issue summary.

danielnolde’s picture

Hehe, i up the ante:

1. D7 download
2. Enable locale.module, add second language (German)
3. Dump db and import it into my D8 test instance db (D8 code freshly updated, DB empty)
4. visit update.php

produces:

Additional uncaught exception thrown while handling exception.

Original

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table &#039;drupal8.cache_views_info&#039; doesn&#039;t exist: SELECT cid, data, created, expire, serialized, tags, checksum_invalidations, checksum_deletions FROM {cache_views_info} WHERE cid IN (:cids_0); Array ( [:cids_0] =&gt; views:access ) in Drupal\Core\Database\Connection->query() (line 554 of /Volumes/daten2/projekte/drupal8/code/www/core/lib/Drupal/Core/Database/Connection.php).

Additional

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table &#039;drupal8.cache_views_info&#039; doesn&#039;t exist: SELECT cid, data, created, expire, serialized, tags, checksum_invalidations, checksum_deletions FROM {cache_views_info} WHERE cid IN (:cids_0); Array ( [:cids_0] =&gt; views:access ) in Drupal\Core\Database\Connection->query() (line 554 of /Volumes/daten2/projekte/drupal8/code/www/core/lib/Drupal/Core/Database/Connection.php).

<:)

danielnolde’s picture

Never mind, something seems to be broken with update.php in general or with my very instance, since a mono-lingual D7>D8 update produces the same error as in #17.

danielnolde’s picture

Issue summary: View changes

Added yet another comment to error list.

fakingfantastic’s picture

I'm about to try this out manually now.

fakingfantastic’s picture

I'm getting: PHP Fatal error: Call to a member function get() on a non-object in /path/to/drupal/core/includes/theme.maintenance.inc on line 59

Here's what I did:

  • checkout 7.x
  • install
  • enable Locale
  • add language (german)
  • checkout 8.x

Next page load bricks. I noticed this same error happened when my 8.x was behind after coming back to it a week later, and doing a pull.

tstoeckler’s picture

Re #20: I'm pretty sure that is similar to what I found in #1784312-84: Stop doing so much pre-kernel bootstrapping. Really digging in the dark there, though.

tstoeckler’s picture

YesCT’s picture

Issue summary: View changes

add remaining tasks section to make it clear what this needs.

YesCT’s picture

tagging for using the issue summary template.
and to start taggin d8 upgrade path issues.

xjm’s picture

Priority: Major » Critical

100% release blocker.

swentel’s picture

#10 and #20 are fixed by #1948650: Update is broken

Tried a manual update and had no problems running the upgrade, however, language was disabled for some reason, but re-enabling the module, I still have two languages.

swentel’s picture

Ok, scrap that, second run, everything was fine, I was messing around too much with other stuff testing the patch mentioned in #24.
If someone else can confirm it works with the patch in #1948650: Update is broken - we can actually close this one.

chx’s picture

Status: Active » Closed (duplicate)

Per swentel's report I am closing this. This issue seems to have 3-4 different kinds of bug reports, some already fixed, some bogus, some duplicate so I am closing as duplicated. If someone can reproduce after #1948650: Update is broken goes in (or manually applied) then please reopen with clean reproduction instructions, OS and PHP versions.

andypost’s picture

Priority: Critical » Normal
FileSize
21.44 KB

Yes, #1948650: Update is broken solves install issue!

But after upgrade translations are weird: language_content_upgrade.png
But I think it's different issue #1949870: Translation (deprecated) UI broken

The only notices I get after upgrade

    Debug:

    'Missing handler: node created sort'

    in views_get_handler() (line 935 of core/modules/views/views.module).
    Debug:

    'Missing handler: node sticky sort'

    in views_get_handler() (line 935 of core/modules/views/views.module).
    Debug:

    'Missing handler: node promote filter'

    in views_get_handler() (line 935 of core/modules/views/views.module).
    Debug:

    'Missing handler: node status filter'

    in views_get_handler() (line 935 of core/modules/views/views.module).
    Debug:

    'Missing handler: views area_text_custom area'

    in views_get_handler() (line 935 of core/modules/views/views.module).
    Debug:

    'Missing handler: node node_listing_empty area'

    in views_get_handler() (line 935 of core/modules/views/views.module).
    Debug:

    'Missing handler: views title area'

    in views_get_handler() (line 935 of core/modules/views/views.module).
    Debug:

    'Missing handler: node created sort'

    in views_get_handler() (line 935 of core/modules/views/views.module).
    Debug:

    'Missing handler: node sticky sort'

    in views_get_handler() (line 935 of core/modules/views/views.module).
    Debug:

    'Missing handler: node promote filter'

    in views_get_handler() (line 935 of core/modules/views/views.module).
    Debug:

    'Missing handler: node status filter'

    in views_get_handler() (line 935 of core/modules/views/views.module).
    Debug:

    'Missing handler: views area_text_custom area'

    in views_get_handler() (line 935 of core/modules/views/views.module).
    Debug:

    'Missing handler: node node_listing_empty area'

    in views_get_handler() (line 935 of core/modules/views/views.module).
    Debug:

    'Missing handler: views title area'

    in views_get_handler() (line 935 of core/modules/views/views.module).
swentel’s picture

Yeah, I'm getting those notices as well, but that's related to views and node enabling, not sure if there's an existing issue for that.

ParisLiakos’s picture

xjm’s picture

xjm’s picture

Issue summary: View changes

Updated issue summary.