When adding a new FAQ phpMyFAQ Fatal error Uncaught exception: 'mysqli_sql_exception' received

Please report bugs here!

Moderator: Thorsten

Post Reply
iconicperformances
Posts: 90
Joined: Fri Sep 15, 2017 8:49 am

When adding a new FAQ phpMyFAQ Fatal error Uncaught exception: 'mysqli_sql_exception' received

Post by iconicperformances »

I was added a new FAQ and the following error message was received:
phpMyFAQ Fatal error
Uncaught exception: 'mysqli_sql_exception'

Message: 'Incorrect string value: '\xF0\x9F\x91\x81</...' for column 'content' at row 1'

Stack trace:

#0 /home/iconicprod/public_html/Staff/KB/src/phpMyFAQ/Database/Mysqli.php(308): mysqli->query('INSERT INTO 1fa...')
#1 /home/iconicprod/public_html/Staff/KB/src/phpMyFAQ/Faq.php(937): phpMyFAQ\Database\Mysqli->query('INSERT INTO 1fa...')
#2 /home/iconicprod/public_html/Staff/KB/admin/record.add.php(122): phpMyFAQ\Faq->create(Object(phpMyFAQ\Entity\FaqEntity))
#3 /home/iconicprod/public_html/Staff/KB/admin/index.php(363): require('/home/iconicpro...')
#4 {main}
Thrown in '/home/iconicprod/public_html/Staff/KB/src/phpMyFAQ/Database/Mysqli.php' on line 308
Not sure why. Can you please assist with this?
Thorsten
Posts: 15620
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: When adding a new FAQ phpMyFAQ Fatal error Uncaught exception: 'mysqli_sql_exception' received

Post by Thorsten »

Hi,

what did you try to save?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
iconicperformances
Posts: 90
Joined: Fri Sep 15, 2017 8:49 am

Re: When adding a new FAQ phpMyFAQ Fatal error Uncaught exception: 'mysqli_sql_exception' received

Post by iconicperformances »

I had made a new FAQ and was trying to save the new FAQ, when this error started happening.
iconicperformances
Posts: 90
Joined: Fri Sep 15, 2017 8:49 am

Re: When adding a new FAQ phpMyFAQ Fatal error Uncaught exception: 'mysqli_sql_exception' received

Post by iconicperformances »

This is the HTML code I am inserting into the Edit Record, where I receive the error message. I cannot see anything different that I have done that would be creating this error.

Code: Select all

