Hello,
Error receiving progress:
1. I installed an extension that creates an enum type field "customerType" in the Case entity with the options "Person" and "Company".
2. Placed that field in Case detail layout.
3. Created Case record with "customerType" option "Company".
4. I added another option to this field via Entity Manager called "another option".
5. Later I decided to uninstall this extension.
6. After uninstall field was gone but in Case entity I get Error 500.
Logs says:
When I added another option via Entity Manager, this change appeared in the custom part of the system when my extension was created via the module. So I think this is what caused the error. I know that all changes made through Entity Manager appear in the custom section, but this becomes a mismatch when you want to uninstall an extension whose field was changed through Entity Manager.
Espo ver: 8.4.2
PHP ver: 8.2.4
Database: MariaDB 5.2.1
Attached test extension .zip
customerType field json which was installed:
customerType field json after adding the option /custom/Espo/Custom/Resources/metadata/entityDefs/Case.json:
I removed the error by deleting "customerType" field part in /custom/Espo/Custom/Resources/metadata/entityDefs/Case.json.
Error receiving progress:
1. I installed an extension that creates an enum type field "customerType" in the Case entity with the options "Person" and "Company".
2. Placed that field in Case detail layout.
3. Created Case record with "customerType" option "Company".
4. I added another option to this field via Entity Manager called "another option".
5. Later I decided to uninstall this extension.
6. After uninstall field was gone but in Case entity I get Error 500.
Logs says:
Code:
[2024-12-06 08:52:17] CRITICAL: (0) Field 'customerType' has no type. :: GET /Case :: application\Espo\ORM\Defs\FieldDefs.php(74)
Espo ver: 8.4.2
PHP ver: 8.2.4
Database: MariaDB 5.2.1
Attached test extension .zip
customerType field json which was installed:
Code:
{ "fields": { "customerType": { "type": "enum", "options": [ "Person", "Company" ], "style": { "Person": null, "Company": null }, "default": "Company", "maxLength": 100, "isCustom": true, "required": true } } }
Code:
{ "fields": { "customerType": { "options": [ "Person", "Company", "another option" ], "style": { "Person": null, "Company": null, "another option": null } } } }
Comment