I am a web developer and have embedded the newsletter archive widget for my client on a page on their site . The archive does not display (nothing displays) and I am not seeing any javascript errors in the console.
Any suggestions on how to troubleshoot this?
Thanks,
Hi @BarryT77 , my apologies lots of confusion here it seems. I'd like to try and help if I can.
Thanks for the code example, I was doing some testing to make sure all is well. I don't think there are any archived emails associated with the account the code snippet is from. In which case, showing nothing would be totally expected. It's worth noting that the code snippet doesn't automatically pull the most recently sent newsletters, but as an account owner you have control over which newsletters to show in your embedded archive using the action menu. This article shows the process of archiving and un-archiving a newsletters from within an account with screenshots and instructions. Can we start by archiving a few desired emails and testing the Wordpress site again?
That's not to say there might not still be some issues to troubleshoot after archiving a few emails, so I'll also mention that if you're testing the code in a standalone HTML file I think you may still run into some issues. This is due to the location of the Javascript file in the snippet not having http/https specified:
src="//static.ctctcdn.com/js/archive-static/current/archive-static.min.js"></script>
I believe this is done so that it takes on the protocol of the site it's being hosted on in order to avoid mixed content or CORS errors if it's an HTTP site vs an HTTPS site. Testing it locally from a file causes it to look for the script to be stored locally on my computer as well. If you could host the file somewhere for testing, that might bring more success, but we can worry about that only if you still continue to have issues.
Hope it works!
Hello @BarryT77 ,
Are you using a website builder that allows for outside scripting? Is the builder you're using one of the common ones listed in this article with instructions? Are you adding any additional CSS styling or other coding to it, beyond the bare bones we provide?
This is a Wordpress site. The page is using the Elementor page builder, and I put the code you provided in an html widget. When that did not work, I tried it on a non-Elementor page, pasting in the code in text mode. Nether one did anything. I also tried changing the theme to one of the default themes, and installing the jQuery Migrater helper plugin, neither of which changed the result.
Hello @BarryT77,
For information about how to resolve this, you will have to give WordPress a phone call. I do apologize for any inconvenience. Thank you!
That was not at all helpful.
To see if the issue was related to Wordpress, I created an html file containing the following code:
<html>
<head>
</head>
<body>
<!--Begin CTCT Archive-->
<script id="archiveScript" src="//static.ctctcdn.com/js/archive-static/current/archive-static.min.js"></script> <div id="archiveList" data-archive-count="10" data-m="a07e2nio5i40"></div>
<!--End CTCT Archive-->
</body>
</html>
When I visited it, no archive was displayed.
Suggestions?
Hello @BarryT77,
If you use WordPress.org, please see the steps below:
For help adding the code to your Wordpress.org website, please contact your webmaster or view Wordpress.org's support.
Wordpress.com is not the same as Wordpress.org. Wordpress.com doesn't support 3rd party Javascript or plugins of any kind. If you're using Wordpress.com, you can create your own email archive by copying the permanent URLs for your sent emails and using them to create text links in your wordpress.com webpage.
For help adding text links to your Wordpress.com website, please contact your webmaster or view Wordpress.com's support.
You did not read my last reply. When I originally said the widget was not working on our WordPress site, and I was told to "contact Wordpress.org", I tested further by creating an html file with nothing in it other than your widget. When I viewed that file on its own, outside of WordPress, the newsletter archive did not display and there were no javascript errors in the console. So the issue is not with WordPress, but with your code.
Barry
Hello @BarryT77,
Are you currently using the code displayed here? If so, that code is correct and you should be able to follow the steps to copy and paste it. Please check if you are using Wordpress.com as they don't accept outside code so that may be why it is not working. Thanks!
You still don't get it. I copied the widget code from the newsletter archive code in my client's account, and put it in an html file WITH NOTHING ELSE IN IT. When I viewed that page the archive did not display.
I included the entire source code for that test page in my reply above. The client's site is what you're calling Wordpress.org, but your code does not work even when I am trying it outside of the site.
Barry
Hello @BarryT77,
Can you please email social_support(at)constantcontact(dot)com the username that is having this experience along with your web address, your question, and all the steps you have completed so we can do additional research? Thanks!
Our higher level technical team is having no issues pulling up your archive, and Wordpress.org should allow for outside scripting. However, there are a number of elements in a .org site that can result in 3rd party apps and scripting to be interfered with or outright blocked. Ultimately, they're suggesting reaching out to Wordpress.org's support for further troubleshooting as there's nothing wrong with the code, nor anything occurring on our end that'd be preventing the archive from displaying or loading.
As I have said multiple times, I have put the archive code in an html file with nothing else in it, and the archive does not display. I pasted the source code for that above, and am including it again here.
<html>
<head>
</head>
<body>
<h1> Constant Contact Archive </h1>
<!--Begin CTCT Archive-->
<script id="archiveScript" src="//static.ctctcdn.com/js/archive-static/current/archive-static.min.js"></script> <div id="archiveList" data-archive-count="10" data-m="a07e2nio5i40"></div>
<!--End CTCT Archive-->
</body>
</html>
So regardless of what is going on in the WordPress site, the widget does not display outside of WordPress.
Also, for your information, there is no such thing as support from WordPress.org. Support for WordPress related things come from theme and plugin developers, of which I am one. And I would reach out to those if there was a problem with their code, but in this case the only thing not working is the widget code that I got from you in my client's account, that is not working when I follow the instructions on your support page.
Barry
Again, the Tier 2 team confirms that the scripting works. However, Wordpress.org can have issues with Javascript, and this is something I'll be alerting our Knowledge Base team to so they can make sure our articles are updated accordingly.
Tier 2 is referencing this article on WP, regarding adding javascript to the site to (potentially) allow the archive to work. Beyond that, there's no other insight we're able to provide in regards to making the archive widget work on your client's site.
If your client ends up needing a workaround for making their emails accessible on their website, they can grab emails' individual share URLs, and add those to their website (or have you do it) as desired.
Again, I showed you source code for a standalone html file that I tried to run, and it DOES NOT WORK. So why are you replying in terms of WordPress?
If your Tier 2 team got this to work, it would be more helpful to tell me how they did that.
Barry
Hi @BarryT77 , my apologies lots of confusion here it seems. I'd like to try and help if I can.
Thanks for the code example, I was doing some testing to make sure all is well. I don't think there are any archived emails associated with the account the code snippet is from. In which case, showing nothing would be totally expected. It's worth noting that the code snippet doesn't automatically pull the most recently sent newsletters, but as an account owner you have control over which newsletters to show in your embedded archive using the action menu. This article shows the process of archiving and un-archiving a newsletters from within an account with screenshots and instructions. Can we start by archiving a few desired emails and testing the Wordpress site again?
That's not to say there might not still be some issues to troubleshoot after archiving a few emails, so I'll also mention that if you're testing the code in a standalone HTML file I think you may still run into some issues. This is due to the location of the Javascript file in the snippet not having http/https specified:
src="//static.ctctcdn.com/js/archive-static/current/archive-static.min.js"></script>
I believe this is done so that it takes on the protocol of the site it's being hosted on in order to avoid mixed content or CORS errors if it's an HTTP site vs an HTTPS site. Testing it locally from a file causes it to look for the script to be stored locally on my computer as well. If you could host the file somewhere for testing, that might bring more success, but we can worry about that only if you still continue to have issues.
Hope it works!
Thanks for that. You are right, there were no newsletters archived in the account.
I archived one of them, and it showed up in my standalone file after several minutes (not right away). I was running under https so things displayed even with the javascript file being called remotely.
And it showed up on my WordPress page also. Now I have to play with the appearance of the archive.
Appreciate the help!
Featured Article
Using Sections while designing your marketing email not only increases your own efficiency but helps you to deliver a more friendly, organized message. Check out some of the key benefits of using sections in email.
See ArticleFeatured Thread
If you listen to music while you work, share your playlist below so we can be inspired and maybe find some new music!
View threadFeatured Thread
Share a success story from the last year and be entered for a chance to win great prizes!
Enter now!We’re here to help you grow. With how-to tutorials, courses, getting-started guides, videos and step-by-step instructions to start and succeed with Constant Contact.
Start Here