Incorrect String Value: '\xF0\x9F\x94\xA5EX...' For Column 'content' At Row 1 - Question | JoomShaper
SP Page Builder 6 is Here! Learn More →

Incorrect String Value: '\xF0\x9F\x94\xA5EX...' For Column 'content' At Row 1

MP

Micheline Potvin

SP Page Builder 2 years ago

hello i just updated sp page builder from 4 to 5 and i get this error when i try to save the sp page builder home page : Incorrect string value: '\xF0\x9F\x94\xA5EX...' for column 'content' at row 1 https://monosnap.com/file/M96h0tUWwxAH1bHswjhhwh0rH7UYF5 could you help with this please, Thank you in advance for your help, Micheline

1
11 Answers
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 2 years ago #127369

Hello Micheline Potvin

You have used a fire emoji in the Text Block addon Title and Button addon Text which is not supported. https://prnt.sc/2NDTmw7SpZ4U

I have removed this and now you will be able to save the page.

Best regards

0
MP
Micheline Potvin
Accepted Answer
2 years ago #127429

Thank you for your help, it's very appreciate.

-1
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 2 years ago #127488

You are welcome 😊

The issue has been fixed on our end. You will be able to use emojis on both ends. I have updated the version on your site.

0
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
Accepted Answer
2 years ago #127376

This looks like the same issue which was present in SPPB3 in the frontend editor.
But this time in the backendeditor.

The Emoji is supported, if the Customer saves the text in the frontend Editor.
As soon as he tries to save the Text within the Backend, it throws the error.

I have tested this with Version 5.0.8.
Frontend works as intended and in the backend it throws the reported error.

https://www.joomshaper.com/forum/question/21791?order=newest#qa-answer-106014

To fix this issue, The backend editor needs to transfer the icon correctly encoded. SPPB4: "title":"\ud83d\udd25 The Best Web Hosting" SPPB5: "title":"🔥 The Best Web Hosting"

@Ofi Khan please forward this to the developers.

@Micheline Potvin

Workaround for you, so you can use emojis in front and backend.

  • open the file "administrator/components/com_sppagebuilder/editor/traits/PageTrait.php"
  • scroll down to this line "public function savePage()"
  • now scroll down a little bit more until you see this line "$model->savePage($data);"
  • before the "try{" you can add the following line
$data->content = json_encode(json_decode($data->content));

It should look like this.

                if (!$canEditState) {
                        unset($data->published);
                }
                $data->content = json_encode(json_decode($data->content));
                try
                {
                        $model->savePage($data);
                }
                catch (\Exception $e)
                {
                        $this->sendResponse(['message' => $e->getMessage()], 500);
                }

Save the file and you are now able to save the page in front and backend editor.

Have a nice day.

1
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 2 years ago #127385

Hello Jens W.

Thanks for your feedback. Yes, you are right. Emoji can be saved from the frontend. I will forward this to the developer team.

Best regards

1
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 2 years ago #127486

It has been fixed. Thanks for your detailed feedback. It will be released with the next version.

0
AS
Ahmed sakr
Accepted Answer
1 year ago #162428

The same error appears for sppagebuilder prop 3.8 and that is when adding an emoji in the title of any article how can we fix this

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 year ago #162693

You can take help from Jens W. But I will suggest you to upgrade to SP Page Builder 5. We have official support for this.

0
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
Accepted Answer
1 year ago #162439

@Ofi Kahn and @Ahmed sakr This is indeed a problem within the backend of SPPB3. When creating a new article and adding a emoji "🔥" joomla will throw an error regarding SPPB.

Speichern fehlgeschlagen. Fehler: Incorrect string value: '\xF0\x9F\x94\xA5te...' for column `xyz-joomla`.`xyz_sppagebuilder`.`title` at row 1

Tested with Joomla 4.4.5 and SPPB 3.8.10.

Since SPPB 3.x is EOL, it is possible you wont get an update/fix.

@Ofi If no update/fix is possible let me know, I will provide him a workaround to fix the issue. If he can not switch to 5.x for some reason.

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 year ago #162692

Thanks Jens W.

You can go ahead and help him. We have stopped working on SP Page Builder 3. We are focusing on SP Page Builder 5 only.

0
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
Accepted Answer
1 year ago #162711

@Ahmed sakr You only need to change the encoding of the column from utf8mb3_general_ci to utf8mb4_general_ci.

ALTER TABLE `osf5f_sppagebuilder` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

You need to replace the prefix “osf5f” with yours :)
If you encounter a similar issue, then you have to change more tables and columns to utf8mb4_general_ci.

0