Help

URL from attached documents not opening correctly

Solved
Jump to Solution
4673 13
cancel
Showing results for 
Search instead for 
Did you mean: 
Jon_Eynon
6 - Interface Innovator
6 - Interface Innovator

USING API TO CREATE WP SITE.
Hi all. So I have rows of data and a column in the row is Attachments. It is just as it sounds, an uploaded document.

My code to generate the URL into content on the page is:
f=String(record.get(“Application Name”));
l=record.get(“Attachments”);
container+="<a href=’"+l[0][‘url’]+"’ target=’_blank’>"+f+"";

The resulting URL is below:
Aviation Workers Comp Instructions
When this URL appears out on the page and I click on it, I get an error that says
http://dnserrorassist.att.net/search/?q=http%3A//ar.ecologik.netnull/&r=http%3A//ar.ecologik.net/app...
NOW, if I right mouse click on any of the links and have it open in a new window the docs load just fine. I notice that there is a null being thrown in the error message. Where is that coming from? I am at a lost on this one!

13 Replies 13

Thanks for pasting that image - it appears your code pulling from Airtable; the fields from the attachment collection are fine, and the HTML generated is fine as is the URL to the document.

That leaves us with only one more place to focus attention - your DNS.

Notice the error in this earlier posting - it references a DNS error server suggesting that the server hosting this page may not actually be able to resolve the Airtable URL for that document. Or… requests to https://ar.ecologik.net/ are somehow being redirected or refused in some circumstances. And quite possibly hinting at your original concern…

But, without a lot more diving and access to all the machinery and a way to work within your network, it’s difficult to say what is causing clicks to fail and clicks into a new tab to succeed.

One thing is clear though - your integration and HTML code appears to be just fine.

I have since put the test server in an https environment and the results are the same.

Why does AirTable put the dot in the middle of domain? Do you think that might have something to do with it? It can’t resolve the domain because it interprets that dot as the end?

Jon_Eynon
6 - Interface Innovator
6 - Interface Innovator

The issue was in some local javascript that was causing a null to get applied at the end of the url. It was carry over code from another page. Links were just fine and AirTable acting as it should. Thanks for helping troubleshoot. Case closed