If I make a document with one unassigned box and change it to text_type I can add contents to the textframe.
app.documents[0].pages[0].allPageItems[0].contentType = ContentType.TEXT_TYPE; app.documents[0].pages[0].allPageItems[0].contents = 'TEST';
But if I also create a textframe, group these, and with a script ungroup, loop thru them and to the exact same thing, it changes type but I cant add contents to it:
var group = app.documents[0].pages[0].allPageItems[0]; var group_items = group.allPageItems; group.ungroup(); for( var i = group_items.length - 1; i >= 0; i-- ) { if( group_items[i].contentType == ContentType.unassigned ) { app.select( group_items[i] ); group_items[i].contentType = ContentType.TEXT_TYPE; group_items[i].contents = 'TEST'; } else { group_items[i].remove(); } }