<p>Let me explain the use of the emojis again for all <span style="color: rgb(0, 0, 255);"><strong>Iconic </strong></span>workers including, but not limited to cast and crew.</p>
<p><span style="color: rgb(0, 0, 255);"><strong>Iconic</strong></span> introduced the emojis into Slack when it was discovered that Slack would not allow or offer an option to mark an item as read so that the Sender could know that the recipient saw the message and at least read it.</p>
<p>Over time, the use of the emojis grew significantly. What started as a way for the Sender to know that the recipient saw the message and at least read it, evolved into a tool for all <span style="color: rgb(0, 0, 255);"><strong>Iconic</strong></span> Workers to differentiate between messages they saw, messages they needed to work on, and messages that they finished working on.</p>
<p>As all Iconic cast and crew on Slack began utilizing this procedure, each cast and crew member, especially those in leadership roles, had to ensure that the chosen emojis were unique and specific to them so that everyone could see at a glance who was marking off the message with their specific emoji.</p>
<p>With this in mind, specifically chosen emojis mean the following:</p>
<table style="border-collapse: collapse; width: 100%; height: 201.516px;" border="1"><colgroup><col style="width: 24.9677%;"><col style="width: 24.9677%;"><col style="width: 50.0647%;"></colgroup>
<tbody>
<tr style="height: 22.3906px;">
<td style="height: 22.3906px;"><strong>Emoji by text</strong></td>
<td><strong>Emoji by image</strong></td>
<td style="height: 22.3906px;"><strong>Meaning</strong></td>
</tr>
<tr style="height: 179.125px;">
<td style="height: 179.125px; vertical-align: top;">:eye:<br>:eyes:<br>:eye-in-speech-bubble:<br>:face_with_peeking_eye:<br>:eyeglasses:<br>:heavy_check_mark:<br>:white_check_mark:<br>:ballot_box_with_check:</td>
<td style="vertical-align: top;"><span style="font-size: 18pt;">👁</span><br>👀<br>🎯<br><img src="https://staff.iconic.productions/KB/images/1724815373_Seen_Read_emojis.jpg" alt="" width="29" height="183"><br><br></td>
<td style="height: 179.125px; vertical-align: top;"><em>These emojis are known as <span style="color: rgb(230, 126, 35);"><strong>SEEN </strong></span>or <strong><span style="color: rgb(230, 126, 35);">READ</span></strong>.<br><br>These emojis are to be used immediately on every new message that you have physically seen and/or read, <span style="color: rgb(224, 62, 45);">without exception</span>.<br><br>It implies that the recipient has <span style="color: rgb(230, 126, 35);"><span style="color: rgb(0, 0, 0);">seen</span> </span>or read the message. That is all it means. This is useful when you don't need to reply with a "copy" or "Yes, I saw it."  It is an image that means "I have seen the message, or I have read the message. " There are times when all you need to have done is seen and read the message with no need to reply further.<br><br></em></td>
</tr>
<tr>
<td style="vertical-align: top;">:alarm_clock: <br>:pushpin: <br>:envelope_with_arrow: <br>:pencil: <br>:pencil2:<br>:lock_with_ink_pen: <br>:lower_left_fountain_pen: <br>:lower_left_ballpoint_pen: <br>:open_book: <br>:bulb:<br>:computer: <br>:ledger: <br>:inbox_tray: <br>:memo: <br>:calendar:<br>:paperclip: <br>:card_file_box: </td>
<td style="vertical-align: top;"><img src="https://staff.iconic.productions/KB/images/1724816016_Working_On_CreatedTask_Reminder_emojis.jpg" alt="Working_On_CreatedTask_Reminder_emojis" width="137" height="163"></td>
<td style="vertical-align: top;"><em>These emojis are known as <span style="color: rgb(230, 126, 35);"><strong>WORKING ON </strong></span>or a <strong><span style="color: rgb(230, 126, 35);">REMINDER</span></strong> has been set to commence '<span style="color: rgb(230, 126, 35);">working on</span>' it.<br><br>They indicate that the worker is working on the message, has created a task or reminder of that message, and will contact the sender with an update or follow-up when the work is drafted or completed.<br><br>When using a '<span style="color: rgb(230, 126, 35);">working on</span>' emoji, the recipient does not need to use a '<span style="color: rgb(230, 126, 35);">seen</span> or <span style="color: rgb(230, 126, 35);">read</span>' emoji because in order to place a '<span style="color: rgb(230, 126, 35);">working on</span>' emoji, the recipient has to have logically <strong>seen</strong> and <strong>read</strong> the message.<br><br>Whenever a '<strong><span style="color: rgb(230, 126, 35);">working on REMINDER</span></strong>' emoji is used on a message, the worker (i.e., you) must use <strong>Slack's Remind me about this function</strong> and set a reminder for whatever the specific date and time will be. This is a <span style="color: rgb(224, 62, 45);"><strong>REQUIREMENT</strong></span> and <span style="text-decoration: underline;"><span style="color: rgb(224, 62, 45); text-decoration: underline;">must be done immediately</span></span> after using a '<span style="color: rgb(230, 126, 35);">working on Reminder</span>' emoji.<br><br></em></td>
</tr>
<tr>
<td style="vertical-align: top;">:checkered_flag: <br>]:no_entry: <br>:arrow_down: <br>:+1: <br>:x:<br>:100: <br>:hourglass: <br>:outbox_tray: <br>:no_entry_sign: <br>:end:<br>:black_square_for_stop: <br>:heavy_equals_sign: <br>:bangbang: <br>:negative_squared_cross_mark: <br>:slack:</td>
<td style="vertical-align: top;"><img src="https://staff.iconic.productions/KB/images/Complete_Task-Reminder_emojis.jpg" alt="Completed Task message Reminder" width="139" height="130"></td>
<td style="vertical-align: top;"><em>These emojis are known as <span style="color: rgb(230, 126, 35);"><strong>COMPLETED</strong></span>.<br><br>They indicate that the worker has '<span style="color: rgb(230, 126, 35);">completed</span>' the relative work or task that was associated on that particular message. <br><br>When using a '<span style="color: rgb(230, 126, 35);">completed</span>' emoji, the recipient does not need to use a '<span style="color: rgb(230, 126, 35);">seen</span> or <span style="color: rgb(230, 126, 35);">read</span>' emoji because in order to place a '<span style="color: rgb(230, 126, 35);">completed</span>' emoji, the recipient has to have logically <strong>seen</strong> <strong>and </strong><strong>read</strong> the message previously and would have commenced '<span style="color: rgb(230, 126, 35);">working on</span>' it.<br><br><span style="font-size: 10pt;">It is recommended for efficiency and to avoid doubling up on work that when a '<span style="color: rgb(230, 126, 35);">completed</span>' emoji is placed, the worker removes the '<span style="color: rgb(230, 126, 35);">working on</span>' emoji.  While not a requirement, it is recommended. This is useful when doing a search for what '<span style="color: rgb(230, 126, 35);">working on</span>' emojis you have, the results are not showing messages that have been worked on and '<span style="color: rgb(230, 126, 35);">completed</span>'.<br><br></span></em></td>
</tr>
<tr>
<td style="vertical-align: top;">:arrow_right: <br>:fast_forward: <br>:one: <br>:two: <br>:shopping_trolley:<br>:fast_forward: <br>:black_right_pointing_bar: </td>
<td style="vertical-align: top;"><img src="https://staff.iconic.productions/KB/images/Forwarded-Message_emojis.jpg" alt="Forwarding message" width="137" height="79"></td>
<td style="vertical-align: top;"><em>These emojis are known as <span style="color: rgb(230, 126, 35);"><strong>FORWARDED</strong></span>.<br><br>They indicate that the message has been '<span style="color: rgb(230, 126, 35);">forwarded</span>' on the channel using Slack's <strong>FORWARD </strong>feature or that it has been forwarded to another Iconic worker, department supervisor, leader, or manager. <br><br>Nothing else needs to be done here, as these emojis are for quick glance reference of what has occurred on the specific message in this case, forwarded on a channel or to another Iconic worker.<br><br>When using this emoji, the recipient must <strong><span style="color: rgb(224, 62, 45);">always still use</span></strong> a '<span style="color: rgb(230, 126, 35);">seen </span>or <span style="color: rgb(230, 126, 35);">read</span>' emoji because forwarding a message on a channel does not tell anyone if the worker (i.e., you) has seen or read the message before 'forwarding.'</em></td>
</tr>
</tbody>
</table>
<p>The emojis listed above are not the only emojis that are <span style="color: rgb(0, 0, 255);"><strong>permissible </strong></span>to be used for these quick reference tools.  All emojis you will be using in your day-to-day work must be <strong>specific </strong>to <strong>you </strong>(i.e., you cannot use one that is already used by another <span style="color: rgb(0, 0, 255);"><strong>Iconic </strong></span>worker), and the emoji must be <span style="color: rgb(22, 145, 121);"><strong>approved </strong></span>for use by your department captain or supervisor.</p>
Thorsten
Posts: 15620
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: When adding a new FAQ phpMyFAQ Fatal error Uncaught exception: 'mysqli_sql_exception' received

