0

I have some code that at localhost runs perfectly but moved to production doesn't load additional fields to nodes.

$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node')
  ->entityCondition('bundle', 'answer')
  ->propertyCondition('uid', $uid);
if (! $owner) $query->propertyCondition('status', 1);
$entities = $query->execute();

// if user has some answers
if (isset($entities['node']))
{
  $nodes = node_load_multiple(array_keys($entities['node']));
  $views = node_view_multiple($nodes, 'teaser');
  $build['#nodes'] = $views['nodes'];
  return $build;
}
return array();

What may be wrong in my migration to production? Or is there any possible aliment with using Feature module to export content types and field associated with it?

To make clear: I've created this content type and fields in CCK and used Feature module to move to production.

  • Did you create some instances of the new content type on your production system as well? – BetaRide Jun 28 '12 at 9:55
  • Yes, this code returns real nodes but without additional fields created by me. – kobylecki Jun 28 '12 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.