You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When records are deleted, warnings can appear (albeit only in sentry) due to missing translations. For example:
ErrorException: Warning: Trying to access array offset on value of type null
#42 /vendor/contao/news-bundle/src/Resources/contao/modules/ModuleNewsList.php(43): Contao\ModuleNewsList::generate
[…]
#21 /vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php(622): Contao\Controller::getContentElement
#20 /var/cache/prod/contao/dca/tl_content.php(318): tl_content::addCteType
[…]
#16 /vendor/contao/core-bundle/src/EventListener/DataContainer/RecordPreviewListener.php(85): Contao\CoreBundle\EventListener\DataContainer\RecordPreviewListener::compilePreview
#15 /vendor/contao/core-bundle/src/EventListener/DataContainer/RecordPreviewListener.php(67): Contao\CoreBundle\EventListener\DataContainer\RecordPreviewListener::storePrecompiledRecordPreview
#14 /vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php(1542): Contao\DC_Table::delete
#13 /vendor/madeyourday/contao-rocksolid-frontend-helper/src/Controller/JsonApiController.php(258): MadeYourDay\RockSolidFrontendHelper\Controller\JsonApiController::callDcaMethod
#12 /vendor/madeyourday/contao-rocksolid-frontend-helper/src/Controller/JsonApiController.php(184): MadeYourDay\RockSolidFrontendHelper\Controller\JsonApiController::deleteAction
[…]
#0 /public/index.php(44): null
I have shortened the stack trace a bit, as it would be very long in this case. Basically what happens is, that the JsonApiController instantiates the respective data container to call ->delete() on it - but this in turn triggers the ondelete_callback which in turn triggers other callbacks that will in turn render the content elements in this case. But within the JsonApiController's context, no translations are loaded and thus a warning occurs when the news list module is rendered for the back end for example.
Not really sure how to solve this though 🤔. I mean we could add System::loadLanguageFile('default') in the JsonApiController's actions. However, since it executes back end actions it might also need to load other language files.
The text was updated successfully, but these errors were encountered:
When records are deleted, warnings can appear (albeit only in sentry) due to missing translations. For example:
I have shortened the stack trace a bit, as it would be very long in this case. Basically what happens is, that the
JsonApiController
instantiates the respective data container to call->delete()
on it - but this in turn triggers theondelete_callback
which in turn triggers other callbacks that will in turn render the content elements in this case. But within theJsonApiController
's context, no translations are loaded and thus a warning occurs when the news list module is rendered for the back end for example.Not really sure how to solve this though 🤔. I mean we could add
System::loadLanguageFile('default')
in theJsonApiController
's actions. However, since it executes back end actions it might also need to load other language files.The text was updated successfully, but these errors were encountered: