rahoc / Kleiderkuh

POC for Kleiderkuh
2 stars 1 forks source link

Backend: When storing text with special characters to comment field, comment is not saved. #160

Open dansdsu opened 10 years ago

dansdsu commented 10 years ago

Error Report:

Tried to save the following text to comment field: Wir können diese beiden Artikel (1623 & 1627) nur als Kategorie 'Pullover & Strick' für je 10,51€ akzeptieren. Falls du das möchtest wähle bitte die Option 'Spenden' und wir werden einen neuen Auftrag für diese beiden Artikel erstellen für insgesamt 21,02€. Ansonsten wähle bitte die Option 'zurücksenden' und wir schicken dir deine Artikel natürlich auch gerne zurück. Wenn du noch Fragen hast schicke uns bitte eine Email.

Then when focus leaves the comment field, orange text on top appears as follows:


successfully stored 1623 with new comment: Wir können diese beiden Artikel (1623 & 1627) nur als Kategorie 'Pullover & Strick' für je 10,51€ akzeptieren. Falls du das möchtest wähle bitte die Option 'Spenden' und wir werden einen neuen Auftrag für diese beiden Artikel erstellen für insgesamt 21,02€. Ansonsten wähle bitte die Option 'zurücksenden' und wir schicken dir deine Artikel natürlich auch gerne zurück. Wenn du noch Fragen hast schicke uns bitte eine Email.


Refresh page and the comment field is empty. Check the order in front end and comment field is empty.

Result = comment not seen by user, failure to communicate to our customer.

rahoc commented 10 years ago

The problem is connected to the special characters used: ' '

To solve this sql queries should be changed to use prepared statements that will solve the problem

Actual workaround is: "Not use special characters in comments"