I have a new Problem. I use the Social Feed Plugin for fetch facebook Posts.
In principle the Plugin works fine, but on the Server I cant fetch any media (images).
The error log says
[2018-08-06 12:51:05] grav.ERROR: An error occured during social posts array conversion. Error: (#100) Tried accessing nonexisting field (images) on node type (Page) [] [] [2018-08-06 12:51:05] grav.ERROR: An error occured during social posts array conversion. Error: (#100) Tried accessing nonexisting field (images) on node type (Video) [] []
It is possible, that I have not enough rights on the webserver?
I already give permissions 777 to the /user/media folder. But no success -> The folder stays empty…
After long debugging I found where the error message comes from.
In the PostManager in the function downloadFile the image of the social post will be downloaded. However, an SSL error is triggered here.
This is the complete error message:
PHP Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /httpdocs/project1/user/plugins/social-feed/src/Manager/PostManager.php on line 184
PHP Warning: file_get_contents(): Failed to enable crypto in /httpdocs/projekt1/user/plugins/social-feed/src/Manager/PostManager.php on line 184
PHP Warning: file_get_contents(https://graph.facebook.com/[pictureID]/picture): failed to open stream: operation failed in /httpdocs/project1/user/plugins/social-feed/src/Manager/PostManager.php on line 184
According to Google, the correct certificates are not available. So I will check with the hoster if I can change that or try to load the files with curl.
Try to clarify this point at the developers of the application. Perhaps they already know such a problem. Perhaps it is even a simple solution. And if it is not. then you can turn to outside help.
As described the problem was a missing ssl certificate named cafile.
A quick fix is to switch off the ‘ssl’.
A better solution is to define in your php.ini the openssl.cafile variable
If I’m right grav brings already such a certificate.
It can be found under /vendor/composer/ca-bundle/res/cacert.pem