XMLGrab Stalls When Fetching
Posted: 01 September 2009 03:32 PM   [ Ignore ]  
Newbie
Rank
Total Posts:  2
Joined  2009-09-01

Hi Andrew

I’ve been trying to implement the XMLGrab Plugin on a new server for a client and have run into a couple of problems.  I’m trying to import an xml file outputted by the Slideshow Pro Director image management system - the file is located here:

http://dev.sundaydrivestudios.com/slideshow_test/output_xml

Whenever I run the XMLGrab import script (located at http://dev.sundaydrivestudios.com/slideshow_test/import_xml) I get the following message and then nothing happens:

Fetching: http://dev.sundaydrivestudios.com/slideshow_test/output_xml

Occasionally though I get a PHP error message:

PHP Fatal error:  Call to undefined function mb_convert_encoding()

Weirdly this only seems to happen in Firefox, and the server admin says multibyte string functions have definitely been enabled on the server.

Here’s the code I’m using:

{exp:xmlgrab url="http://dev.sundaydrivestudios.com/slideshow_test/output_xml" 
                          
itempath="/gallery/album"
                          
weblog="2" 
                          
title="album_name"
                          
date="created_at"
                          
use="album_id|album_description|album_preview"
                          
fields="album_id|album_description|album_preview"
                          
unique="title"

We’re running a fresh install of EE 1.6.8 - XMLGrab is the only thing we’ve installed so far.  The strange thing is I have exactly the same setup/scripts etc running on another website and it all works perfectly - any ideas of what the problem might be would be a great help!

Thanks

Simon

Profile
 
 
Posted: 02 September 2009 01:54 AM   [ Ignore ]   [ # 1 ]  
Administrator
RankRankRankRank
Total Posts:  179
Joined  2006-04-12

A few possibilities are:

1) Your new server does not allow you to access files over http. You could try replacing the url= parameter with the path to the file on the hard drive.

2) Check that the file is saved as UTF-8 with LF line endings.

3) That the quotes in the plugin call are ‘straight’ quotes, and have not been replaced by smart quotes.

I cannot see anything obviously wrong, so I’d suggest trying 1).

Let me know if you are still having difficulties.

Andrew

Profile
 
 
Posted: 02 September 2009 02:52 PM   [ Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  2
Joined  2009-09-01

Hi Andrew

Thanks for getting back to me

I’ve checked through the files for 2) and 3) and all seems to be ok with those so went with 1).  With an http path to the file
Firefox either stalls at the

Fetching: http://dev.sundaydrivestudios.com/images/output.xml

PHP Fatal error:  Call to undefined function mb_convert_encoding() in systemfolderpath…\plugins\pi.xmlgrab.php on line 204

Safari only ever stalls at the

Fetching: http://dev.sundaydrivestudios.com/images/output.xml

With a direct path to the file on the server Firefox gives the following error:

Unable to parse XML data
PHP Notice:  Trying to get property of non-object in systemfolderpath…\plugins\pi.xmlgrab.php on line 605
PHP Notice:  Trying to get property of non-object in systemfolderpath…plugins\pi.xmlgrab.php on line 629
PHP Notice:  Trying to get property of non-object in systemfolderpath…\plugins\pi.xmlgrab.php on line 645
PHP Warning:  Invalid argument supplied for foreach() in systemfolderpath…\plugins\pi.xmlgrab.php on line 190

Safari just displays the ‘Unable to parse XML data’ message

The XML script I’m trying to import is:

<?xml version="1.0" encoding="utf-8"?> 
    
<gallery>
    <
album>
        <
created_at>Mon Aug 31 16:52:41 PDT 2009</created_at>
        <
album_name>Couples</album_name>    
        <
album_id>6</album_id>
         <
album_description>Some Description</album_description>  
          <
album_preview>Image link</album_preview>
    </
album>
    <
album>
        <
created_at>Mon Aug 31 15:01:15 PDT 2009</created_at>
        <
album_name>Portraits</album_name>    
        <
album_id>4</album_id>
         <
album_description>Some Description</album_description>  
          <
album_preview>Image link</album_preview>
    </
album>
    <
album>
        <
created_at>Mon Aug 31 16:49:36 PDT 2009</created_at>
        <
album_name>Weddings</album_name>    
        <
album_id>5</album_id>
         <
album_description>Some Description</album_description>  
          <
album_preview>Image link</album_preview>
    </
album>
</
gallery

You can see it here: http://dev.sundaydrivestudios.com/images/output.xml

And again here’s the import script:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<
html >
<
head>

<
title>XML Grab</title>

<
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<
meta name="keywords" content="" />

<
link rel="stylesheet" type="text/css" media="screen, projection" href="" />

</
head>

<
body>

{exp:xmlgrab url="http://dev.sundaydrivestudios.com/images/output.xml" 
                          
itempath="/gallery/album"
                          
weblog="2" 
                          
title="album_name"
                          
date="created_at"
                          
use="album_id|album_description|album_preview"
                          
fields="album_id|album_description|album_preview"
                          
unique="title"}
    
</body>

</
html

It’s located here: http://dev.sundaydrivestudios.com/slideshow_test/import_xml

Thanks

Simon

Profile
 
 
Posted: 03 September 2009 04:14 PM   [ Ignore ]   [ # 3 ]  
Administrator
RankRankRankRank
Total Posts:  179
Joined  2006-04-12

Hi Simon,

The direct path error sounds as if it is not finding the file properly.

If you could email me the results of the Admin > Utilities > PHP Info page in the Control Panel that would be helpful.

If the problem continues I’ll send a new version of the plugin with some extra debugging in it to test where it is going wrong.

Thanks,
Andrew

Profile
 
 
Posted: 17 December 2009 08:58 PM   [ Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  1
Joined  2009-12-17

I actually tried doing the same thing too but i kept getting an error.


Regards,
Corbie
Simulation pret immobilier

Profile
 
 
   
 
 
‹‹ Feature Request      Expiration Date ››