首页 > 解决方案 > Typo3 将版本 6.x 更新到版本 8.x 尝试激活扩展

问题描述

我正在尝试将 Typo3 扩展从版本 6.x 升级到 8.x 。现在,当我尝试激活此扩展程序时,出现以下错误。

1351584844:必须提供参数“key”或“id”(更多信息)

TYPO3Fluid\Fluid\Core\Exception 在文件 /var/www/html/typo3_src-8.7.19/typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php 第 133 行中抛出。

我的 locallang.xlf 看起来像这样:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
            <xliff version="1.0" >
                <file source-language="en" datatype="plaintext" original="messages" date="2018-03-19T14:34:40Z"
                      product-name="certification">
                    <header/>
                    <body>
                        <!-- Zertifikatsgenerator -->
                        <trans-unit id="tx_certification_topic.Certification">
                            <source>Certificate generator</source>
                            <target>Zertifikatsgenerator</target>
                        </trans-unit>


                        <!-- Event -->
                        <trans-unit id="tx_certification_domain_model_event">
                            <source>Event</source>
                            <target>Seminar</target>
                        </trans-unit>`enter code here`
                        <trans-unit id="tx_certification_domain_model_event.start_date_time">
                            <source>Start Date</source>
                            <target>Beginn</target>
                        </trans-unit>
                        <trans-unit id="tx_certification_domain_model_event.end_date_time">
                            <source>End Date</source>
                            <target>Ende</target>
                        </trans-unit>

                        <trans-unit id="tx_certification_domain_model_event.whole_day">
                            <source>wholeDay</source>
                            <target>ganzer Tag</target>
                        </trans-unit>

                        <trans-unit id="tx_certification_domain_model_event.topic">
                            <source>Topic</source>
                            <target>Thema</target>
                        </trans-unit>
                        <trans-unit id="tx_certification_domain_model_event.location">
                            <source>Location</source>
                            <target>Ort</target>
                        </trans-unit>
                        <trans-unit id="tx_certification_domain_model_event.speaker">
                            <source>Speaker</source>
                            <target>Referent</target>
                        </trans-unit>

                        <trans-unit id="tx_certification_domain_model_event.price_netto" >
                            <source>Price Netto</source>
                            <target>Preis netto</target>
                        </trans-unit>

                        <trans-unit id="tx_certification_domain_model_event.sold_out" >
                            <source>Sold Out</source>
                            <target>Veranstaltung ausgebucht</target>
                        </trans-unit>
                        <trans-unit id="tx_certification_domain_model_event.learning_content">
                            <source>Learning Content</source>
                            <target>Lerninhalt</target>
                        </trans-unit>
                     </body>
                  </file>
              </xliff>
 

我的 locallang_csh_tx_certification_domain_model_event.xlf 看起来像这样:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
    <xliff version="1.0">
        <file source-language="en" datatype="plaintext" original="messages" date="2018-03-20T10:45:29Z"
              product-name="certification">
    <header/>
    <body>
        <trans-unit id="start_date_time.description">
            <target>Beginn</target>
            <source>start</source>
        </trans-unit>
        <trans-unit id="end_date_time.description">
            <source>endDateTime</source>
        </trans-unit>
        <trans-unit id="whole_day.description">
            <source>wholeDay</source>
        </trans-unit>
        <trans-unit id="topic.description">
            <source>topic</source>
        </trans-unit>
        <trans-unit id="topicFullName.description">
            <source>topicFullName</source>
        </trans-unit>
        <trans-unit id="location.description">
            <source>location</source>
        </trans-unit>
        <trans-unit id="speaker.description">
            <source>speaker</source>
        </trans-unit>
        <trans-unit id="price_netto.description">
            <source>priceNetto</source>
        </trans-unit>
        <trans-unit id="sold_out.description">
            <source>soldOut</source>
        </trans-unit>
        <trans-unit id="learning_content.description">
            <source>learningContent</source>
        </trans-unit>
    </body>
</file>
</xliff>

我的部分事件(FormFields.html):

    <label for="startDateTime">
        <f:translate key="tx_certification_domain_model_event.start_date_time" />
    </label><br />
    <f:form.textfield property="startDateTime"  value="{event.startDateTime->f:format.date()}" /><br />
    <label for="endDateTime">
        <f:translate key="tx_certification_domain_model_event.end_date_time" />
    </label><br />
    <f:form.textfield property="endDateTime"  value="{event.endDateTime->f:format.date()}" /><br />
    <label for="wholeDay">
        <f:translate key="tx_certification_domain_model_event.whole_day" />
    </label><br />
    <f:form.checkbox property="wholeDay" value="1" /><br />
    <label for="topic">
        <f:translate key="tx_certification_domain_model_event.topic" />
    </label><br />
    <f:form.textfield property="topic" /><br />
    <label for="location">
        <f:translate key="tx_certification_domain_model_event.location" />
    </label><br />
    <f:form.textfield property="location" /><br />
    <label for="speaker">
        <f:translate key="tx_certification_domain_model_event.speaker" />
    </label><br />
    <f:form.textfield property="speaker" /><br />
    <label for="priceNetto">
        <f:translate key="tx_certification_domain_model_event.price_netto" />
    </label><br />
    <f:form.textfield property="priceNetto" /><br />
    <label for="soldOut">
        <f:translate key="tx_certification_domain_model_event.sold_out" />
    </label><br />
    <f:form.checkbox property="soldOut" value="1" /><br />
    <label for="learningContent">
        <f:translate key="tx_certification_domain_model_event.learning_content" />
    </label><br />
    <f:form.textfield property="learningContent" /><br />


My Properties.html:
<table class="tx-certification" >
    <tr>
        <td>
            <f:translate key="tx_certification_domain_model_event.start_date_time" />
        </td>
        <td>
            {event.startDateTime -> f:format.date()}
        </td>
    </tr>
    <tr>
        <td>
            <f:translate key="tx_certification_domain_model_event.end_date_time" />
        </td>
        <td>
            {event.endDateTime -> f:format.date()}
        </td>
    </tr>
    <tr>
        <td>
            <f:translate key="tx_certification_domain_model_event.whole_day" />
        </td>
        <td>
            {event.wholeDay}
        </td>
    </tr>
    <tr>
        <td>
            <f:translate key="tx_certification_domain_model_event.topic" />
        </td>
        <td>
            {event.topic}
        </td>
    </tr>
    <tr>
        <td>
            <f:translate key="tx_certification_domain_model_event.location" />
        </td>
        <td>
            {event.location}
        </td>
    </tr>
    <tr>
        <td>
            <f:translate key="tx_certification_domain_model_event.speaker" />
        </td>
        <td>
            {event.speaker}
        </td>
    </tr>
    <tr>
        <td>
            <f:translate key="tx_certification_domain_model_event.price_netto" />
        </td>
        <td>
            {event.priceNetto}
        </td>
    </tr>
    <tr>
        <td>
            <f:translate key="tx_certification_domain_model_event.sold_out" />
        </td>
        <td>
            {event.soldOut}
        </td>
    </tr>
    <tr>
        <td>
            <f:translate key="tx_certification_domain_model_event.learning_content" />
        </td>
        <td>
            {event.learningContent}
        </td>
    </tr>
</table>

我的第一次尝试是比较locallang.xlf、locallang_csh_tx_certification_domain_model_event.xlf、FormFields.html 和 Properties.html 中的 id 和键。

先感谢您。

标签: phptypo3typo3-8.x

解决方案


经过长时间的调试,我们发现了问题。

问题是命名扩展密钥和扩展文件夹。

请确保它们相同。

错了

文件夹:b_a

钥匙:b-a

小而细的差别。


推荐阅读