CMS Development

NVandrepol
Colaborador(a)

My URL link won't work in the custom URL field

resolver

So, we made a custom module where you have the option to fill in several options like a text with a CTA, a title,...

 

One problem: the URL field which should enable us to put a link to a microsoft form behind our CTA, doesn't work for some reason. Every time we click on the CTA, we get a notification with an error code. 

Does anyone know what can be the problem?

Screenshot Foutmelding link.jpgScreenshot HubSpot support.jpg

0 Avaliação positiva
1 Solução aceita
NVandrepol
Solução
Colaborador(a)

My URL link won't work in the custom URL field

resolver

Fixed, it was an incorrent field choice. 

Exibir solução no post original

4 Respostas 4
aidanxyz
Membro

My URL link won't work in the custom URL field

resolver

Make sure you use: 

module.link_field.url.href

for the 'href' attribute of the <a> element in the html file of your module.

Even better just use the snippet generated by the field. See https://designers.hubspot.com/blog/url-and-link-fields-now-available-in-custom-modules for more info.

0 Avaliação positiva
NVandrepol
Solução
Colaborador(a)

My URL link won't work in the custom URL field

resolver

Fixed, it was an incorrent field choice. 

Kevin-C
Especialista reconhecido(a) | Parceiro
Especialista reconhecido(a) | Parceiro

My URL link won't work in the custom URL field

resolver

Thanks @dennisedson 

 

Hey @NVandrepol ,

 

So a 400 error is a "bad request" error, meaning something was probably submitted to the server incorrectly.

According to www.exai.com/blog/400-bad-request-error:

"What Is the Cause of a 400 Error?

There are several causes why a 400 Bad Request error might appear.The majority of them are due to an issue on the client-side of things.

The cause of a 400 error can be a wrongly written URL or a URL that contains unrecognizable characters.

If the URL is correct, then another cause of the error might be an invalid or expired cookie. For example, you can be presented with a 400 Bad Request error when you attempt to log into a site as admin but the cookie that's handling your authentication data is corrupted.

There's also the possibility of the server coming back with a 400 error if you try to upload a file that's too large. If the server is programmed with a file size limit, then you might encounter a 400 error.

In rare cases, the reason why you see a 400 error might be due to specific problems with the server."

 

 

So this leads me to question if the URL works when manually pasted into the browser?

And if it does, try going to the link in a private browser to simulate expired,  corrupt, or absent cookies.

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

My URL link won't work in the custom URL field

resolver

@NVandrepol 

Could you post your code so we can look?  Maybe a link to a page with it on it?

@Kevin-C 👋 mind lending a hand?

0 Avaliação positiva