Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying a MetaModel is not possible #620

Closed
2 of 3 tasks
heliflieger opened this issue Nov 17, 2023 · 2 comments
Closed
2 of 3 tasks

Copying a MetaModel is not possible #620

heliflieger opened this issue Nov 17, 2023 · 2 comments
Assignees
Labels

Comments

@heliflieger
Copy link

heliflieger commented Nov 17, 2023

Checklist before I submit this issue report

I confirm that:

My environment is:

(Please fill in the actual values from your environment)

Key Value Comments
PHP version: 8.2.11
Contao version: 4.13.34
DC_General version:
Installation via composer: yes

Issue description

When trying to copy an existing MetaModel, an error message appears: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'tableName' cannot be null

Steps to reproduce

  1. Open MetaModels in Backend
  2. Click on Edit multiple
  3. Select MM-element to copy and klick on copy
  4. Insert with the insert Icon

Describe the behaviour of the application

An error is shown and the copy can not be created.

Logfile Output

[2023-11-17T21:01:14.887952+01:00] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\NotNullConstraintViolationException: "An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'tableName' cannot be null" at .....contao/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php line 114 {"exception":"[object] (Doctrine\\DBAL\\Exception\\NotNullConstraintViolationException(code: 1048): An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'tableName' cannot be null at ...../contao/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:114)\n[previous exception] [object] (Doctrine\\DBAL\\Driver\\PDO\\Exception(code: 1048): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'tableName' cannot be null at ...../contao/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28)\n[previous exception] [object] (PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'tableName' cannot be null at ....../contao/vendor/doctrine/dbal/src/Driver/PDO/Statement.php:130)"} []
@zonky2
Copy link
Contributor

zonky2 commented Nov 18, 2023

we should hide the button for copying at this point - in my opinion it makes little sense to copy one or more models here, especially since deep copy does not work here either

@zonky2
Copy link
Contributor

zonky2 commented Nov 21, 2023

move to MetaModels/core#1504

@zonky2 zonky2 closed this as completed Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants