spicywebau / craft-fieldlabels

Override Craft CMS field labels and instructions in the field layout designer
MIT License
123 stars 9 forks source link

Ignore labels that belong to deleted field layouts #58

Closed iainsaxon closed 4 years ago

iainsaxon commented 4 years ago

We encountered an issue where the migration would fail because $fieldsService->getLayoutById() would return null for a layout where dateDeleted was set.

By skipping the label processing here during the check for the layout details we also make sure that the empty layout does not get processed later in the method where it tries to write directly to the database.

This should still perform OK as the Fields service caches layout results internally.

ttempleton commented 4 years ago

Thanks!