简体   繁体   English

TYPO3来自tx_news的新数据记录中的Rich-Text-Editor(htmlarea)中的空字符

[英]TYPO3 Empty Characters in Rich-Text-Editor (htmlarea) in new Data records from tx_news

I've made an update from TYPO3 6.2 to TYPO3 7.6 . 我已经从TYPO3 6.2更新到TYPO3 7.6 Now I insert a new tx_news -data record -> insert only headline and some other required fields -> save & close. 现在,我插入一个新的tx_news -data记录->仅插入标题和其他一些必填字段->保存并关闭。

In preview (frontend) I see my entries but also 'empty characters' in some other textfields ( htmlarea richt-text-editor). 在预览(前端)中,我看到了我的条目,但在其他一些文本字段( htmlarea richt-text-editor)中也看到了“空字符”。 In my case 'Teilnahmemodalitäten'. 在我的情况下是“Teilnahmemodalitäten”。 The field is prefill with 2 characters. 该字段已预填充2个字符。 You'll see it if you're insert <f:debug>{newsItem.eventParticipationModalities}</f:debug> , see screenshot: 如果您插入<f:debug>{newsItem.eventParticipationModalities}</f:debug> ,则会看到它,请参见屏幕截图: 在RTF编辑器中预填充2个字符

And here you can see it in Backend. 在这里您可以在后端看到它。 The cursor is is on line 3: 光标在第3行: RTE不为空

I've made a condition, because I don't want to show the headline, if the field is empty .. but why my textfield isn't empty by default? 我做了一个条件,因为如果该字段为空.. 不想显示标题, 但是为什么默认情况下我的文本字段也不为空?

<f:if condition="{newsItem.eventParticipationModalities}">
  <div class="press-info">
    <h3>Teilnahmemodalitäten</h3>
    <f:format.raw>{newsItem.eventParticipationModalities}</f:format.raw>
    </div>
</f:if>

This field 'Teilnahmemodalitärten' is a extra field for tx_news . “Teilnahmemodalitärten”字段是tx_news的附加字段。 Here's my ext_tables.php : 这是我的ext_tables.php

'event_participation_modalities' => array(
    'exclude' => 0,
    'label' => 'LLL:EXT:.../locallang.xlf:news.event_participation_modalities',
    'config' => array(
        'type' => 'text',
        'enableRichtext' => true,
    ),
    'defaultExtras' => 'richtext'
),

and ext_tables.sql: 和ext_tables.sql:

CREATE TABLE tx_news_domain_model_news (
  ...
  event_participation_modalities text NOT NULL,
  ...
)

I haven't the problem with TYPO3 6.2 ... what can I do? TYPO3 6.2没问题...我该怎么办? Thanks for your help. 谢谢你的帮助。

You should use the VHS:TrimViewhelper to trim your value, like this: 您应该使用VHS:TrimViewhelper来调整值,如下所示:

{namespace v=FluidTYPO3\Vhs\ViewHelpers}
<f:if condition="{newsItem.eventParticipationModalities -> v:format.trim()}">
  <div class="press-info">
    <h3>Teilnahmemodalitäten</h3>
    <f:format.raw>{newsItem.eventParticipationModalities}</f:format.raw>
    </div>
</f:if>

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

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