Bug #100118
closedAdd warning modal before executing ext_tables_static+adt.sql
100%
Description
Extensions might contain a file named "ext_tables_static+adt.sql" (Documentation). In short, this allows to create static data per SQL.
If this file exists, a button is automatically created in the Extension Manager.
As soon as you click the button, the static SQL data will be imported. Existing data will be dropped.
A new modal should warn the user before executing the file, with buttons to start or abort the task.
Furthermore, the button's titles can be misleading:
- "Nothing has changed since last import. You might want to reload static database data."
- "The static database data has changed. You should re-import the data."
Might or even should will highly depend on the individual use case of the static data. If it is only used to kickstart an extension setup once, you will not want to replace the existing and probably modified data in your database (even if the extension added something to the SQL subsequently).
Updated by Nicole Cordes over 1 year ago
Hi Sebastian,
Thank you for your issue report. As I think a modal wouldn't hurt, I do not share your opinion in general. The ext_tables_static+adt.sql file is used to import static data into the database. You should never change this data in the database directly and thus make the static file outdated. It is designed to be the "truth of data". If you need changes to the data, you should always adjust the static data in ext_tables_static+adt.sql and trigger a re-import. I don't see any misleading in the title here, if this concept is used correctly.
Updated by Sebastian Klein over 1 year ago
Hi Nicole,
Thank you for the clarification! It seems that I misinterpreted the scope of this feature. I will then look into other ways to initially create some records for an extension.
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80327
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80362
Updated by Sebastian Klein over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 2aef60cfe129285948756b7f2bd00b547a2cfb47.