It seems to run fine for a while then I get this error:

An error occurred. /weston/batch?id=28&op=do <br /> <b>Fatal error</b>: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/apollo9k/public_html/weston/sites/all/modules/pirets/pirets.connect.inc:324 Stack trace: #0 /home/apollo9k/public_html/weston/sites/all/modules/pirets/pirets.connect.inc(324): SimpleXMLElement-&gt;__construct('&lt;html&gt;&lt;head&gt;&lt;ti...') #1 /home/apollo9k/public_html/weston/sites/all/modules/pirets/pirets.connect.inc(103): _pirets_explode_compact('&lt;html&gt;&lt;head&gt;&lt;ti...') #2 /home/apollo9k/public_html/weston/sites/all/modules/pirets/pirets.batch.inc(125): pirets_query_search('RES', Array, Array, '500', 472000) #3 /home/apollo9k/public_html/weston/includes/batch.inc(189): pirets_class_update_batch_fetch('RES', Array) #4 /home/apollo9k/public_html/weston/includes/batch.inc(106): _batch_process() #5 /home/apollo9k/public_html/weston/includes/batch.inc(34): _batch_do() #6 /home/apollo9k/public_html/weston/modules/system/system.admin.inc(1808): _batch_page() #7 /home/apollo9k/public_html/weston/includes/menu.inc(348): system_batch_page('pir in <b>/home/apollo9k/public_html/weston/sites/all/modules/pirets/pirets.connect.inc</b>  on line <b>324</b><br /> 

Then when I jump back to the PIRETS config i see this error:

warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : Opening and ending tag mismatch: HR line 1 and body in /home/apollo9k/public_html/weston/sites/all/modules/pirets/pirets.connect.inc on line 324.

Comments

fluitfries’s picture

i get this same error. however this is my first time using PIRETS and i am using it with rets.mlspin.com which i can find no documentation that points to previous success with this service. i put in the server credentials and everything was fine. the property classes step also worked fine. however on the "useful field selection" step i get this error. can anyone assist? here is the error:

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/junto/public_html/sites/all/modules/pirets/pirets.connect.inc:324 Stack trace: #0 /home/junto/public_html/sites/all/modules/pirets/pirets.connect.inc(324): SimpleXMLElement->__construct('</RETS>??') #1 /home/junto/public_html/sites/all/modules/pirets/pirets.connect.inc(51): _pirets_explode_compact('</RETS>??', 'METADATA-TABLE') #2 /home/junto/public_html/sites/all/modules/pirets/pirets.connect.inc(422): pirets_query_metadata_table() #3 /home/junto/public_html/sites/all/modules/pirets/pirets.admin.inc(418): pirets_fields_fetch() #4 /home/junto/public_html/includes/form.inc(376): pirets_sets_fields_form('SF') #5 /home/junto/public_html/includes/form.inc(102): drupal_retrieve_form() #6 /home/junto/public_html/includes/menu.inc(348): drupal_get_form(Array) #7 /home/junto/public_html/index.php(18): menu_execute_active_handler() #8 {main} thrown in /home/junto/public_html/sites/all/modules/pirets/pirets.connect.inc on line 324
fluitfries’s picture

I have this same exact problem trying to use PIRETS with http://rets.mlspin.com/

i can make it through the server setup and the property classes ok, but as soon as i try to populate fields, i get this error.

i do think that mlspin only provides rets version 1. could that be part of the issue?

thanks!

jbergeron’s picture

I just started receiving this error this morning for the first time. I was wondering if it was something with my provider but apparently I'm not the only one seeing it.

jbergeron’s picture

Not sure if this has to do with it, but I removed my photo count correlation field and then updated my listings and it was most of the way through when that error kicked back. I wouldn't think that removing the correlation would cause the problem as I have done it before.

Garrett Albright’s picture

apollo, in your case, it looks like the server is returning HTML instead of RETS listings. Check that your query URL is correct.

fruitflies and possibly the rest of you, it may be a text encoding issue. Try experimenting with the text encoding settings. Perhaps contact your RETS server provider and confirm the encoding in which they are returning listings.

