Links in developer portal return 404

Not applicable

Hi!

I am using the new developer portal and I'm trying to add simple mailto links and anchor links, however the links only takes me to a 404 page.

In Chromes console I can see that I am getting a JS error thrown from the jquery library.

This seems like a bug, so maybe putting it up as a question is wrong? Anyhow, please let me know if I'm the one doing it wrong (which i really doubt, since it's not a tricky thing I am attempting)...

BR,

Mike

0 14 476
14 REPLIES 14

Where and how are you adding the links, and what is the rendered HTML you get as a result?

This is how I add it on the page:

[Mailto link](mailto:test@test.com)
[Anchor link](#anchor)
<a href="#anchor-html">Anchor html</a>
<a href="mailto:test@test.com">Mailto html</a>

6309-capture.png

This is the rendered result:

6310-capture2.png

The rendered html:

<p><a href="mailto:test@test.com">Mailto link</a></p>
<p><a href="#anchor">Anchor link</a></p>
<p><a href="#anchor-html">Anchor html</a></p>
<p><a href="mailto:test@test.com">Mailto html</a></p>

All of this looks fine, but when I click a link, I'm guessing it gets hijacked by the JS which tries to interpret it as an internal link...

Leads me to this (404 page):

6311-capture3.png

With the following error in the console (i've edited out the hostname and org-name for privacy reasons):

jquery-3.1.0.min.js:4 GET https://{hostname}/portals/api/sites/{org-name}/render?pageId=mailto%3Atest%40test.com&draft= 404 (Not Found)

garysole
Participant II

See this page - indicates some of the security/spam issues with mailto and why you may need to setup the SMTP server in settings. https://community.apigee.com/articles/3591/developer-portal-not-sending-email.html

Thanks, but this is not relevant to my question since it is about a drupal based developer portal and I am using the edge portal. The problem has nothing to do with sending emails or SMTP, the problem has to do with links (other than internal links to pre-defined pages) not working. This is due to apigee treating every link as a route in the SPA instead of actually treating them as links.

jaywanttopno
Participant III

@michaelstrombergrazmgah

seems like you are adding some extra character to your URL.

Do Hover on anchor tag and check whether URL is with/without extra character.


You must be passing

<p><a href="mailto%3Atest%40test.com">Mailto link</a></p>

instead of

<p><a href="mailto:test@test.com">Mailto link</a></p>

Failed to load resource: the server responded with a status of 404 (Not Found)

Still facing the issue then, try to add anchor tag of external URL in the node body. and check what is causing Error?

This is not true. The value that I am passing in the href-attribute is totally valid, it doesn't need to be escaped.

This link for example, does not work:

<p><a href="www.google.com">Google</a></p>

However, adding the protocol in front of the url makes the link work:

<p><a href="https://www.google.com">Google</a></p

Also, as you can see in my question, I have checked what is causing the error. It is that apigee has decided to hijack every anchor-tag and attempt to render them asynchronously. Which is obviously not going to work with a mailto-link.

Do Hover on anchor tag and check whether URL is with/without extra character.

writing a tag like below

<p><a href="www.google.com">Google</a></p>

Drupal take it as internal link. thats why it thorws 404

It is not Drupal though, I am not using the drupal-based portal. I am using apigee's new edge portal.

This is the result when I hover the link you sent (escaped) (looks incorrect since the domain is in the actual link):
6453-1.png

This is the result when I hover the link I have (unescaped) (looks correct):

6454-2.png

faijahmad
Participant V

It looks like support link is rendered as a new page which doesn't exit. This should not be working for anyone till now. APIGEE support team can only confirm this. Please tag if you know anyone.

6456-mailto-support.jpg

Right! That's what I suspected as well, hopefully they will see this as I don't have access to add any support tickets.