Post by Thorsten »

Hi,

thanks, I'll test now.

I tried 4.0.0-beta first, it works here.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
iconicperformances
Posts: 90
Joined: Fri Sep 15, 2017 8:49 am

Re: When adding a new FAQ phpMyFAQ Fatal error Uncaught exception: 'mysqli_sql_exception' received

Post by iconicperformances »

I decided to break it down and insert each HTML code (ie: <...> to </...> and found that the actual error occurs when inserting the table html code. I have gone through the HTML table coding with a fine tooth comb and cannot spot any errors that would cause the error. Can you please check to see if I have missed anything or if there is a bug in the system when inserting tables?

Code: Select all

<table style="border-collapse: collapse; width: 100%; height: 201.516px;" border="1"><colgroup><col style="width: 24.9677%;"><col style="width: 24.9677%;"><col style="width: 50.0647%;"></colgroup>
<tbody>
<tr style="height: 22.3906px;">
<td style="height: 22.3906px;"><strong>Emoji by text</strong></td>
<td><strong>Emoji by image</strong></td>
<td style="height: 22.3906px;"><strong>Meaning</strong></td>
</tr>
<tr style="height: 179.125px;">
<td style="height: 179.125px; vertical-align: top;">:eye:<br>:eyes:<br>:eye-in-speech-bubble:<br>:face_with_peeking_eye:<br>:eyeglasses:<br>:heavy_check_mark:<br>:white_check_mark:<br>:ballot_box_with_check:</td>
<td style="vertical-align: top;"><span style="font-size: 18pt;">👁</span><br>👀<br>🎯<br><img src="https://staff.iconic.productions/KB/images/1724815373_Seen_Read_emojis.jpg" alt="" width="29" height="183"><br><br></td>
<td style="height: 179.125px; vertical-align: top;"><em>These emojis are known as <span style="color: rgb(230, 126, 35);"><strong>SEEN </strong></span>or <strong><span style="color: rgb(230, 126, 35);">READ</span></strong>.<br><br>These emojis are to be used immediately on every new message that you have physically seen and/or read, <span style="color: rgb(224, 62, 45);">without exception</span>.<br><br>It implies that the recipient has <span style="color: rgb(230, 126, 35);"><span style="color: rgb(0, 0, 0);">seen</span> </span>or read the message. That is all it means. This is useful when you don't need to reply with a "copy" or "Yes, I saw it."  It is an image that means "I have seen the message, or I have read the message. " There are times when all you need to have done is seen and read the message with no need to reply further.<br><br></em></td>
</tr>
<tr>
<td style="vertical-align: top;">:alarm_clock: <br>:pushpin: <br>:envelope_with_arrow: <br>:pencil: <br>:pencil2:<br>:lock_with_ink_pen: <br>:lower_left_fountain_pen: <br>:lower_left_ballpoint_pen: <br>:open_book: <br>:bulb:<br>:computer: <br>:ledger: <br>:inbox_tray: <br>:memo: <br>:calendar:<br>:paperclip: <br>:card_file_box: </td>
<td style="vertical-align: top;"><img src="https://staff.iconic.productions/KB/images/1724816016_Working_On_CreatedTask_Reminder_emojis.jpg" alt="Working_On_CreatedTask_Reminder_emojis" width="137" height="163"></td>
<td style="vertical-align: top;"><em>These emojis are known as <span style="color: rgb(230, 126, 35);"><strong>WORKING ON </strong></span>or a <strong><span style="color: rgb(230, 126, 35);">REMINDER</span></strong> has been set to commence '<span style="color: rgb(230, 126, 35);">working on</span>' it.<br><br>They indicate that the worker is working on the message, has created a task or reminder of that message, and will contact the sender with an update or follow-up when the work is drafted or completed.<br><br>When using a '<span style="color: rgb(230, 126, 35);">working on</span>' emoji, the recipient does not need to use a '<span style="color: rgb(230, 126, 35);">seen</span> or <span style="color: rgb(230, 126, 35);">read</span>' emoji because in order to place a '<span style="color: rgb(230, 126, 35);">working on</span>' emoji, the recipient has to have logically <strong>seen</strong> and <strong>read</strong> the message.<br><br>Whenever a '<strong><span style="color: rgb(230, 126, 35);">working on REMINDER</span></strong>' emoji is used on a message, the worker (i.e., you) must use <strong>Slack's Remind me about this function</strong> and set a reminder for whatever the specific date and time will be. This is a <span style="color: rgb(224, 62, 45);"><strong>REQUIREMENT</strong></span> and <span style="text-decoration: underline;"><span style="color: rgb(224, 62, 45); text-decoration: underline;">must be done immediately</span></span> after using a '<span style="color: rgb(230, 126, 35);">working on Reminder</span>' emoji.<br><br></em></td>
</tr>
<tr>
<td style="vertical-align: top;">:checkered_flag: <br>]:no_entry: <br>:arrow_down: <br>:+1: <br>:x:<br>:100: <br>:hourglass: <br>:outbox_tray: <br>:no_entry_sign: <br>:end:<br>:black_square_for_stop: <br>:heavy_equals_sign: <br>:bangbang: <br>:negative_squared_cross_mark: <br>:slack:</td>
<td style="vertical-align: top;"><img src="https://staff.iconic.productions/KB/images/Complete_Task-Reminder_emojis.jpg" alt="Completed Task message Reminder" width="139" height="130"></td>
<td style="vertical-align: top;"><em>These emojis are known as <span style="color: rgb(230, 126, 35);"><strong>COMPLETED</strong></span>.<br><br>They indicate that the worker has '<span style="color: rgb(230, 126, 35);">completed</span>' the relative work or task that was associated on that particular message. <br><br>When using a '<span style="color: rgb(230, 126, 35);">completed</span>' emoji, the recipient does not need to use a '<span style="color: rgb(230, 126, 35);">seen</span> or <span style="color: rgb(230, 126, 35);">read</span>' emoji because in order to place a '<span style="color: rgb(230, 126, 35);">completed</span>' emoji, the recipient has to have logically <strong>seen</strong> <strong>and </strong><strong>read</strong> the message previously and would have commenced '<span style="color: rgb(230, 126, 35);">working on</span>' it.<br><br><span style="font-size: 10pt;">It is recommended for efficiency and to avoid doubling up on work that when a '<span style="color: rgb(230, 126, 35);">completed</span>' emoji is placed, the worker removes the '<span style="color: rgb(230, 126, 35);">working on</span>' emoji.  While not a requirement, it is recommended. This is useful when doing a search for what '<span style="color: rgb(230, 126, 35);">working on</span>' emojis you have, the results are not showing messages that have been worked on and '<span style="color: rgb(230, 126, 35);">completed</span>'.<br><br></span></em></td>
</tr>
<tr>
<td style="vertical-align: top;">:arrow_right: <br>:fast_forward: <br>:one: <br>:two: <br>:shopping_trolley:<br>:fast_forward: <br>:black_right_pointing_bar: </td>
<td style="vertical-align: top;"><img src="https://staff.iconic.productions/KB/images/Forwarded-Message_emojis.jpg" alt="Forwarding message" width="137" height="79"></td>
<td style="vertical-align: top;"><em>These emojis are known as <span style="color: rgb(230, 126, 35);"><strong>FORWARDED</strong></span>.<br><br>They indicate that the message has been '<span style="color: rgb(230, 126, 35);">forwarded</span>' on the channel using Slack's <strong>FORWARD </strong>feature or that it has been forwarded to another Iconic worker, department supervisor, leader, or manager. <br><br>Nothing else needs to be done here, as these emojis are for quick glance reference of what has occurred on the specific message in this case, forwarded on a channel or to another Iconic worker.<br><br>When using this emoji, the recipient must <strong><span style="color: rgb(224, 62, 45);">always still use</span></strong> a '<span style="color: rgb(230, 126, 35);">seen </span>or <span style="color: rgb(230, 126, 35);">read</span>' emoji because forwarding a message on a channel does not tell anyone if the worker (i.e., you) has seen or read the message before 'forwarding.'</em></td>
</tr>
</tbody>
</table>
Thorsten
Posts: 15620
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: When adding a new FAQ phpMyFAQ Fatal error Uncaught exception: 'mysqli_sql_exception' received

