In an administrator account using the administrator panel i can create and edit content from content type Country. But when they are created from a script, and even if i own them, i can't edit if their origin is said script. I get the message "You are not authorized to access this page."
Already checked permissions (Admin can edit own content and any content) and rebuild them.
How country is created in code:
$new_country = new stdClass(); $new_country->type = "country_profile"; $new_country->title = $country; $new_country->language = LANGUAGE; global $user; $new_country->uid = $user->uid; node_object_prepare($new_country); $new_country = node_submit($new_country); node_save($new_country); $new_country->status = NODE_PUBLISHED; node_save($new_country); $country_wrapper = entity_metadata_wrapper('node', $new_country);