Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect string value - emoji unicode characters error #526

Closed
kratz00 opened this issue Jul 22, 2019 · 2 comments
Closed

Incorrect string value - emoji unicode characters error #526

kratz00 opened this issue Jul 22, 2019 · 2 comments

Comments

@kratz00
Copy link

kratz00 commented Jul 22, 2019

Explain the Problem

To isolate the problem I set up a new installation of Nextcloud and the news app.
Database setup is done accordingly to https://docs.nextcloud.com/server/16/admin_manual/configuration_database/index.html including all the steps enabling MySQL 4-byte support.
If I subscribe to any feed which has emoji unicode characters, the news app fails inserting a new entry in the oc_news_items table:

Invalid datetime format: 1366 Incorrect string value: '\xF0\x9F\x99\x82</...' for columnkratz00_nexttest.oc_news_items.bodyat row 1

The error message contains Invalid datetime format but I think this part is wrong.

Steps to Reproduce

  1. Install Nextcloud
  2. Install News app
  3. Subscribe to http://brickstory.de/?feed=rss2
  4. (Optional) Run php occ news:updater:update-feed 1 kratz00

System Information

  • News app version: 13.1.6
  • Nextcloud version: 16.0.3
  • Cron type: system cron
  • PHP version: 7.3.7
  • Database and version: MariaDB 10.2.22

Contents of nextcloud/data/nextcloud.log

