craft-bulkedit
craft-bulkedit copied to clipboard
Argument #2 must be of type array, string given in /.../craft-bulkedit/src/fields/processors/RelationFieldProcessor.php:49
Describe the bug Trying to bulk edit a tags field on multiple assets
Environmental Info
- Craft CMS Version: 4.4.14
- Multi-site Mode (Yes/No): No
- Plugin Version: 4.0.1
- PHP Version: 8.0.29
- Database Driver (MySQL/Postgres): mysql 8.0.29
Additional context The task queue seems to just get stuck on processing the bulk edit. I only discovered the error by looking in the queue log and found this:
[queue.ERROR] [TypeError] TypeError: array_merge(): Argument #2 must be of type array, string given in /[...]/vendor/venveo/craft-bulkedit/src/fields/processors/RelationFieldProcessor.php:49
@Mosnar - Is there any update on this issue?
@moldedjelly I can't seem to recreate this error. Do you think you can give a bit more details on your setup of fields? I'll be dedicated to resolving this issue these days.
@yzaman24 I'm having the same issue on Craft 3, while bulk editing tags on commerce products.
Bulk Edit version 2.0.6
TypeError: array_diff(): Argument #2 must be of type array, string given in /../vendor/venveo/craft-bulkedit/src/fields/processors/RelationFieldProcessor.php:39
Stack trace:
#0 /../vendor/venveo/craft-bulkedit/src/fields/processors/RelationFieldProcessor.php(39): array_diff()
#1 /../vendor/venveo/craft-bulkedit/src/base/AbstractFieldProcessor.php(37): venveo\bulkedit\fields\processors\RelationFieldProcessor::performSubtraction()
#2 /../vendor/venveo/craft-bulkedit/src/services/BulkEdit.php(233): venveo\bulkedit\base\AbstractFieldProcessor::processElementField()
#3 /../vendor/venveo/craft-bulkedit/src/queue/jobs/SaveBulkEditJob.php(69): venveo\bulkedit\services\BulkEdit->processHistoryItemsForElement()
#4 /../vendor/yiisoft/yii2-queue/src/Queue.php(243): venveo\bulkedit\queue\jobs\SaveBulkEditJob->execute()
#5 /../vendor/yiisoft/yii2-queue/src/cli/Queue.php(162): yii\queue\Queue->handleMessage()
#6 /../vendor/yiisoft/yii2-queue/src/cli/Command.php(146): yii\queue\cli\Queue->execute()
#7 [internal function]: yii\queue\cli\Command->actionExec()
#8 /../vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#9 /../vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()
#10 /../vendor/yiisoft/yii2/console/Controller.php(180): yii\base\Controller->runAction()
#11 /../vendor/yiisoft/yii2/base/Module.php(552): yii\console\Controller->runAction()
#12 /../vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction()
#13 /../vendor/craftcms/cms/src/console/Application.php(89): yii\console\Application->runAction()
#14 /../vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction()
#15 /../vendor/craftcms/cms/src/console/Application.php(118): yii\console\Application->handleRequest()
#16 /../vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest()
#17 /../craft(22): yii\base\Application->run()
#18 {main}
Job details from queue manager
{
"description": null,
"context": {
"ownerId": 16921,
"siteId": 8,
"elementType": "craft\\commerce\\elements\\Product",
"elementIds": "[\"206629\",\"913092\",\"204621\"]",
"fieldIds": "[232]",
"dateCreated": "2024-04-22 12:58:32",
"dateUpdated": "2024-04-22 12:58:32",
"uid": "5e8f2557-6223-4391-93bf-7d11f3bed9e1",
"id": 6
}
}
The field in question (id 232) is a tag field.