Invalid Layout when embedding code

Hi I just needed some help on layouts, whenever I insert some embedded code such as iframe code, javascript or other types it causes my layout to become invalid and it then will not appear - the preview appears fine but the actual content on the player does not appear. I have just all my regions and none are empty, checked all permissions and they are correct.

Thanks

That should happen, it might change the layout status ti ‘?’, but should still be valid.

Any example of the embedded code you use? So we can try it on our devices.

Speaking of devices, what CMS and player version are you using please?

Thanks for the reply

I am using 1.7.8 CMS and player version is the latest too. An example of some code is a clock or exchange rates I have tried embedding:

<!-- EXCHANGERATES.ORG.UK LIVE FOREX RATES TICKER START -->
<script type="text/javascript">
var w = '490';
var s = '1';
var mbg = 'f0f0f0';
var bs = 'yes';
var bc = '000044';
var f = 'verdana';
var fs = '10px';
var fc = '000044';
var lc = '000044';
var lhc = 'fe9a00';
var vc = '000044';

var ccHost = (("https:" == document.location.protocol) ? "https://www." : "http://www.");
document.write(unescape("%3Cscript src='" + ccHost + "currency.me.uk/remote/CUK-LFOREXRTICKER-1.php' type='text/javascript'%3E%3C/script%3E"));
</script>
<!-- EXCHANGERATES.ORG.UK LIVE FOREX RATES TICKER END -->

This happens on any item I embed into the page and then the layout becomes ? and it does not display on my Windows player

Could you try creating new embedded item on your layout and in the HTML to embed put:

<iframe src="http://www.exchangerates.org.uk/widget/ER-LRTICKER.php?w=490&s=1&mc=GBP&mbg=f0f0f0&bs=yes&bc=000044&f=verdana&fs=10px&fc=000044&lc=000044&lhc=fe9a00&vc=fe9a00&vcu=008000&vcd=FF0000&" width="490" height="30" frameborder="0" scrolling="no" marginwidth="0" marginheight="0"></iframe>

Also just in case, make sure you have IE11 installed on the PC with Xibo for Windows.

Thanks for the help, just tested this and sorry it didn’t make any difference, here is what I found in my logs

<errormsgCannot modify header information - headers already sent
<errornum<2</errornum
<errortype<Warning</errortype
<scriptname<C:\xampp\htdocs\xibo\xibo\lib\oauth.inc.php</scriptname
<scriptlinenum<31</scriptlinenum

The status on my layout is !

Also found this:

Exception in Run: Client found response content type of ‘text/html; charset=UTF-8’, but expected ‘text/xml’.The request failed with the error message:–
Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set ‘always_populate_raw_post_data’ to ‘-1’ in php.ini and use the php://input stream instead. in Unknown on line 0

Warning: Cannot modify header information - headers already sent in Unknown on line 0
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:ns1=“urn:xmds” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/” SOAP-ENV:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>SOAP-ENV:Bodyns1:RequiredFilesResponse<?xml version="1.0"?> </ns1:RequiredFilesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>–.

in this case, open php.ini and find this line
'always_populate_raw_post_data' set it to '-1'
make sure it’s not commented out (no ; before that line in the php.ini)

after you made this change, restart your web server.

1 Like

Thanks for your help! this worked