Crossmark Button Didnt Work at Article Pages Only

Hello everyone, I just wonder, why is my crossmark button at article pages on website didnt work? But at the other version like pdf, epub and html everything is okay. I’m already add custom tags at distribution pages. What happen?

Thanks in advance.

Hi,

I’ve updated your forum permissions so you can post links now. Could you give me an example of an article page where Crossmark isn’t working, but where it is working from the equivalent pdf?

Thanks,
Shayn

1 Like

Hello Shayn,

Thanks for reply.
Here is Link. You can download the pdf at that page too.

Thank you for that example. I consulted with one of my colleagues, who was able to identify the cause of the problem.

The Crossmark button is enabled by a script that you embed in the html code for each landing page. You have included that script like this

<!-- Start Crossmark Snippet v2.0 -->
  <div style="text-align:right">
  <script src="http://0-crossmark--cdn-crossref-org.libus.csd.mu.edu/widget/v2.0/widget.js"></script>
  <a data-target="crossmark"><img src="https://i.ibb.co/x8hQgN0/Selection-005.png" width="150" /></a>
  </div>
<!-- End Crossmark Snippet -->

That’s correct, except that you should change the “http” to “https” in this line
<script src="http://0-crossmark--cdn-crossref-org.libus.csd.mu.edu/widget/v2.0/widget.js"></script>

However, when checking the Content Security Policy (CSP) that you have applied, it specifies that scripts can only be loaded from your own domain and a few other domains (google analytics, cloudflare, etc.). That looks like this:

content-security-policy script-src 'self' *.googletagmanager.com *.gstatic.com *.cloudflare.com *.googleapis.com *.google.com *.google-analytics.com 'unsafe-inline';

So, that’s preventing the Crossmark script from working, and that’s why the button image is loading, but it’s not clickable and doesn’t open the Crossmark dialog.

You’ll need to update that CSP to either allow scripts from *.crossref.org in general or from crossmark-cdn.crossref.org in particular.

2 Likes

Hello Shayn,

I’m so grateful. After I applied your suggestion, now the problem is solved.

Thanks a lot!

1 Like

I’m glad we were able to help!