Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to create an atom as part of a migration but can't seem to get it to create scald_atom. Any ideas?
Comments
Comment #1
jcisio CreditAttribution: jcisio commentedI haven't tested, but it should work with Migrate Extras (so that you can use arbitrary entity in the destination). Could you share your code?
Comment #2
khyam CreditAttribution: khyam commentedHave run into a similar issue, trying to create an entity but to no avail.
When using dpm() around $entity it is returning empty so it is not creating the actual entity. Have also tried removing the 'entity_metadata_wrapper' and attempted to create my image that way. Is there any way to use entity_create() or is Migrate Extras the only way to go?
Comment #3
gifad CreditAttribution: gifad commentedYou can have a look at
function scald_dailymotion_direct_import()
for a straightforward working sample code
Comment #4
jcisio CreditAttribution: jcisio commentedCommitted 8a1c1ce for better Entity API integration. Now you can use something like this (don't forget the "provider" property):
Comment #5
khyam CreditAttribution: khyam commentedWill check out the dailymotion sample code and will see if i can get it working from that.
jcisio, the entity_create code that you have pasted above returns an error as follows. Have also tried changing some of the other settings but am receiving the same results.
Invalid data value given. Be sure it matches the required data type and format.
**Nevermind had to change the value of the file load id to match files already uploaded. Works, thanks.
Comment #6
khyam CreditAttribution: khyam commentedNevermind had to change the value of the file load id to match files already uploaded. Works, thanks.
Comment #8
anagp CreditAttribution: anagp commentedI am in the same situation as bjalford was. I am trying to migrate create an atom as part of a migration. I am using migrate_extras as explained in Migration from other solutions. Both solutions (the one explained here and the one in migrate_extras. Use the Entity API method entity_create, however this method is not returning a new entity, it is returning false. Any idea what could be the cause?
This is the code I am using to call it.
And this is the code of the entity_create method in the Entity API (entity.module)
Comment #9
anagp CreditAttribution: anagp commentedThe problem in #8 was solved by updating to the last dev version.