Hi,

Created a widget with the Widget Theme set to custom. Set the colours and the previews all look fine. Applied the embed code to a page on another domain and viewed the widget - CSS is not coming through so although the widget is displayed it's not being themed at all. If I use a site theme then it does work correctly both in preview and externally.

Another possible issue (although I've not had time to confirm this) - do some widget edits require you to apply a new embed code on the external site? I was trying different settings and got a page not found error when I refreshed the external widget which needed a fresh copy/paste of the embed code to fix. Given that once you have a population of widgets "out in the wild" you shouldn't need people to update their code this would be a little bit worrying if you can't do edits. Hopefully this was just use error on my part!

Thanks,
Paul

CommentFileSizeAuthor
#8 embed_widgets-289936.patch1.87 KBjtsnow
#5 CSS_Permission.patch780 bytesjtsnow

Comments

jtsnow’s picture

I'm not sure why the CSS is not coming through. Could you check the source code of the widget and tell me if the custom CSS is being included? It should be the last CSS file listed.

The issue with editing a widget and then having to get new code is likely due to the new security features I've implemented. See #287467: Prevention against hacking. I will work on a fix for this.

freshaspect’s picture

The last CSS file listed is coming out as:

<link type="text/css" rel="stylesheet" media="all" href="http://site1/embed-widgets/css/iframe/YTozOntzOjU6InR5cGVzIjthOjE6e3M6NjoiaWZyYW1lIjtpOjE7fXM6NToidGhlbWUiO2E6Mzp7czo0OiJuYW1lIjtzOjE5OiJjdXN0b21fd2lkZ2V0X3RoZW1lIjtzOjc6ImJnY29sb3IiO3M6NjoiRkZGRkZGIjtzOjExOiJ3aWRnZXRjb2xvciI7czo2OiJFRUVFRUUiO31zOjY6ImlmcmFtZSI7YTozOntzOjU6IndpZHRoIjtpOjI1MDtzOjY6ImhlaWdodCI7aToyNTA7czo4OiJmb250c2l6ZSI7aTo3MDt9fQ%3D%3D?t" />

Hope this helps!

jtsnow’s picture

What happens when you enter that URL into your browser? It should display a CSS file.

freshaspect’s picture

It goes to the Access is Denied page. If I login beforehand as admin I do get the CSS file.

jtsnow’s picture

Assigned: Unassigned » jtsnow
StatusFileSize
new780 bytes

This patch should fix the CSS problem. Thanks for the bug report!

jtsnow’s picture

Status: Active » Patch (to be ported)

As long as you give anonymous users permission to "Access Content", this will work.

freshaspect’s picture

Perfect! Tested the patch and it did indeed resolve the problem.

Thanks!

jtsnow’s picture

StatusFileSize
new1.87 KB

This patch should fix the problem of having to get new code after making changes to a widget. You will have to update widget code once after applying the patch, but after that, you shouldn't have to get fresh code after making changes to a widget.

jtsnow’s picture

Status: Patch (to be ported) » Fixed

Setting this to fixed...

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.