从 7.6.32 升级到 8.7.29 后的问题
Problem after the upgrade from 7.6.32 to 8.7.29
我刚刚按照官方文档将typo3从7.6.32升级到8.7.29。实际上升级很顺利,我能够使用安装工具执行所有必需的步骤(特别是升级向导和重要操作)。
升级后,FE 似乎工作正常,但 BE 中出现了一些问题。
每次尝试登录 BE 时,我都会收到以下 typo3 异常:
Uncaught TYPO3 Exception
Class 'TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException' not found
Error thrown in file
/var/www/mysite/typo3_src-8.7.29/typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php in line 133.
此文件的第 133 行是函数 "renderStatic" 的一部分,代码如下:
110. public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
111. {
112. $key = $arguments['key'];
113. $id = $arguments['id'];
114. $default = $arguments['default'];
115. $htmlEscape = $arguments['htmlEscape'];
116. $extensionName = $arguments['extensionName'];
117. $arguments = $arguments['arguments'];
118.
119. if ($htmlEscape !== null) {
120. GeneralUtility::logDeprecatedViewHelperAttribute(
121. 'htmlEscape',
122. $renderingContext,
123. 'Please wrap the view helper in <f:format.raw> if you want to disable HTML escaping, which is enabled by default now.'
124. );
125. }
126.
127. // Wrapper including a compatibility layer for TYPO3 Flow Translation
128. if ($id === null) {
129. $id = $key;
130. }
131.
132. if ((string)$id === '') {
133. throw new InvalidVariableException('An argument "key" or "id" has to be provided', 1351584844);
134. }
尽管有这个错误,BE 左侧的主菜单似乎工作正常,但如果我去 "DB check" --> "Relations" 我得到了另一个异常:
#1476107295: PHP Warning: Invalid argument supplied for foreach() in /var/www/mysite/typo3_src-8.7.29/typo3/sysext/core/Classes/Integrity/DatabaseIntegrityCheck.php line 352 (More information)
这里是该文件的相关代码部分。
347 public function getGroupFields($mode)
348 {
349 $result = [];
350 foreach ($GLOBALS['TCA'] as $table => $tableConf) {
351 $cols = $GLOBALS['TCA'][$table]['columns'];
352 foreach ($cols as $field => $config) {
353 if ($config['config']['type'] === 'group') {
354 if ((!$mode || $mode === 'file') && $config['config']['internal_type'] === 'file' || (!$mode || $mode ==='db') && $config['config']['internal_type'] === 'db') {
355 $result[$table][] = $field;
356 }
357 }
358 if ((!$mode || $mode === 'db') && $config['config']['type'] === 'select' && $config['config']['foreign_table']) {
359 $result[$table][] = $field;
360 }
361 }
362 if ($result[$table]) {
363 $result[$table] = implode(',', $result[$table]);
364 }
365 }
366 return $result;
367 }
As far as I can see all the rest works fine.
My system details:
- Linux (kernel 4.4.190)
- Apache 2.4.39
- PHP 7.2.24
- Typo3 8.7.29
Thanks in advance for your help!
这里有两个不同的问题:
第一个是某物正在使用
第二个是你的TCA明显损坏了。有一个 table,它没有列定义。
这两种情况都可能是由某些扩展引起的,因此请尝试尽可能禁用所有扩展并逐个重新启用它们。
我刚刚按照官方文档将typo3从7.6.32升级到8.7.29。实际上升级很顺利,我能够使用安装工具执行所有必需的步骤(特别是升级向导和重要操作)。 升级后,FE 似乎工作正常,但 BE 中出现了一些问题。
每次尝试登录 BE 时,我都会收到以下 typo3 异常:
Uncaught TYPO3 Exception
Class 'TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException' not found
Error thrown in file
/var/www/mysite/typo3_src-8.7.29/typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php in line 133.
此文件的第 133 行是函数 "renderStatic" 的一部分,代码如下:
110. public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
111. {
112. $key = $arguments['key'];
113. $id = $arguments['id'];
114. $default = $arguments['default'];
115. $htmlEscape = $arguments['htmlEscape'];
116. $extensionName = $arguments['extensionName'];
117. $arguments = $arguments['arguments'];
118.
119. if ($htmlEscape !== null) {
120. GeneralUtility::logDeprecatedViewHelperAttribute(
121. 'htmlEscape',
122. $renderingContext,
123. 'Please wrap the view helper in <f:format.raw> if you want to disable HTML escaping, which is enabled by default now.'
124. );
125. }
126.
127. // Wrapper including a compatibility layer for TYPO3 Flow Translation
128. if ($id === null) {
129. $id = $key;
130. }
131.
132. if ((string)$id === '') {
133. throw new InvalidVariableException('An argument "key" or "id" has to be provided', 1351584844);
134. }
尽管有这个错误,BE 左侧的主菜单似乎工作正常,但如果我去 "DB check" --> "Relations" 我得到了另一个异常:
#1476107295: PHP Warning: Invalid argument supplied for foreach() in /var/www/mysite/typo3_src-8.7.29/typo3/sysext/core/Classes/Integrity/DatabaseIntegrityCheck.php line 352 (More information)
这里是该文件的相关代码部分。
347 public function getGroupFields($mode)
348 {
349 $result = [];
350 foreach ($GLOBALS['TCA'] as $table => $tableConf) {
351 $cols = $GLOBALS['TCA'][$table]['columns'];
352 foreach ($cols as $field => $config) {
353 if ($config['config']['type'] === 'group') {
354 if ((!$mode || $mode === 'file') && $config['config']['internal_type'] === 'file' || (!$mode || $mode ==='db') && $config['config']['internal_type'] === 'db') {
355 $result[$table][] = $field;
356 }
357 }
358 if ((!$mode || $mode === 'db') && $config['config']['type'] === 'select' && $config['config']['foreign_table']) {
359 $result[$table][] = $field;
360 }
361 }
362 if ($result[$table]) {
363 $result[$table] = implode(',', $result[$table]);
364 }
365 }
366 return $result;
367 }
As far as I can see all the rest works fine.
My system details:
- Linux (kernel 4.4.190)
- Apache 2.4.39
- PHP 7.2.24
- Typo3 8.7.29
Thanks in advance for your help!
这里有两个不同的问题:
第一个是某物正在使用
第二个是你的TCA明显损坏了。有一个 table,它没有列定义。
这两种情况都可能是由某些扩展引起的,因此请尝试尽可能禁用所有扩展并逐个重新启用它们。