Testing Feature

webavant - January 20, 2009 - 04:49
Project:MLS Module
Version:5.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi Arthur,

This module appears to be doing cool stuff! I got everything configured to a point where the extract appears to be working from Drupal, but I was finding myself wishing for a way to limit the amount of listings downloaded for testing purposes. Please let me know if I am overlooking something.

Thanks!

#1

webavant - January 20, 2009 - 06:40

It appears this isn't an option from Drupal, so for the time being, I modified the call to createControlFile in mls_viele.php to only get '3' listings instead of '1000' for testing purposes.

#2

mattmm - February 20, 2009 - 03:36

I changed my setting to 4 and after clicking execute - drupal just hangs loading, until I hit stop and receive this error:

* warning: simplexml_load_file() [function.simplexml-load-file]: /home/redev2/public_html/rets/targets/download.xml:85: parser error : Premature end of data in tag VIELE line 2 in /home/redev2/public_html/sites/all/modules/mls/mls_viele.php on line 146.
* warning: simplexml_load_file() [function.simplexml-load-file]: in /home/redev2/public_html/sites/all/modules/mls/mls_viele.php on line 146.
* warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home/redev2/public_html/sites/all/modules/mls/mls_viele.php on line 146.
* Failed to load Viele XML file for some reason
* MLS execution halted: no data file.

#3

awjrichards - February 20, 2009 - 17:58

Mattmm - this is likely related to the infinite loop problem. I'll
explain what's going on on that thread after this.

webavant, eveyrone else -
If you need to change the 'limit' argument in the query, you'll likely
need to do it in the code itself. The module will overwrite the batch
control file created by Viele, so changing settings there might cause
some issues or just plain not work. Around line 240 of mls_viele.php,
inside the _mls_create_bcf() function, you'll see a call to
$extract->createControlFile(). The second parameter there is the
'limit' parameter. It's set at 1000 (there's a long story behind
this, but this was what I needed in order to make the module work for
the MLS providers I was working with) - if you alter that number, you
should be able to alter your limit.

This module is incredibly tricky - there are so many different
implementations of the RETS 'standards'. The way it's currently
written, it's very limited in options in terms of customizing queries
of an MLS feed. Also, I only know the module to work for MLS feeds
provided by Rappatoni.

In general, if you can get into the code and start snooping around (in
mls_viele.php), you should be able to piece together what's going on -
it's pretty well commented - and change it to your needs.

 
 

Drupal is a registered trademark of Dries Buytaert.