UHU Por is used by aeromodellers to repair hard foam aircraft similar to the hive foam. There are a few types of foam it doesn't stick so well, with but if pains are selling it I am assuming it is compatible. Then again if a bee keeping company fails to spot holes in their newly produced poly hives who knows if they have even tested the glue!
There is another great glue for foam, Gorilla glue (white version) which expands a lot, and needs to be used sparingly. It's great for filling minor cracks and building up where a little foam has been lost or compressed. One part is lightly damped with water and the other part coated lightly with the glue. On putting them together it activates, and sets in about one hour.
I am not sure how it would react with poly hive foam but could be tested on a small area. It sets like concrete so not good if you allow it to ooze out and don't level it before it hardens.
WARNING - I have no idea if Gorilla glue is "Bee friendly" or not.
One other trick that works with some foam types. If you get a dent in the foam it can be repaired with hot, almost boiling water. After a few seconds of exposure to the boiling water the foam goes back into it's original shape.
Try this at your own risk though!
One of the big supermarkets that inflated it's sugar prices lately sells it, and I've seen it in the Range stores too.