Jump to content

Recommended Posts

I am having trouble adding the 'gallery widget' to my website.

It only shows an empty view and the developer tools tell me that 'embed.js' could not be loaded from the shutterstock servers.

Apparently the same or a similiar issue was already brought up in this post in the forum (http://forums.submit.shutterstock.com/topic/87591-an-invalid-ssl-on-promoteshutterstockcom/?hl=embed.js), but it does not seem to be fixed.

 

Attached you can find a screenshot of the embedded widget and the html file.

 

I hope you can help me to get the widget to work.

 

Best,

FroeMic

 

 

post-1367982-0-44285600-1473349687_thumb.png

test.html

Share this post


Link to post
Share on other sites

Fixed it!

 

Just make the following two changes to the html you get from the widget generator.

  • server_url: '//promote.shutterstock.com' --> server_url: 'http://promote.shutterstock.com',
  • alensa_js.src = '//promote.shutterstock.com/content/embed.js';   -->  alensa_js.src = 'http://promote.shutterstock.com/content/embed.js';

 

Best, FroeMic

 

PS: If someone from the Shutterstock team reads this, it would be great to add these changes to the widget generator and secure the calls with ssl. Thanks!

 

 

Working Code:

<div data-id='b242443a-36e7-4b08-a993-124edd92994f' class='sstk_widget' style='position: relative; width: 620px; height: 400px;'>
    <a href="http://submit.shutterstock.com" target="_blank" style="position: absolute; bottom: -1px; right: 1px;"> <img src="http://sstkcbstorage.blob.core.windows.net/content/img/red_grey.png" style="height: 26px;" /> </a>
    <script type='text/javascript'>
        window._wdata = window._wdata || [];
        _wdata.push({
            server_url: 'http://promote.shutterstock.com',
            widget_id: 'b242443a-36e7-4b08-a993-124edd92994f',
            host_url: document.URL,
            width: 620,
            height: 400
        });
        (function() {
            if (typeof(alensa_widget) !== 'undefined') return;
            var alensa_js = document.createElement('script');
            alensa_js.type = 'text/javascript';
            alensa_js.async = true;
            alensa_js.id = 'alensa_w_script';
            alensa_js.src = 'http://promote.shutterstock.com/content/embed.js';
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(alensa_js, s);
        })();
    </script>
</div>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...