Incorrect string value: '\xF0\x9F\x94\xA5EX...' for column 'content' at row 1 - Forum | JoomShaper
Solved SP Page Builder

Incorrect string value: '\xF0\x9F\x94\xA5EX...' for column 'content' at row 1

Asked by Micheline Potvin 3 years ago Last activity 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

Accepted answer

Marked as the solution
Ofi Khan Staff

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

Micheline Potvin Asked this

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

Ofi Khan Staff

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.

3 more replies

โ€โ€โ€Ž โ€ŽJโ€โ€โ€Žโ€Žeโ€โ€Žโ€โ€โ€Žโ€Žnโ€โ€โ€Žโ€Žs W.โ€โ€โ€Ž
3 years ago ยท edited

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.

Ofi Khan Staff

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

Ofi Khan Staff

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

Ahmed sakr

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

Ofi Khan Staff

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.

โ€โ€โ€Ž โ€ŽJโ€โ€โ€Žโ€Žeโ€โ€Žโ€โ€โ€Žโ€Žnโ€โ€โ€Žโ€Žs W.โ€โ€โ€Ž
2 years ago ยท edited

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

Ofi Khan Staff

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.

โ€โ€โ€Ž โ€ŽJโ€โ€โ€Žโ€Žeโ€โ€Žโ€โ€โ€Žโ€Žnโ€โ€โ€Žโ€Žs W.โ€โ€โ€Ž

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

Log in to reply.