我執行
patch -p1 < bin/patchs/fieldCollection.patch
輸出:
can't find file to patch at input line 5
Perhaps you used the wrong -p
or --strip option? The text leading up to this was:
-------------------------- |diff --git a/src/Plugin/Field/FieldType/FieldCollection.php
b/src/Plugin/Field/FieldType/FieldCollection.php |index
8721220..c5335be 100644 |--- a/src/Plugin/Field/FieldType/FieldCollection.php |+++
b/src/Plugin/Field/FieldType/FieldCollection.php
-------------------------- File to patch:
在這一點上,我發現我的電腦 「FieldCollection.php」 的文件上,把絕對路徑
/用戶/team1/workspace/ga_p/modules/field_collection/src/Plugin/Field/FieldType/FieldCollection.php
patching file /Users/team1/workspace/ga_p/modules/field_collection/src/Plugin/Field/FieldType/FieldCollection.php
Hunk #1 FAILED at 183. Hunk #2 succeeded at 159 (offset -68 lines). 1
out of 2 hunks FAILED -- saving rejects to file
/Users/team1/workspace/ga_p/modules/field_collection/src/Plugin/Field/FieldType/FieldCollection.php.rej
can't find file to patch at input line 47 Perhaps you used the wrong
-p or --strip option? The text leading up to this was:
-------------------------- |diff --git a/src/Plugin/Field/FieldWidget/FieldCollectionEmbedWidget.php
b/src/Plugin/Field/FieldWidget/FieldCollectionEmbedWidget.php |index
4d6ae09..800383f 100644 |---
a/src/Plugin/Field/FieldWidget/FieldCollectionEmbedWidget.php |+++
b/src/Plugin/Field/FieldWidget/FieldCollectionEmbedWidget.php
File to patch: /Users/team1/workspace/ga_p/modules/field_collection/src/Plugin/Field/FieldWidget/FieldCollectionEmbedWidget.php
在這一點上,我在我的電腦上找到 「FieldCollectionEmbedWidget.php」 文件,並將絕對路徑
/用戶/ TEAM1 /工作區/ ga_p /模塊/ field_collection/src目錄/插件/場/FieldWidget/FieldCollectionEmbedWidget.php
patching file
/Users/team1/workspace/ga_p/modules/field_collection/src/Plugin/Field/FieldWidget/FieldCollectionEmbedWidget.php
Hunk #1 succeeded at 111 (offset 7 lines).
但是問題仍然存在
同樣的問題在這裏https://drupal.stackexchange.com/questions/245964/argument-1-passed-to-entityviewbuilder-must-implement-interface-null-given –