ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

XML Template not showing images or links EE1

October 28, 2011 9:30am

Subscribe [3]
  • #1 / Oct 28, 2011 9:30am

    dzr_rtw

    86 posts

    I’m moving a site out of EE1 and into EE2 and need to get a whole bunch of channel entries out of a simple channel.

    My process is create and XML template that spits out the data, save that as .xml file, open in Excel, save as CSV and import into EE2 using AWJ DataGrab.

    I have done this with other EE1 sites and it works perfectly.

    For some reason none of the images or links are coming through to display in XML doc. No file path, nothing.

    Weblog field is a textare and and example entry =

    https://ellislab.com/asset/images/team-photo/Ceremony1.jpg
    
    <b><a href="http://www.uga.edu/Ceremony/" title="Multimedia">Multimedia</a></b>
    
    

    Template Code=

    <?xml version="1.0" encoding="UTF-8"?>
    <articles>   
    {exp:weblog:entries  weblog="default_site" limit="300000" status="Open|Closed"}
    <summary>{exp:xml_encode}{summary}{/exp:xml_encode}</summary>
    </item> 
    {/exp:weblog:entries}
    </articles>

     

    XML for the example entry shows up as just:

    <summary>Multimedia</summary>


    ANY help or insight would be very appreciated!!!!

  • #2 / Oct 29, 2011 4:02am

    Mark Bowen

    12637 posts

    Hi dzr_rtw,

    What do you get if you create a brand new test template and just place this into it :

    {exp:weblog:entries weblog="default_site" limit="300000" status="Open|Closed"}
    {summary}
    {/exp:weblog:entries}

    Do you definitely have the correct weblog=”“ name there as you currently have default_site in your code which is the default in an ExpressionEngine installation so just want to check you have the correct weblog there?

    Let’s see if we can get your template outputting some data first in the normal way first.

    Thanks,

    Mark

     

  • #3 / Oct 31, 2011 4:15pm

    dzr_rtw

    86 posts

    What do you get if you create a brand new test template and just place this into it :

    {exp:weblog:entries weblog="default_site" limit="300000" status="Open|Closed"}
    {summary}
    {/exp:weblog:entries}

    —here is the summary field only only:
    http://www.georgia-enews.uga.edu/index.php?/site/summary_only/

    Do you definitely have the correct weblog=”“ name there as you currently have default_site in your code which is the default in an ExpressionEngine installation so just want to check you have the correct weblog there?

    —yes - the entire installation only has 1 weblog

    Let’s see if we can get your template outputting some data first in the normal way first.

    —I’m sorry if I wasn’t clear - the xml is fine except the images in the summary field are not showing up.

    —here is the full channel:
    http://www.georgia-enews.uga.edu

    —here is the XML output:
    http://www.georgia-enews.uga.edu/index.php?/site/export

     

     

  • #4 / Oct 31, 2011 6:46pm

    Ty Martin

    232 posts

    Kinda looks like the images are being output properlyin the summary-only example you created. Could this be because you have the template set to parse as XML instead of as a webpage? Switch the site/export to parse as a webpage. That might do the trick.

  • #5 / Nov 01, 2011 9:23am

    dzr_rtw

    86 posts

    It is supposed to be parsed as XML -  it is the channel exported as XML - note the “<?xml version=“1.0” encoding=“UTF-8”?>” in the template code.

    <?xml version="1.0" encoding="UTF-8"?>
    <articles>   
    {exp:weblog:entries  weblog="default_site" limit="300000" status="Open|Closed"}
    <summary>{exp:xml_encode}{summary}{/exp:xml_encode}</summary>
    </item> 
    {/exp:weblog:entries}
    </articles>

    the summary field works in the full channel also:  http://www.georgia-enews.uga.edu

    which is the same content as the XML output:  http://www.georgia-enews.uga.edu/index.php?/site/export

     

  • #6 / Nov 02, 2011 5:20pm

    Lisa Wess

    20502 posts

    I’m moving a site out of EE1 and into EE2 and need to get a whole bunch of channel entries out of a simple channel.

    I’m curious why you’re not just upgrading?

    Is your template type set to XML?

    Also:

    limit="300000"

    is a huge red flag.  If you try with a normal limit - say in the 10 range, do you get different results?

  • #7 / Nov 03, 2011 7:39am

    dzr_rtw

    86 posts

    I’m curious why you’re not just upgrading?

    Because the EE2 install already exists - there is no upgrade path. I have to get hundreds of records into a new channel.

    Is your template type set to XML?


    yes

    limit="300000"

    is a huge red flag.  If you try with a normal limit - say in the 10 range, do you get different results?

    red flag for what?

    since there is an inbuilt limit of 100 entries - i was told by an EE forum admin to do this in order to get all the records. i have channels that have limit = 99999999 and are fine.

    i tried limit=10 with no change - http://www.georgia-enews.uga.edu/index.php?/site/export/

  • #8 / Nov 03, 2011 10:54am

    Ty Martin

    232 posts

    It is supposed to be parsed as XML -  it is the channel exported as XML - note the “<?xml version=“1.0” encoding=“UTF-8”?>” in the template code.

    I completely understand that, but it makes no difference to the output and makes a big difference in how EE handles the code. Give it a try.

  • #9 / Nov 03, 2011 10:54am

    Ty Martin

    232 posts

    Or alternatively, try renaming {summary} to something like, like {summ}

  • #10 / Nov 03, 2011 12:12pm

    dzr_rtw

    86 posts

    I completely understand that, but it makes no difference to the output and makes a big difference in how EE handles the code. Give it a try.

    I’m sorry - give what a try?

    The “Template Type” is XML - not HTML.

     

  • #11 / Nov 03, 2011 12:29pm

    dzr_rtw

    86 posts

    Or alternatively, try renaming {summary} to something like, like {summ}

    I can try this but can I ask why?

  • #12 / Nov 03, 2011 12:31pm

    Ty Martin

    232 posts

    I’ve seen the XML setting fail to parse variables on occasion. I think it has to do with reserved words in this case.

    I’m not sure why you’re so resistant to it. I’m just trying to help. 😉

  • #13 / Nov 03, 2011 12:37pm

    dzr_rtw

    86 posts

    I’m not sure why you’re so resistant to it. I’m just trying to help.

    It will break several pages on someone else’s website while I make the change through all the templates it will affect. I will try it but summary isn’t on the list of reserved words http://expressionengine.com/legacy_docs/cp/reserved_words.html

     

     

  • #14 / Nov 03, 2011 1:15pm

    Ty Martin

    232 posts

    It’s just one quick/easy setting. It shouldn’t break anything: http://d.pr/VLeQ

  • #15 / Nov 03, 2011 1:51pm

    dzr_rtw

    86 posts

    It’s just one quick/easy setting. It shouldn’t break anything: http://d.pr/VLeQ

    I appreciate your effort to help. As I said it already has the Template Type set to XML.

    When I said there would be problems with the change I was talking about changing the field name “summary” to somthing else:

    Or alternatively, try renaming {summary} to something like, like {summ}

    I can try this but can I ask why?

    I’ve seen the XML setting fail to parse variables on occasion. I think it has to do with reserved words in this case.

    I’m not sure why you’re so resistant to it. I’m just trying to help. 😉

    I’m not sure why you’re so resistant to it. I’m just trying to help.

    It will break several pages on someone else’s website while I make the change through all the templates it will affect. I will try it but summary isn’t on the list of reserved words http://expressionengine.com/legacy_docs/cp/reserved_words.html

    “It” being your suggestion to change “summary” to “summ.”

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases