自定义 TYPO3 v10 扩展中缺少列 UID [英] Column UID missing in custom TYPO3 v10 extension

查看:54
本文介绍了自定义 TYPO3 v10 扩展中缺少列 UID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将我的 TYPO3 项目从 v7 更新到 v10 时,我的自定义扩展遇到了一些困难.因此,我只是尝试从官方 TYPO3 网站重建演示扩展:https://docs.typo3.org/m/typo3/book-extbasefluid/10.4/en-us/4-FirstExtension/2-create-folder-structure-and-configuration-files.html 看看这些年来发生了什么变化.我按照网站上的说明进行操作.

While updating my TYPO3 project from v7 to v10, I encountered some difficulties with my custom extensions. Due to that I just tried to rebuild the demo extension from the official TYPO3 website: https://docs.typo3.org/m/typo3/book-extbasefluid/10.4/en-us/4-FirstExtension/2-create-folder-structure-and-configuration-files.html to see what has changed over the years. I followed the instruction as stated on the website.

成功激活扩展后,我浏览到列表视图,但出现以下错误:

After successfully activating the extension, I browsed to the list view but I get the following error:

字段列表"中的未知列uid"错误信息链接

Unknown column 'uid' in 'field list' link to error message

我检查了我的数据库,确实缺少uid"列,而存在pid"列.

I checked my database and the column 'uid' really is missing, column 'pid' exists.

这是我的 ext_tables.sql:

This is my ext_tables.sql:

    uid int(11) unsigned DEFAULT '0' NOT NULL auto_increment,
    pid int(11) DEFAULT '0' NOT NULL,

    name varchar(255) DEFAULT '' NOT NULL,
    description text NOT NULL,
    quantity int(11) DEFAULT '0' NOT NULL,

    PRIMARY KEY (uid),
    KEY parent (pid)
);

在我第二次尝试时,我从 https://github 复制了整个项目.com/TYPO3-Documentation-Examples/store_inventory 但仍然遇到同样的错误.

On my second attempt I copied the entire project from https://github.com/TYPO3-Documentation-Examples/store_inventory but still encounter the same error.

你知道我必须改变什么才能不再收到那个错误吗?

Do you have an idea what I have to change, to not receive that error anymore?

推荐答案

删除数据库表并重新创建后,它工作了.

After dropping the database table and creating it newly it worked.

这篇关于自定义 TYPO3 v10 扩展中缺少列 UID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