I was doing some site updates and ran across an older piece of content that I wanted to edit, but it's not allowing me to edit the body field. I'm the site admin and I checked the permissions page. I'm allowed to add / edit / delete all content, so what could be the problem?

 

Accepted answer

Fixed it by changing it from code:

$node = node_load(3456);
echo $node->field_review['und'][0]['format'];
$node->field_review['und'][0]['format'] = 1;
node_save($node);

All works as advertised now.

Comments

This looks like an inexistent text format problem. That field must be using a text format that doesn't exist. Check the field in the Manage Field UI and re-save it.

 

 

Compounding the problem is that there are no formatting options shown for that field. 

ETA: Oops, misunderstood your comment. I went over to Manage Fields and checked. The setting is already to "Filtered HTML", which definitely does exist and which I have been using extensively.

And, if the text format DOES exist, check the permissions assigned to that particular text format by opening it at admin/config/content/formats

Dev load shows text format "5" which does exist, and which I do have permissions to use. This particular format has Text editor "None" so I also tried changing that to CKE 5 ... even though it would mess up the saved content.

But that didn't do anything either.

I'm thinking of using Execute PHP to change the format to 1 (Filtered HTML).

Don't check the Permissions page. Instead open the text format that's being used for that field at admin/config/content/formats

Open the text format, then scroll down and check that Administrator is checked:

EDIT: Actually, the Permissions page will show the same info as above.

 

So... I have no idea what the problem may be. 

Fixed it by changing it from code:

$node = node_load(3456);
echo $node->field_review['und'][0]['format'];
$node->field_review['und'][0]['format'] = 1;
node_save($node);

All works as advertised now.

It's weird that your text format ids are numeric, but I guess that's because it's a D7 upgrade.

Yup. It's a carryover from D7.