Anonymous’s picture

I was having this problem as well and i confirmed that after switching it to Windows-1252 for a solid earth server seems to have fixed this issue.

Anonymous’s picture

Version: 6.x-3.0-beta4 » 6.x-3.x-dev

Nope, I just had a string of errors show up.

[Sat Nov 06 15:53:23 2010] [error] [client] PHP Fatal error:  Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/test/public_html/sites/all/modules/pirets/pirets.connect.inc:324
Stack trace:
#0 /home/test/public_html/sites/all/modules/pirets/pirets.connect.inc(324): SimpleXMLElement->__construct('<!DOCTYPE HTML ...')
#1 /home/test/public_html/sites/all/modules/pirets/pirets.connect.inc(103): _pirets_explode_compact('<!DOCTYPE HTML ...')
#2 /home/test/public_html/sites/all/modules/pirets/pirets.batch.inc(150): pirets_query_search('RES', Array, Array, '250', 0)
#3 [internal function]: pirets_class_update_batch_fetch('RES', Array)
#4 /home/test/public_html/includes/batch.inc(190): call_user_func_array('pirets_class_up...', Array)
#5 /home/test/public_html/includes/form.inc(2548): _batch_process()
#6 /home/test/public_html/sites/all/modules/pirets/pirets.batch.inc(39): batch_process('admin/settings/...')
#7 /home/test/public_html/sites/all/modules/pirets/pirets.module(229): pirets_class_update_batch('RES', false)
#8 [internal function]: in /home/test/public_html/sites/all/modules/pirets/pirets.connect.inc on line 324
Garrett Albright’s picture

Your server appears to have sent PIRETS an HTML page instead of a proper property listing. This seems to happen often when something about PIRETS' request flips out the server and it tries to return a visual error message instead of a standard RETS one. However, without access to your system, I can't guess what it might be very well.

Anonymous’s picture

Well, this is a test account with only 250 listings. So, I'm curious if the test information isn't just broken. I've been trying to get some time to work on this. I'll let you know what i find.

jday’s picture

changing the server response encoding (under advanced settings) to: ISO-8859-1
fixed this problem for me

aaronortega’s picture

I am having a similar issue. When I try to change my server settings I get this message: A valid response code could not be found in the response. This most likely means an error occurred before we could even check if the server was accessible. Please double-check the form values, but this is probably not your fault.

When I try to update the listings I get this message:
An error occurred. /batch?id=140&op=do
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/es/public_html/sites/all/modules/pirets/pirets.connect.inc:347 Stack trace: #0 /home/es/public_html/sites/all/modules/pirets/pirets.connect.inc(347): SimpleXMLElement->__construct('') #1 /home/es/public_html/sites/all/modules/pirets/pirets.connect.inc(103): _pirets_explode_compact('') #2 /home/es/public_html/sites/all/modules/pirets/pirets.batch.inc(149): pirets_query_search('COML', Array, Array, '250', 0) #3 [internal function]: pirets_class_update_batch_fetch('COML', Array) #4 /home/es/public_html/includes/batch.inc(189): call_user_func_array('pirets_class_up...', Array) #5 /home/es/public_html/includes/batch.inc(105): _batch_process() #6 /home/es/public_html/includes/batch.inc(33): _batch_do() #7 /home/es/public_html/modules/system/system.admin.inc(1829): _batch_page() #8 [internal function]: system_batch_page() #9 /home/es/public_html/includes/menu.inc(350): call_user_func_array('system_batch_pa...', Array) #10 /home/ in /home/es/public_html/sites/all/modules/pirets/pirets.connect.inc on line 347

We just moved to a new server so I thought that might be it, but I have another site on the same server that is working fine. Any thoughts?

aaronortega’s picture

Quick update to what I did to resolve this. It wasn't the script at all. Pirets was returning an error page when the real case was that my server's firewall was blocking the traffic. I use rapatonni RETS and they require a certain port to be open to grabbing the data, so make sure that if your RETs provider requires you to use a port other than :80 that you open it up in your firewall.