The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
The current PHP memory limit is below the recommended value of 512MB.
Could not update feed with id 1 and user kratz00: An exception occurred while executing 'INSERT INTO `oc_news_items`(`unread`,`url`,`guid`,`guid_hash`,`pub_date`,`last_modified`,`title`,`author`,`body`,`search_index`,`fingerprint`,`content_hash`,`feed_id`) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)' with params [true, "http:\/\/brickstory.de\/?p=321", "http:\/\/brickstory.de\/?p=321", "ad8f932b86f851ec7255cdad28e23ac8", 1561305076, "1563785643118599", "Gute Rabatte auf Jurassic World, Harry Potter und seltene Sets!", "Brickstory", "\n<p>F\u00fcr jeden, der vielleicht nicht genug Mittel f\u00fcr das neue Jurassic World \u201eT-Rex Rampage\u201c Set hat, habe ich jetzt eine Alternative! Bei Galeria Kaufhof gibt es exzellente Angebote! Mein Highlight:<a target=\"_blank\" rel=\"noreferrer\" href=\"http:\/\/partners.webmasterplan.com\/click.asp?ref=860457&amp;site=8040&amp;type=text&amp;tnb=49&amp;diurl=https%3A\/\/www.galeria-kaufhof.de\/pds\/lego-raptoren-rettungsteam-10757\/4000073567%3Fv%3D5000342431%26refID%3Daffilinet\/linkgen_%24ref%24%26emsrc%3Daff\"> der Raptoren- Wagen <\/a>mit 42% Rabatt! Alle weiteren, hier:<\/p>\n\n\n\n<p><strong>Harry Potter<\/strong><\/p>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer\" href=\"http:\/\/partners.webmasterplan.com\/click.asp?ref=860457&amp;site=8040&amp;type=text&amp;tnb=49&amp;diurl=https%3A\/\/www.galeria-kaufhof.de\/search%3Fq%3Dlego+harry+potter%26refID%3Daffilinet\/linkgen_%24ref%24%26emsrc%3Daff\">&gt;Alle neuen Harry Potter 2019 Sets mit Rabatt! <\/a><\/p>\n\n\n\n<p><strong>Exklusiv Sets<\/strong><\/p>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer\" href=\"http:\/\/partners.webmasterplan.com\/click.asp?ref=860457&amp;site=8040&amp;type=text&amp;tnb=49&amp;diurl=https%3A\/\/www.galeria-kaufhof.de\/pds\/lego-eckgarage-10264\/4000243311%3Fv%3D5001217943%26refID%3Daffilinet\/linkgen_%24ref%24%26emsrc%3Daff\">&gt;LEGO Modulars \u2013 Eckgarage \u2013 156,59 \u20ac anstatt 179,99\u20ac (13% Rabatt)<\/a><\/p>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer\" href=\"http:\/\/partners.webmasterplan.com\/click.asp?ref=860457&amp;site=8040&amp;type=text&amp;tnb=49&amp;diurl=https%3A\/\/www.galeria-kaufhof.de\/pds\/lego-schloss-hogwarts-71043\/4000243246%3Fv%3D5001217593%26refID%3Daffilinet\/linkgen_%24ref%24%26emsrc%3Daff\">&gt;LEGO Harry Potter \u2013 Hogwarts UCS \u2013 347,99\u20ac anstatt 399,99\u20ac (13% Rabatt) <\/a><\/p>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer\" href=\"http:\/\/partners.webmasterplan.com\/click.asp?ref=860457&amp;site=8040&amp;type=text&amp;tnb=49&amp;diurl=https%3A\/\/www.galeria-kaufhof.de\/pds\/lego-taj-mahal-10256\/4000016762%3Fv%3D5000053480%26refID%3Daffilinet\/linkgen_%24ref%24%26emsrc%3Daff\">&gt;LEGO Creator Expert \u2013 Taj Mahal \u2013 252,29\u20ac anstatt 329,99 \u20ac ( 24% Rabatt)<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Jurassic World<\/strong><\/p>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer\" href=\"http:\/\/partners.webmasterplan.com\/click.asp?ref=860457&amp;site=8040&amp;type=text&amp;tnb=49&amp;diurl=https%3A\/\/www.galeria-kaufhof.de\/pds\/lego-raptoren-rettungsteam-10757\/4000073567%3Fv%3D5000342431%26refID%3Daffilinet\/linkgen_%24ref%24%26emsrc%3Daff\"><strong>&gt;LEGO Jurassic World \u2013 Raptoren Wagen  \u2013 17,39 \u20ac anstatt 24,99\u20ac (42% Rabatt)<\/strong><\/a><\/p>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer\" href=\"http:\/\/partners.webmasterplan.com\/click.asp?ref=860457&amp;site=8040&amp;type=text&amp;tnb=49&amp;diurl=https%3A\/\/www.galeria-kaufhof.de\/pds\/lego-angriff-des-dilophosaurus-75931\/4000073573%3Fv%3D5000342437%26refID%3Daffilinet\/linkgen_%24ref%24%26emsrc%3Daff\">&gt;LEGO Jurassic World \u2013 Angriff des Dilophosaurus \u2013 33,05 \u20ac anstatt 49,99\u20ac (34% Rabatt)<\/a><\/p>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer\" href=\"http:\/\/partners.webmasterplan.com\/click.asp?ref=860457&amp;site=8040&amp;type=text&amp;tnb=49&amp;diurl=https%3A\/\/www.galeria-kaufhof.de\/pds\/lego-indoraptor-verwuestung-des-lockwood-anwesens-75930\/4000073035%3Fv%3D5000337376%26refID%3Daffilinet\/linkgen_%24ref%24%26emsrc%3Daff\">&gt;LEGO Jurassic World- Indoraptor- Verw\u00fcstung \u2013 86,99\u20ac ansatt 129,99\u20ac (33% Rabatt) <\/a><\/p>\n\n\n\n<p><a target=\"_blank\" rel=\"noreferrer\" href=\"http:\/\/partners.webmasterplan.com\/click.asp?ref=860457&amp;site=8040&amp;type=text&amp;tnb=49&amp;diurl=https%3A\/\/www.galeria-kaufhof.de\/pds\/lego-ausbruch-des-t-rex-10758\/4000073568%3Fv%3D5000342432%26refID%3Daffilinet\/linkgen_%24ref%24%26emsrc%3Daff\"><strong>&gt;LEGO Jurassic World \u2013 Ausbruch des T-Rex \u2013 34,79\u20ac anstatt 49,99\u20ac (30% Rabatt)<\/strong><\/a><\/p>\n\n\n\n<hr \/>\n\n\n\n<p><em>Die Brickstory benutzt hier Affiliate- Links. Bedeutet, dass durch den H\u00e4ndler eine kleine Provision gezahlt wird, aber euch <\/em><strong><em>KEINE zus\u00e4tzlichen Kosten<\/em><\/strong><em> entstehen. Dadurch kann ich zum Beispiel die Kosten f\u00fcr diese Webseite und den BrickLetter decken. Danke<\/em> \ud83d\ude42<\/p>\n", "\nf\u00fcr jeden, der vielleicht nicht genug mittel f\u00fcr das neue jurassic world \u201et-rex rampage\u201c set hat, habe ich jetzt eine alternative! bei galeria kaufhof gibt es exzellente angebote! mein highlight: der raptoren- wagen mit 42% rabatt! alle weiteren, hier:\n\n\n\nharry potter\n\n\n\n>alle neuen harry potter 2019 sets mit rabatt! \n\n\n\nexklusiv sets\n\n\n\n>lego modulars \u2013 eckgarage \u2013 156,59 \u20ac anstatt 179,99\u20ac (13% rabatt)\n\n\n\n>lego harry potter \u2013 hogwarts ucs \u2013 347,99\u20ac anstatt 399,99\u20ac (13% rabatt) \n\n\n\n>lego creator expert \u2013 taj mahal \u2013 252,29\u20ac anstatt 329,99 \u20ac ( 24% rabatt)\n\n\n\n\n\n\n\njurassic world\n\n\n\n>lego jurassic world \u2013 raptoren wagen  \u2013 17,39 \u20ac anstatt 24,99\u20ac (42% rabatt)\n\n\n\n>lego jurassic world \u2013 angriff des dilophosaurus \u2013 33,05 \u20ac anstatt 49,99\u20ac (34% rabatt)\n\n\n\n>lego jurassic world- indoraptor- verw\u00fcstung \u2013 86,99\u20ac ansatt 129,99\u20ac (33% rabatt) \n\n\n\n>lego jurassic world \u2013 ausbruch des t-rex \u2013 34,79\u20ac anstatt 49,99\u20ac (30% rabatt)\n\n\n\n\n\n\n\ndie brickstory benutzt hier affiliate- links. bedeutet, dass durch den h\u00e4ndler eine kleine provision gezahlt wird, aber euch keine zus\u00e4tzlichen kosten entstehen. dadurch kann ich zum beispiel die kosten f\u00fcr diese webseite und den brickletter decken. danke \ud83d\ude42\nbrickstorygute rabatte auf jurassic world, harry potter und seltene sets!http:\/\/brickstory.de\/?p=321", "20c4c6c7e61bcbe91e6ad9796c689f31", "a2974108b5913b89a47f3241b154ade3", 1]:

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xF0\x9F\x99\x82</...' for column `kratz00_nexttest`.`oc_news_items`.`body` at row 1 

@kratz00 kratz00 added the bug label Jul 22, 2019
@stale
Copy link

stale bot commented Aug 12, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Aug 12, 2019
@stale stale bot closed this as completed Aug 19, 2019
@mlthlschr
Copy link

Just had the same issue. In case somebody else gets it: you can not avoid the transformation of the database to utf8mb4. Just follow this guide found in the nextcloud docs . It is quite straight forward, and done within 5 minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants