Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Mar 2010
    Posts
    4
    Plugin Contributions
    0

    Default Symbols truncate Product Name and Description after editing

    When editing a product, the Description field frequently become truncated at an html symbol or stray curly quote.

    For example, entering Description "Some Product® description" will preview, save and display correctly on the site. When the Edit page loads, this will be truncated as "Some Product".

    A stray curly quote (very hard to avoid these) will do *almost* the same thing, so "This product won’t stain carpets" previews fine but does not display on the site correctly. When you click Edit it becomes "This procuct won" and the rest is truncated.

    Similarly, and possibly related, using an html symbol in the Product Name initially saves ok, but a subsequent Edit turns the symbol into an ascii character, so ® in the Name or Description becomes ® and stays ® when you save the edit.

    I can certainly learn to work around this limitation. Is there a list of symbols which are known to malfunction? Then I can find/replace my existing site's database before I transfer hundreds of products to Zen Cart. I can probably tweak code to fix this, but I'm really focused on getting the site running rather than code tweaking.

    Thanks for your help. Zen Cart is wonderful!

  2. #2
    Join Date
    Mar 2010
    Posts
    4
    Plugin Contributions
    0

    Default Re: Symbols truncate Product Name and Description after editing

    Should I post this in a different category? I'm completely stuck now. I have narrowed the problem down to the preview modules where html entities are converted to text, and text symbols in the Description cause truncation. Makes no difference using HTMLArea or plain text editor. My DB which I need to move is absolutely littered with symbols which break Zen Cart, even after converting all of the html entities and replacing all of the curly quotes with straight quotes.

  3. #3
    Join Date
    Mar 2010
    Posts
    4
    Plugin Contributions
    0

    Default Re: Symbols truncate Product Name and Description after editing

    Sorry I have to keep adding in replies. There does not seem to be a way to edit my original post in this forum, so I have to keep adding on...

    Here is a way to replicate the problem. Zen Cart is version 1.3.8a. Start a new test product:

    Original baseline test product info entered into Product>New Product
    AAAManufacturer® Product™
    Manufacturer® Product™. Has this &amp that. A non breaking phrase. Some greek α and β

    HTML source on New Product>Preview page
    <input type="hidden" name="products_name[1]" value="AAAManufacturer&amp;reg; Product&amp;trade;">
    <input type="hidden" name="products_description[1]" value="Manufacturer&amp;reg; Product&amp;trade;. Has this &amp;amp that. A&amp;nbsp;non&amp;nbsp;breaking&amp;nbsp;phrase. Some greek &amp;alpha; and &amp;beta;">

    MySQL data after Preview and Insert (exactly the same as baseline)
    AAAManufacturer&reg; Product&trade;
    Manufacturer&reg; Product&trade;. Has this &amp that. A&nbsp;non&nbsp;breaking&nbsp;phrase. Some greek &alpha; and &beta;

    So far so good! HTML entities were perfectly preserved through New>Preview>Insert. No problems editing and updating directly in MySQL table.

    The trouble starts upon subsequent editing of this existing product:

    Product>Edit loads this corrupted version. The trouble starts right here.
    AAAManufacturer® Product™
    Manufacturer® Product™. Has this & that. A non breaking phrase. Some greek α and β

    HTML source on Product>Edit page
    <input type="hidden" name="products_name[1]" value="AAAManufacturer® Product™">
    <input type="hidden" name="products_description[1]" value="Manufacturer® Product™. Has this &amp; that. A non breaking phrase. Some greek &amp;#945; and &amp;#946;">
    (Note, in the above phrase "A non breaking phrase", the spaces are NOT normal chr(32) space chars.

    Product>Edit>Preview stays the same as above.

    What MySQL contained after Product>Edit>Preview>Update
    AAAManufacturer
    Manufacturer

 

 

Similar Threads

  1. How to truncate the product name of the special listing in centercolummn?
    By blueflu in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Jul 2011, 06:34 PM
  2. Truncate Product Name for Monthly Centerbox
    By Berserker in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 16 Jul 2009, 02:35 AM
  3. Truncate Product Name in Packing Slip
    By maineiac13 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 25 Jun 2009, 03:09 PM
  4. Display Product Description - truncate issue
    By got2know in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 20 Apr 2007, 08:14 PM
  5. Long Product Description truncates after editing product
    By Duckarina in forum General Questions
    Replies: 0
    Last Post: 6 Feb 2007, 12:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg