IFrame widget & CSS-file

9 views
Skip to first unread message

christia...@student.uni-luebeck.de

unread,
Mar 8, 2018, 3:38:31 AM3/8/18
to Information Workbench Discussions
Hi,

I encountered yet another problem. I would like to use the IFrame widget to display a webpage on a wiki-site. Furthermore I want to customize the style of the displayed external page with a CSS file. Here is my widget code:

{{#widget: IFrame | 
 | scrolling = 'auto'
 | styling = 
   {{ cssClass = 'myIFrame'
   }}
}}

And my CSS file contains the following:

.header {
 display:none;
}

So apparently nothing happens to the IFrame. I placed the CSS file according to the help in this directory: /fluidOps-Suite/webapps/ROOT/myIFrame.css
Do I have to register the CSS-file first or why is this not working?

Regards
Christian

Andreas Schwarte

unread,
Mar 8, 2018, 3:46:25 AM3/8/18
to iwb-dis...@googlegroups.com

Hello Christian,

 

this is likely due to the MIXED_CONTENT policy in modern browser: if you are accessing a page via HTTPS it is not (directly) possible to embed an iframe using an HTTP address.

 

See for instance https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content for an explanation.

 

The solution would be to access the external page using https.

 

Best,

Andreas

--
You received this message because you are subscribed to the Google Groups "Information Workbench Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iwb-discussio...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

christia...@student.uni-luebeck.de

unread,
Mar 8, 2018, 4:09:50 AM3/8/18
to Information Workbench Discussions
Hi Andreas,

thank you for the answer. Unfortunately the page I want to display is not available via HTTPS. Is there a possibility to turn of HTTPS in the IWB? I just tried that and accessed the IWB through localhost:50080 so the result was that nothing is diplayed anymore. I could neither log in nor access any other page.
It is necessary for my implementation that the IFrame widget works so I would be really happy if there is a workaround.

Regards 
Christian

Andreas Schwarte

unread,
Mar 8, 2018, 4:19:51 AM3/8/18
to iwb-dis...@googlegroups.com

Hi Christian,

 

for security reasons HTTP needs to be explicitly enabled (i.e. it is not available by default), see https://help.fluidops.com/resource/Help:Installation#Enabling_HTTP

 

Note that this can be set on “/resource/Admin:Config” (search for enableHttp) and that the setting requires a restart.

christia...@student.uni-luebeck.de

unread,
Mar 8, 2018, 4:24:51 AM3/8/18
to Information Workbench Discussions
Hi Andreas,

I successfully enabled HTTP but when I access the IWB I can't do anything like I wrote. There is no log-in button and nothing of the content is displayed. So is there a problem with the rights of a not-logged-in user and if so how can I grant access?

Regards
Christian

Andreas Schwarte

unread,
Mar 12, 2018, 4:13:59 AM3/12/18
to iwb-dis...@googlegroups.com

Hi Christian,

 

we just locally tested this and for us enabling HTTP works with the following steps

 

1) put “enableHttp=true” into config.prop (or change it in the UI)

2) restart the platform

3) Check in the logs that you see something like

 

 

 

 

--

Andreas Schwarte

Platform Architect

andreas....@fluidops.com

T +49 6227 3580 87 – 40

fluid Operations AG | Altrottstrasse 31 | 69190 Walldorf | Germany | www.fluidops.com

fluidOps – Semantifying Business

Executive Board Paul Bolger | Supervisory Board Michelle VonderHaar, Larry Martin, Keith Morrow | Register Court Mannheim, HRB 709796 | VAT-No. DE258759786

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Andreas Schwarte

unread,
Mar 12, 2018, 4:15:43 AM3/12/18
to iwb-dis...@googlegroups.com

For completeness the rest of the mail

 

we just locally tested this and for us enabling HTTP works with the following steps

 

1) put “enableHttp=true” into config.prop (or change it in the UI)

2) restart the platform

3) Check in the logs that you see something like

 

2018-03-12 09:08:41,244 INFO [serviceMain] com.fluidops.jetty.StartJetty - HTTP URL: http://xx.xx.xx.xx:50080

 

4) navigate to http://localhost:50080/

 

Can you check if any firewall prevents the access?

 

Best,

Andreas

christia...@student.uni-luebeck.de

unread,
Mar 12, 2018, 8:18:05 AM3/12/18
to Information Workbench Discussions
Hi Andreas,

thanks again for the answer. This time it actually worked with the HTTP connection. The mixed content problem is solved when I am connected over HTTP. But the CSS-file I wrote for the IFrame still doesn't work. Do I understand it correctly that this CSS-file will manipulate the content displayed in the IFrame? 

Regards
Christian

Andreas Schwarte

unread,
Mar 12, 2018, 12:06:21 PM3/12/18
to iwb-dis...@googlegroups.com

Hi Christian,

 

as an Iframe renders an external source it is (generally) not possible to modify its content. This is particularly true if the content is not provided by the same web-server.

 

If you want to modify the content of the iframe (e.g. via styling) you have to do this in the source.

 

In the platform you can modify the iframe itself, e.g. adding a border.

Reply all
Reply to author
Forward
0 new messages