Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2006
    Posts
    113
    Plugin Contributions
    0

    Default how do I insert a link without the ampersand in the address?

    I have a question - very newbie so obviously not understanding the issue completely.

    I have a lot of added links in my other website where for example, in one category or product, I will link to another which is related by inserting link in the html editor - BUT I am finding this throws up a lot of errors when I validate the site.

    for example:
    Line 165, Column 46: cannot generate system identifier for general entity "cPath"
    href="/index.php?main_page=index&cPath=3_4"

    An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".

    Entity references start with an ampersand (&) and end with a semicolon (;). If you want to use a literal ampersand in your document you must encode it as "&" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and æ are different characters.

    If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem.

    Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.
    In my new site, I am trying to keep it clean and correct (just 1 error so far - yay) so how do I insert a link without the ampersand in the address causing these errors.

    cheers
    Leah

  2. #2
    Join Date
    Jun 2008
    Location
    Morrisville, NC
    Posts
    50
    Plugin Contributions
    0

    Default Re: how do I insert a link without the ampersand in the address?

    You use '&' instead of the ampersand to fix that validation error. So for example instead of
    "/index.php?main_page=index&cPath=3_4"
    you would use "/index.php?main_page=index&cPath=3_4"

    I recommend installing the SEO urls add on. It will eliminate most (maybe even all) of those ampersands from your URLs, so you won't even have to worry with this problem and it has the possible benefit of potentially giving you better search engine rankings.

  3. #3
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: how do I insert a link without the ampersand in the address?

    Zen Cart builds the links on the fly based on what the customer requested, so it shouldn't be an issue.

  4. #4
    Join Date
    Aug 2008
    Posts
    115
    Plugin Contributions
    0

    Default Re: how do I insert a link without the ampersand in the address?

    Quote Originally Posted by afo View Post
    Zen Cart builds the links on the fly based on what the customer requested, so it shouldn't be an issue.
    This is incorrect ...or at least it is a misleading reply.
    Yes, zen carts builds internal links on the fly and does so correctly ....but this user's question was about inserting copy/pasted links into a product's description via the admin's HTML editor. Indeed, if copy/pasted urls are inserted via the WYSIWYG editor, then unencoded ampersands are passed into the database and end up in the output html. They look and perform okay via most browsers but do not validate as they are unencoded.

    The sad part is - even if one cuts/pastes a validly encoded ampersand url via the PLAIN TEXT editor, it will get saved into the database correctly ....but once that product is re-edited in the future, any properly encoded links are lost again as the editor does not load and re-save the encoded ampersands.

    Thus there's no way user-friendly way to enter and save validly encoded urls into a description via the current zen cart (1.3.8a)admin. ....the closest one can get is to use the plain text editor ONLY (not very friendly for most users) and even there, one must remember to re-edit any links in the description when editing a product in the future.

 

 

Similar Threads

  1. Replies: 8
    Last Post: 14 Dec 2010, 01:44 AM
  2. Replies: 5
    Last Post: 18 Oct 2009, 01:48 AM
  3. How can I insert image above the name of the manufacturer?
    By Drika in forum Customization from the Admin
    Replies: 0
    Last Post: 19 Nov 2008, 02:30 PM
  4. Replies: 1
    Last Post: 7 Nov 2008, 08:10 AM

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