• Resolved dimi993

    (@dimi993)


    Hi, I have CTF Feed installed in a woocommerce site in order to generate a custom template xml feed.
    The xml was has been generated for months without any problem but yesterday it sudden;y displayed the following error:

    The browser output of the xmnl feed is the following:

    This page contains the following errors:
    error on line 1 at column 884: Extra content at the end of the document
    Below is a rendering of the page up to the first error.
    2022-05-05 10:17:01?{each product start}??{each product start}??{weight}?

    <?xml version="1.0" encoding="utf-8" ?>
    <mpitems>
        <created_at>2022-05-05 10:17:01</created_at>
        <products>
            {each product start}
              <product>
                <sku><![CDATA[{sku}]]></sku>
                <name><![CDATA[{title}]]></name>
                <category><![CDATA[{product_type}]]></category>
                <ean>just4pets-<![CDATA[{sku}]]></ean>
                <manufacturer><![CDATA[{wf_attr_pa_brand}]]></manufacturer>
                <description><![CDATA[{description}]]></description>
                <weight>{weight}</weight>
                <color>{wf_dattribute_empty_color}</color>
                <url><![CDATA[{link}]]></url>
                <image>{image}</image>
                <price>{current_price}</price>
                <quantity>{quantity}</quantity>
                <shipping_lead_time>1</shipping_lead_time>
              </product>
            {each product end}
        </products>
    </mpitems>

    We haven’t made any changes or updates latelly. Only products are added to the site on a daily basis.

    Any ideas as to what might have happened?
    Thank you in advance.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support ansarybadal

    (@ansarybadal)

    Hi @dimi993

    Thanks for reaching us.

    Please, use the below format –

    <?xml version="1.0" encoding="utf-8" ?>
    <mpitems>
        <created_at>2022-05-05 10:17:01</created_at>
        <products>
            {{each product start}}
              <product>
                <sku><![CDATA[{sku}]]></sku>
                <name><![CDATA[{title}]]></name>
                <category><![CDATA[{product_type}]]></category>
                <ean>just4pets-<![CDATA[{sku}]]></ean>
                <manufacturer><![CDATA[{wf_attr_pa_brand}]]></manufacturer>
                <description><![CDATA[{description}]]></description>
                <weight>{weight}</weight>
                <color>{wf_dattribute_empty_color}</color>
                <url><![CDATA[{link}]]></url>
                <image>{image}</image>
                <price>{current_price}</price>
                <quantity>{quantity}</quantity>
                <shipping_lead_time>1</shipping_lead_time>
              </product>
            {{each product end}}
        </products>
    </mpitems>
    Thread Starter dimi993

    (@dimi993)

    Hello Badal,

    I changed my code as you suggestde and the xml works fine again.

    Thank you very much for your help.

    Do you have any idea why this happened?

    Plugin Support ansarybadal

    (@ansarybadal)

    Hi @dimi993

    In your configuration you have used {each product start} while it should be {{each product start}}.

    Thread Starter dimi993

    (@dimi993)

    Hi Badal,
    I noticed the difference in my code and the one you provided.

    But I’d like to know (if you can tell me) why the xml was working fien and it suddenly needed this change in the {each product start}. I’m asking maily because my client is going to ask and I will have to tell him what happened.

    Thank you for your time and patience.

    Plugin Support ansarybadal

    (@ansarybadal)

    Hi @dimi993

    The double brackets are to distinguish between the end and start tag and the attributes as you can see attributes like images uses single brackets.

    Plugin Author Ohidul Islam

    (@wahid0003)

    HI @dimi993 ,

    In recent version we had to change the Custom XML template structure for new features. We will update the documentation for Custom XML soon.

    Thread Starter dimi993

    (@dimi993)

    Thank you for your replies.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘XML feed producing error Extra content at the end of the document’ is closed to new replies.