Post by Brook » Sun May 23, 2010 10:23 am

Has anyone else noticed that the Admin->System-Backup/Restore feature does not handle apostrophes.

For instance if a Product Category = "men's shoes" when I go to export to a spreadsheet the export gets hung up.
If I try to export to a spreadsheet with no apostrophes everything works great.
If I try to import from a spreadsheet with no apostrophes everything works great.

If I try to import a spreadsheet that has an apostrophe in the content the the import does not work.
The same goes for any column that gets exported to the Excel Spreadsheet...ex. Product Description, Category Description etc.

Can someone tell me how to fix this? I am sure it is a simple fix, probably just need to edit a line to do some kind of a string replace anytime the code sees an apostrophe, I just don't know where to look.

Any help would be appreciated.

Active Member

Posts

Joined
Wed Feb 24, 2010 12:15 am

Post by Purebeads » Sun May 23, 2010 2:03 pm

I don't have a programming solution for you, but I do have a suggestion. Use curly apostrophes (also called single quotes). Almost all fonts have more than one kind of apostrophe, the regular one and then left/right curly ones (or what you might call "typesetting" apostrophes). Clearly, the programming language being used (PHP?) sees the regular apostrophe as some kind of programming symbol or delimiter, but it is unlikely that it will see curly apostrophes in the same way. I'm looking in Character Map now, and there are lots of symbols that look like apostrophes, including a vertical half-line that appears in the top half of the line. There is also the backwards apostrophe right on your keyboard (` all the way to the left). It won't look quite right, but your customers will understand what it is.

I just did some experimenting with Character Map, and some characters (especially the ones with the word "combining" in the description) can't be used, but some of them can. Here are some:

´ acute accent (stand-alone, not combining)
ʹ modifier letter, prime (whatever that means)
ʼ modifier letter, apostrophe
ʾ modifier letter, right half ring
ˈ modifier letter, vertical half line


I put those in a larger font size so you could see them better.

Now, in many product names I use the apostrophe character. Do I need to worry that I won't be able to backup my database? Maybe you'd address this issue, Q.

Active Member

Posts

Joined
Fri Apr 30, 2010 12:07 pm

Post by twuncher » Mon May 24, 2010 3:55 pm

I came across this problem in php on a site i was working on previously when i couldn't insert to a database due to comma's in a text field and i had to use the function below;

mysql_real_escape_string();

not sure if its of any use here as i haven't had time to look at the code, but hope it helps.

Newbie

Posts

Joined
Sat May 15, 2010 7:42 pm

Post by Brook » Fri May 28, 2010 12:51 am

Does anyone have any specific coding change suggestions for changing the "Export/Import" (Backup/Restore) module to handle apostrophes? Ex. What lines need to be changed to handle apostrophes?

Active Member

Posts

Joined
Wed Feb 24, 2010 12:15 am

Post by JNeuhoff » Tue Jun 01, 2010 1:48 am

I have patched the Export/Import tool so as to do a proper addslashes calls also for the seo_keyword and the meta_description fields. Please try the latest release of the Export/Import tool.

User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Brook » Tue Jun 01, 2010 1:57 am

Thank you for the reply and fix. I will redownload, install and let you know.

Active Member

Posts

Joined
Wed Feb 24, 2010 12:15 am
Who is online

Users browsing this forum: No registered users and 5 guests