Okay, so everything is looking great, but we're back to the entity alias issue again.
I've noticed that when I run a import from drush, two things happen:
- When listings are processed, they receive an alias of default/entity_id - pathauto pattern
- When photos are processed, they cause a new alias to be generated, except with the correct URI- drealty_listing/entity_id
The result is a duped alias (path/path, path/path-0, etc).
I did a little poking around and found that by changing line 520 in the daemon:
$item = new Entity(array('conid' => $connection->conid, 'type' => $class->bundle), $entity_type);
to
$item = entity_create($entity_type,, array('conid' => $connection->conid, 'type' => $class->bundle));
this problem went away completely.
Attached is a patch for review, to see if you see what I see.
Comments
Comment #1
kevinquillen commentedPatch. And, ignore the double comma in OP. Can't edit it.
Comment #2
kevinquillen commentedComment #3
kevinquillen commentedI can confirm that this change is definitely working. I've committed it to dev.
Comment #4
kevinquillen commentedComment #5
j9 commentedHi kevinquillen,
Am I correct that you are using drealty entity fields and passing them to pathauto to format the urls?
If so, how are you doing this? I do not see entity field options from drealty in the pathauto options.
Thanks very much!
Comment #6
camidoo commentedyou'll need this module to make that work j9:
http://drupal.org/sandbox/damz/1332096
Comment #7
twodCool, I didn't know about that module, so I put together the beginnings of my own pathauto patch for drealty.
The differences I see is that my patch supports individual patterns for listing classes whereas the module only allows one pattern, but my patch doesn't yet support batched alias deletion.
Edit: I just noticed this patch included the drealty-class token as well so, one doesn't need my last patch from the token issue if using this.
Comment #8
j9 commentedcamidoo - thanks! Damien's Pathauto integration for all Entity Types works like a charm! :D
Comment #9
kevinquillen commentedHere is a doc page on setting this up:
Aliasing Listings
Comment #11
duntuk commentedNoted in another alias issue:
As of right now, you can do this with the latest version of drealty, pathauto, and Entity API module: specifically enable "Entity Tokens" and you'll see them listed under pathauto patterns.
Cheers.