Resolution: Not a bug
Affects Version/s: 2.2.1
Fix Version/s: None
When a site policy is in place, and points to local URL, although with fully qualified syntax http://mymoodle.example.com/policy.html, it is displayed for a very short time, then it fades out.
The culprit seems to be function resourcelib_embed_general (lib/resourcelib.php), but only with some themes. Towards the end of the function a YUI injection is not calculating height appropriately. As a result, although <object> element has proper height=600 and width=800, it is being overriden by additional style="height: 0px;".
A quick and dirt fix was to comment the following line:
// $PAGE->requires->js_init_call('M.util.init_maximised_embed', array('resourceobject'), true);
This way, no "style" element is being added to <object> element, and the site policy now appears as expected.
When newly created user tries to login, the site policy is displayed for a short time, then disappears. Close examination shows the following <object> configuration:
<object id="resourceobject" data="http://mymoodle.example.com/policy.htm" type="text/html" width="800" height="600" style="height: 0px; width: 838px;">