I have read different SE posts and Drupal.org posts about applying patches using git but I am getting an error message whenever I try any of the following methods. the error is:
error: modules/callbacks.inc: No such file or directory
I tried:
curl https://www.drupal.org/files/issues/op_update_should_be_create-2807275-2.patch | git apply -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 668 100 668 0 0 2278 0 --:--:-- --:--:-- --:--:-- 2279
error: modules/callbacks.inc: No such file or directory
Also, I downloaded the patch into Drupal root and tried:
git apply -v op_update_should_be_create-2807275-2.patch
The backstory: I was getting the following errors on my website, which I found this discussion explaining that it was because of Entity API, and I was trying to apply the patch in #2.
Notice: Undefined property: stdClass::$custom in block_block_list_alter() (line 794 of /Applications/AMPPS/www/example/docroot/modules/block/block.module). Notice: Undefined property: stdClass::$visibility in block_block_list_alter() (line 807 of /Applications/AMPPS/www/example/docroot/modules/block/block.module). Notice: Undefined property: stdClass::$pages in block_block_list_alter() (line 817 of /Applications/AMPPS/www/example/docroot/modules/block/block.module).
This is my first time trying to apply a patch.