pdir / social-feed-bundle

Social feed extension for Contao CMS
GNU Lesser General Public License v3.0
13 stars 13 forks source link

Instagram import is not working - SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0... #139

Closed Nick2099 closed 2 months ago

Nick2099 commented 4 months ago

Hello.

I have an issue with the importing social feeds from Instagram. I can get list of Instagram posts with text and images…

Instagram Feed

but import doesn't work.

I become following error:

An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x91\x8C\xF0\x9F...' for column 'teaser' at row 1

By every attempt, only the image of first chosen post is downloaded, but nothing else.

Environment: Social Feed 2.12.4

 PHP-Binary in /usr/bin/php.
 PHP Version 7.4.33, keine bekannten Probleme gefunden.
 Contao Manager - Version 1.8.2.
 Contao 4.13.36 (API-Version 2)
Nick2099 commented 4 months ago

Finally, I found the solution. It's a known issue but it was new for me.

Anyway, for those that have same problem here is solution. I just hope that an error will not pop up somewhere else because of those changes.

Problem was that the posts with emoticons couldn't be uploaded.

I made changes to config.yml. And that helped.

doctrine: dbal: connections: default: default_table_options: charset: utf8mb4 collate: utf8mb4_unicode_ci options: 1002: "SET SESSION sql_mode=(SELECT CONCAT(@@sql_mode, ',TRADITIONAL')), NAMES utf8mb4"

Note to developers: Facebook posts could not be loaded, but no error was displayed. A reply about what is going on would be helpful. This error occurred when I tried to import Instagram posts. So, I was finally able to look for a solution.