Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument #2 must be of type array, string given in /.../craft-bulkedit/src/fields/processors/RelationFieldProcessor.php:49 #51

Open
moldedjelly opened this issue Jul 11, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@moldedjelly
Copy link

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

@moldedjelly moldedjelly added the bug Something isn't working label Jul 11, 2023
@blacksaltstudio
Copy link

@Mosnar - Is there any update on this issue?

@yzaman24
Copy link

@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.

@torbjornlarssen
Copy link

torbjornlarssen commented Apr 23, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants