TYPO3 SQL错误: 字段 ‘tx_imagezoom_set’ 没有默认值

huangapple go评论48阅读模式
英文:

TYPO3 SQL error: Field 'tx_imagezoom_set' doesn't have a default value

问题

我需要在 TYPO3 网站(版本 9.5.22)的现有页面上添加内容,但每当我点击“保存”时,出现以下错误:

SQL 错误:'字段 'tx_imagezoom_set' 没有默认值'(tt_content:NEW64187cc972b4d840487066)

由于没有名为 'tx_imagezoom_set' 的字段,我无法通过 TYPO3 定义该值。我感谢任何帮助,期待任何建议,因为我无法访问 ftp 文件以编写任何代码。

英文:

I need to add content onto an existing page on a TYPO3 website (version 9.5.22) and whenever I click on "save" following error occurs:

> SQL error: 'Field 'tx_imagezoom_set' doesn't have a default value' (tt_content:NEW64187cc972b4d840487066)

Since there is no field called tx_imagezoom_set I can't define that value via TYPO3. I am thankful for any help and look forward for any suggestion since I don't have the option to access the ftp files e.g. to code anything.

答案1

得分: 2

Most probably you have a database with strict mode activated. The ugly solution would be to disable the strict mode in the database configuration.

But better search the extensions in typo3conf/ext. Each extension that provides new database fields has a file called ext_tables.sql. There you need to set the default value.

Update:
I just read your question again. Without file access there is no way to fix this error!

英文:

Most probably you have a database with strict mode activated. The ugly solution would be to disable the strict mode in the database configuration.

But better search the extensions in typo3conf/ext. Each extension that provides new database fields has a file called ext_tables.sql. There you need to set the default value.

Update:
I just read your question again. Without file access there is no way to fix this error!

答案2

得分: 1

作为对 @peter-kraume 的回答的补充:
还可以从TCA为字段分配默认值。即使该字段在当前记录中不可见也适用。

https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/CommonProperties/Default.html#tca-property-default

当然,前提是您具有文件访问权限。

英文:

As an addition to @peter-kraume answer:
It is also possible to assign a default value to the field from the TCA. This also applies if the field is not visibly editable in the current record.

https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/CommonProperties/Default.html#tca-property-default

Of course, only if you have file access.

huangapple
  • 本文由 发表于 2023年3月20日 23:55:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/75792545.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定