Post by Thorsten »

Hi,

I found the issue, the emojis break the query if you use the "utf8mb4" encoding in MySQL. Which encoding do you use?

You can find it out using a tool like phpMyAdmin.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
iconicperformances
Posts: 90
Joined: Fri Sep 15, 2017 8:49 am

Re: When adding a new FAQ phpMyFAQ Fatal error Uncaught exception: 'mysqli_sql_exception' received

Post by iconicperformances »

Hi Thorsten,
I found the bug. It is added emojis directly from the .tox:not(.tox-tinymce-inline) .tox-editor-header:not(.tox-editor-dock-transition) <button aria-label="Emojis" title="Emojis" type="button" ) button.

Once I erased the emojis, the problem stopped.
Thorsten
Posts: 15620
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: When adding a new FAQ phpMyFAQ Fatal error Uncaught exception: 'mysqli_sql_exception' received

Post by Thorsten »

Hi,

you can migrate the table to "utf8mb4" to use emojis directly:

Code: Select all

ALTER TABLE faqdata CONVERT TO CHARSET utf8mb4;
It worked for me.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
iconicperformances
Posts: 90
Joined: Fri Sep 15, 2017 8:49 am

Re: When adding a new FAQ phpMyFAQ Fatal error Uncaught exception: 'mysqli_sql_exception' received

Post by iconicperformances »

Do I add that in the HTML coding or in a php coded file?
Thorsten
Posts: 15620
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: When adding a new FAQ phpMyFAQ Fatal error Uncaught exception: 'mysqli_sql_exception' received

Post by Thorsten »

Hi,

no, do you have access to your database with phpMyAdmin for example?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15620
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: When adding a new FAQ phpMyFAQ Fatal error Uncaught exception: 'mysqli_sql_exception' received

Post by Thorsten »

Hi,

when run this query in the SQL mode:

Code: Select all

ALTER TABLE faqdata CONVERT TO CHARSET utf8mb4;
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply