Skip to main content
Bounty Ended with 25 reputation awarded by CommunityBot
code syntax added to increase readability.
Source Link
Mołot
  • 21.9k
  • 8
  • 59
  • 112

Just to double check: You have a content type with fields for your images from cloudinary, and you have nodes that already exist in your site that you need to get the data from Cloudinary into your node?

It looks like your looking up nodes through a query by the entity id (nid). Instead of doing that I would simply just load the node object by the node_loadnode_load function (like node_load($entity_id)node_load($entity_id). You should be able to then assign the value of cloudinary fields in the node (it's gonna be something like $node->FIELD_NAME['und'][0]['value'])$node->FIELD_NAME['und'][0]['value']). Once you have all your custom fields inputed, just use node_save($node)node_save($node).

Just to double check: You have a content type with fields for your images from cloudinary, and you have nodes that already exist in your site that you need to get the data from Cloudinary into your node?

It looks like your looking up nodes through a query by the entity id (nid). Instead of doing that I would simply just load the node object by the node_load function (like node_load($entity_id). You should be able to then assign the value of cloudinary fields in the node (it's gonna be something like $node->FIELD_NAME['und'][0]['value']). Once you have all your custom fields inputed, just use node_save($node).

Just to double check: You have a content type with fields for your images from cloudinary, and you have nodes that already exist in your site that you need to get the data from Cloudinary into your node?

It looks like your looking up nodes through a query by the entity id (nid). Instead of doing that I would simply just load the node object by the node_load function (like node_load($entity_id). You should be able to then assign the value of cloudinary fields in the node (it's gonna be something like $node->FIELD_NAME['und'][0]['value']). Once you have all your custom fields inputed, just use node_save($node).

Source Link
Jance
  • 2.4k
  • 17
  • 31

Just to double check: You have a content type with fields for your images from cloudinary, and you have nodes that already exist in your site that you need to get the data from Cloudinary into your node?

It looks like your looking up nodes through a query by the entity id (nid). Instead of doing that I would simply just load the node object by the node_load function (like node_load($entity_id). You should be able to then assign the value of cloudinary fields in the node (it's gonna be something like $node->FIELD_NAME['und'][0]['value']). Once you have all your custom fields inputed, just use node_save($node).