Hi,
I am updating a D7 website into B and I am getting to #1015 in the update.php script when it throws a PDOException (see watchdog table entry below):
| 2024-03-12 09:11:58 | menu | a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:2065:"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'langcode' in 'field list': UPDATE {menu_links}...
I have checked the backdrop dB and these are the fields in the menu_links table which match the table definition in my version of drupal (7.100):
CREATE TABLE `menu_links` ( `menu_name` varchar(32) NOT NULL DEFAULT '', `mlid` int(10) unsigned NOT NULL AUTO_INCREMENT, `plid` int(10) unsigned NOT NULL DEFAULT '0', `link_path` varchar(255) NOT NULL DEFAULT '', `router_path` varchar(255) NOT NULL DEFAULT '', `link_title` varchar(255) NOT NULL DEFAULT '', `options` blob COMMENT 'A serialized array of options to be passed to the url() or l() function, such as a query string or HTML attributes.', `module` varchar(255) NOT NULL DEFAULT 'system', `hidden` smallint(6) NOT NULL DEFAULT '0', `external` smallint(6) NOT NULL DEFAULT '0', `has_children` smallint(6) NOT NULL DEFAULT '0', `expanded` smallint(6) NOT NULL DEFAULT '0', `weight` int(11) NOT NULL DEFAULT '0', `depth` smallint(6) NOT NULL DEFAULT '0', `customized` smallint(6) NOT NULL DEFAULT '0', `p1` int(10) unsigned NOT NULL DEFAULT '0', `p2` int(10) unsigned NOT NULL DEFAULT '0', `p3` int(10) unsigned NOT NULL DEFAULT '0', `p4` int(10) unsigned NOT NULL DEFAULT '0', `p5` int(10) unsigned NOT NULL DEFAULT '0', `p6` int(10) unsigned NOT NULL DEFAULT '0', `p7` int(10) unsigned NOT NULL DEFAULT '0', `p8` int(10) unsigned NOT NULL DEFAULT '0', `p9` int(10) unsigned NOT NULL DEFAULT '0', `updated` smallint(6) NOT NULL DEFAULT '0', `language` varchar(12) NOT NULL DEFAULT 'und', `i18n_tsid` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`mlid`), KEY `path_menu` (`link_path`(128),`menu_name`), KEY `menu_plid_expand_child` (`menu_name`,`plid`,`expanded`,`has_children`), KEY `menu_parents` (`menu_name`,`p1`,`p2`,`p3`,`p4`,`p5`,`p6`,`p7`,`p8`,`p9`), KEY `router_path` (`router_path`(128)) ) ENGINE=MyISAM AUTO_INCREMENT=1242 DEFAULT CHARSET=utf8;
So, I note that the error is correct, there is no field langcode, however there is a field language. Are these meant to be the same field? How do I progress past this error?
I would think I need to change the name of this field in the install script, but am I going to trip up over this again.
NB my drupal website supports two different languages (de and en)
Hi. These problems are always hard to pinpoint - you may think it has to do with something specific, to find out that the problem you are seeing is the result of a chain reaction happening for something different.
This is speculation: at times, when the update script encounters a warning, it will want to report it to the UI and this sometimes can trigger a menu tree rebuild. So, I would investigate why line 2019 is trying to unserialize a stdClass. This should not be happening if the database query that ran right before would have worked properly.
Do you have a way to insert a breakpoint there using xdebug to check what's happening - why you are getting a stdClass object? I see line 2017 seems to be the first one so far in system.install to do a direct db query to the database. Are you certain you have the right database credentials AND access levels in settings.php?