Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

An error occured during social posts array conversion

Solved by Thomas Bieli View solution

Started by Thomas Bieli 8 years ago · 3 replies · 664 views
8 years ago

Hi there

I have a new Problem. I use the Social Feed Plugin for fetch facebook Posts.
https://github.com/moduleon/grav-plugin-social-feed

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

I use php 7.1

Thanks for Help

greeting
Thoomyy

8 years ago

Hi Enby

Tx for your answer 🙂

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.

Does someone have a better idea?

greeting
Thoomyy

8 years ago

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.

8 years ago Solution

Thank for trying to 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

More ideas can be found under:
https://stackoverflow.com/questions/26148701/file-get-contents-ssl-operation-failed-with-code-1-and-more

greeting
Thoomyy

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 54 1 week ago
Plugins · by Xavier, 4 weeks ago
2 61 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1188 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 54 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 79 2 months ago