- Issue created by @noahwsmith
We have a client project where harvesting fails with the following error:
> drupal_1 | 2023/11/29 18:10:28 [error] 283697#283697: *156851 FastCGI sent in stderr: "PHP message: Error: Call to a member function hasField() on bool in /var/www/drupal/web/modules/contrib/rest_oai_pmh/src/Plugin/rest/resource/OaiPmh.php on line 553 #0 /var/www/drupal/web/modules/contrib/rest_oai_pmh/src/Plugin/rest/resource/OaiPmh.php(537): Drupal\rest_oai_pmh\Plugin\rest\resource\OaiPmh->getHeaderById()
Once I caught a boolean value at that location, the same error was presented inside of "getRecordMetadata."
I have created the attached patch which simply handles this situation without attempting to find the root cause of why $this->entity is returning a boolean in the first place.
Active
2.0
Code