I have the Id field and Key field set as the MLS # on the config page (see attachment)
BUT I am using the Automatic Entity Labels module to change the listing titles to the street address.
And when importing I get this error over and over:
String data, right truncated: 1406 Data too long for [error] column 'rets_id' at row 1
So it seems like the auto entity label is happening before the import...?
| Comment | File | Size | Author |
|---|---|---|---|
| Screen shot 2012-04-03 at 11.56.42 PM.png | 45.06 KB | jday |
Comments
Comment #1
kevinquillen commentedGotcha. Will implement a fix for this that increases the length of this field to 64.
Comment #2
kevinquillen commentedHere is a patch of the changes I just made to 7.x-3.0-dev. It worked for me. I increased rets_id and rets_key fields to 64 instead of 25, but based on the screenshot it seems like 25 would be enough. I made it 64 anyway, to be consistent with the rets_status field.
After patching, run update.php to adjust your database.
I am not sure if you can/should use Automatic Entity Label, because I have a feeling it might be trying to set the title on the entity key field. I haven't tried this module yet.
Why not create a 'Title' text field and map it to Street in RETS? That is what I do, works great.
Comment #3
jday commentedI do have a 'Title' text field mapped to the address but how do you make that the title of the entity without using Auto Entity Label?
Comment #4
kevinquillen commentedWhere is this Title supposed to show up?
Comment #5
jday commentedIn the auto-complete box of an entity reference field : )
Comment #6
kevinquillen commentedYeah, if that module is trying to rewrite rets_id that won't work- it has to remain the MLS ID.
Have you tried this?
http://drupal.org/project/entityreference_view_widget
Referencing in D6 used to allow Views to populate fields, perhaps this will work?
Comment #7
jday commentedok I've tried entitreference_view_widget and technically it works, but is quite a bulky and inelegant option, especially when there will be more than 20K listings to scroll through...
dRealty 2.0 let you set the title and url in the settings didn't it?
what happens if rets_id is not the mls id?
Comment #8
camidoo commentedI've got a solution for this. Give me over the weekend and i'll have it fixed.
Basically, in drealty.module, in drealty_entity_info() under drealty_listing => entity_keys, there is an entry for 'label' => 'rets_id', this needs to be changed to 'title' or something similar.
Then in the .install file, in the hook_schema() need to add a column to drealty_listings table called 'title', then do an hook_update_N() to add the column in.
After that in drealty.daemon.php need to initially set the title to the rets_id field.
So basically what your auto_entity_label module is doing is setting what ever the field that is set to label, to the value you configure. In this case label is set to 'rets_id', and we should probably change this.
Comment #9
camidoo commentedjust pushed up a change for this into -dev, you'll need to run update.php or do a
drush updatedbaddressfield has terrible token support! when i used [drealty_listing:
] it worked, however there are line breaks and the spacing isn't correct.
Comment #10
jday commentedInstalled the dev version and setting an auto_entityl_label so far is working perfectly, no errors on import.
There is a patch for addressfield that exposes more tokens: http://drupal.org/node/1188778
With the patch you can fix the bad spacing and leave off the country.
Thanks camidoo for your continued phenomenal work on this module!
...now how about some pathauto integration : )
Comment #11
camidoo commentedPerfect! Glad to hear that it is working, i'm going to mark this as fixed and roll a new release soon.
Comment #13
bloomt commentedAuto entity label is not working with the current version of drealty dev