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
With Pimcore 10 and ProcessManager 4.x there might be monitoring objects in the database without metaData which results in an empty string. In my case this was caused by an command executed via cron job where the code segment
created such an monitoringItem if no monitoring-item-id was passed.
Problem effect
However, when having such objects in database you will find the error
php.CRITICAL: Uncaught Error: Elements\Bundle\ProcessManagerBundle\Model\MonitoringItem::setMetaData(): Argument #1 ($metaData) must be of type array, null given, called in .../vendor/pimcore/pimcore/lib/Model/AbstractModel.php on line 186
in your log files as since ProcessManager 5.x this parameter is mandatory array. ProcessManager will not load the Process Log
Possible solution
You easily can overcome this issue by running
UPDATE bundle_process_manager_monitoring_item SET `metaData` = "[]" WHERE `metaData` = ''
SQL command on the database.
This could also be put in a migration script or if it's not worth the effort (seems not to happen frequently on migrations as there was no issue raised up to now) you can close this issue as it's anyhow documented here how to solve the problem
The text was updated successfully, but these errors were encountered:
We're having the same problem after the upgrade to Pimcore 11:
{"message":"Uncaught Error: Elements\Bundle\ProcessManagerBundle\Model\MonitoringItem::setMetaData(): Argument #1 ($metaData) must be of type array, null given, called in /var/www/html/vendor/pimcore/pimcore/lib/Model/AbstractModel.php on line 186","context":{"exception":{"class":"TypeError","message":"Elements\Bundle\ProcessManagerBundle\Model\MonitoringItem::setMetaData(): Argument #1 ($metaData) must be of type array, null given, called in /var/www/html/vendor/pimcore/pimcore/lib/Model/AbstractModel.php on line 186","code":0,"file":"/var/www/html/vendor/elements/process-manager-bundle/src/Model/MonitoringItem.php:209"}},"level":500,"level_name":"CRITICAL","channel":"php","datetime":"2024-03-16T11:23:38.674477+01:00","extra":{"http.url":"","http.method":null,"http.useragent":null,"http.referer":null,"app.env":"int","trace_id":"0","span_id":"0"}}
In MonitoringItem.php line 209:
Elements\Bundle\ProcessManagerBundle\Model\MonitoringItem::setMetaData(): A
rgument #1 ($metaData) must be of type array, null given, called in /var/ww
w/html/vendor/pimcore/pimcore/lib/Model/AbstractModel.php on line 186
Problem reason
With Pimcore 10 and ProcessManager 4.x there might be monitoring objects in the database without metaData which results in an empty string. In my case this was caused by an command executed via
cron
job where the code segmentcreated such an monitoringItem if no monitoring-item-id was passed.
Problem effect
However, when having such objects in database you will find the error
in your log files as since ProcessManager 5.x this parameter is mandatory array. ProcessManager will not load the Process Log
Possible solution
You easily can overcome this issue by running
SQL command on the database.
This could also be put in a migration script or if it's not worth the effort (seems not to happen frequently on migrations as there was no issue raised up to now) you can close this issue as it's anyhow documented here how to solve the problem
The text was updated successfully, but these errors were encountered: