繁体   English   中英

TYPO3扩展迁移

[英]TYPO3 extension migration

我正在尝试将旧扩展从TYPO3 4.7迁移到7.6。 问题是我没有得到任何错误输出,仅刷新了后端,这使调试变得很困难。 也许有人可以看到导致此问题的代码出了什么问题。 此扩展已在PHP 5.3上开发,我在TYPO3 7.6上使用5.6。

$linksToApproveWithoutCategory = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( 'uid,label,pid,description,href', $theTable, $theField . '=' . $GLOBALS['TYPO3_DB']->quoteStr( $theValue, $theTable ) . ' ' . $whereClause, $groupBy, $orderBy, $limit );



if(count($linksToApproveWithoutCategory) > 0) {
    // Links without category
    for($i = 0; $i < count($linksToApproveWithoutCategory); $i++) {
        $content .= '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">';

        // Alternating row colors
        $content .= $switch ? '<tr bgcolor="' . $doc['bgColor5'] . '">' : '<tr>' ;
        $switch = !$switch;

        // Starting content
        $content .= '<td style="vertical-align:top;"><input type="text" name="label" value="' . $linksToApproveWithoutCategory[$i]['label'] . '" size="30" /></td>';
        $content .= '<td><textarea name="description" rows="5">' . \TYPO3\CMS\Core\Utility\GeneralUtility::formatForTextarea( $linksToApproveWithoutCategory[$i]['description'] ) . '</textarea></td>';
        $content .= '<td style="vertical-align:top;"><input type="text" name="href" value="' . $linksToApproveWithoutCategory[$i]['href'] . '" size="30" /></td>';

        $content .= '<td style="vertical-align:top;"><select name="categoryUID"><option value="0"></option>';

        foreach((array) $categories as $category) {
            $content .= '<option value="' . $category['uid'] . '">';

            if($category['parent_category'] > 0) {
                $content .= '-- ';
            }

            $content .= $category['label'] . '</option>';
        }
        $content .= '</select></td>';

        $content .= '<td style="vertical-align:top;"><input type="image" src="/fileadmin/user_upload/action_accept.gif" style="border:0px;" alt="' . $GLOBALS['LANG']->getLL( 'ViewLinksToApprove_accept' ) . '" title="' . $GLOBALS['LANG']->getLL( 'ViewLinksToApprove_accept' ) . '" /></td>';
        $content .= "<td style=\"vertical-align:top;\"><a href=\"?action=getViewDeleteLink&id=" . $this->id . "&uid=" . $linksToApproveWithoutCategory[$i]['uid'] . "\"><img src=/fileadmin/user_upload/action_delete.gif\" border=\"0\" alt=\"" . $GLOBALS['LANG']->getLL( 'ViewLinksToApprove_delete' ) . "\" title=\"" . $GLOBALS['LANG']->getLL( 'ViewLinksToApprove_delete' ) . "\"></a></td>";
        $content .= '</tr>';

        $content .= '<input type="hidden" name="id" value="' . $this->id . '" /><input type="hidden" name="uid" value="' . $linksToApproveWithoutCategory[$i]['uid'] . '" /><input type="hidden" name="action" value="getViewAcceptLink" /></form>';
    }
}

我已经更改了一些不推荐使用的名称空间,但是在按下“提交”按钮时会刷新。

我认为您错过了TYPO3 6.2的改编

在6.2中,所有旧类名仍然可用。 因此您的扩展程序可以使用,并且可以生成弃用日志。

也许您可以使用7中提供的compatible6层。否则,您需要盲目地纠正旧扩展:指定具有完整名称空间的所有类,查找不推荐使用的函数和类的替代品。

弃用清单:
-https://api.typo3.org/typo3cms/7/html/deprecated.html
-https://api.typo3.org/typo3cms/62/html/deprecated.html
-https://api.typo3.org/typo3cms/61/html/deprecated.html
-https://api.typo3.org/typo3cms/60/html/deprecated.html
-https://api.typo3.org/typo3cms/47/html/deprecated.html
-https://api.typo3.org/typo3cms/45/html/deprecated.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM