最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugin gravity forms - Wordpress - Gravityforms https: is not a valid url

programmeradmin1浏览0评论

I have a Wordpress based website that uses gravity forms. I have the gravity form loading in a jquery model window. My issue is the form seems to work except for after submission the form just stays on the screen and I see the below error in the console.

Uncaught DOMException: Failed to set the 'href' property on 'Location': 'http://' is not a valid URL.

I am not sure why this error would occur and how http:// not be a valid url

I have a Wordpress based website that uses gravity forms. I have the gravity form loading in a jquery model window. My issue is the form seems to work except for after submission the form just stays on the screen and I see the below error in the console.

Uncaught DOMException: Failed to set the 'href' property on 'Location': 'http://' is not a valid URL.

I am not sure why this error would occur and how http:// not be a valid url

Share Improve this question asked Jun 18, 2020 at 15:31 JayreisJayreis 101 1
  • http:// all by itself is not a valid URL. If GravityForms is trying to redirect (and I think it is; the Location: header is used for redirection) and the URL it's trying to redirect to is simply http:// and not, say, http://example/redirect-here, then yes, it would fail. Hopefully this helps; if not, you'll need to take this up with GravityForms' official support. – Pat J Commented Jun 18, 2020 at 16:14
Add a comment  | 

2 Answers 2

Reset to default 0

To answer your question, http:// is the protocol with which the thing requested is to be obtained. The stuff after the :// is the location at which the thing requested is located. In order to be a valid Uniform Resource Location, you need to provide the location at which the thing requested resides, not just the protocol used to obtain the thing.

So, if you want to use the HyperText Transfer Protocol to retrieve some hypertext (encodement in HyperT Markup Language) located at www.example/myfile.html, your URL must be http://www.example/myfile.html.

With that said, I would first check the URL that you are sending with your form (if any). If that doesn't work, you will have to trace the code (and your submission) to determine if a proper URL is being generated within the plugin to find the offending code or you are likely to continue getting that error. Or, you could try contacting Gravity Forms which is likely to be a better option because they are the ones who are responsible for writing the code.

Thank you all. So I had the gravity form confirmation set to text but had no content in the wysiwyg. When I added content it seemed to fix the issues. So it seems if in gravity forms you have text set as the confirmation but then don't put any text it tries to load a url by default.

发布评论

评论列表(0)

  1. 暂无评论