New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsley.remote loading problem #985
Comments
Are you loading just |
Only parsley.remote, this script seem include parsley |
Which version are you using? |
2.1.3, I tried the both solutions (import only parsley.remote or parsley and parlsley.remote) same result |
Ah ah! That API is only for 2.2... Please check that out 😄 |
Is not the master version the 2.1.3 version? I installed it via bower, how I can use the stable version? |
Well, 2.2 is still as a release candidate. Not too sure how to load it via bower, sorry. |
Actually, I was wrong, |
I can't figure out why you'd get that with 2.1.3. I made a fiddle with that version and the |
The fiddle doesn't use |
http://jsfiddle.net/zfmph5w6/1/ As you can see in console the problem is with |
This problem occur only with the minified version, the not minified works fine. |
Hi, I've installed parsley 2.1.3 via npm for browserify. I use I don't use the minified version and it still throws this error. But when I look at the code in parsley.remote.js, it seems pretty normal. Line 267 tries to access Fix: I updated my npm dependency to https://github.com/guillaumepotier/Parsley.js.git#2.1.3 and it worked. The NOTE: With browserify, you must use Edit: Actually it doesn't work... I have no error and the validator is created but the async validator is never triggered. Here's my code: window.ParsleyExtend.addAsyncValidator('login', function (xhr) {
console.log(this.$element); // this is never called, and no network request is fired
return 404 === xhr.status;
},
'myURL/{value}'
); I added |
I can confirm this. I have several sites that use Parsley (thank you!) with RequireJS. Using the same code, if I use the If I substitute in the I swapped out the entire RequireJS stack to just load the script via script tags, and everything works fine. So this is something with this version of Parsley and RequireJS. Something is amiss with this version of Parsley and RequireJS. |
I tried substituting in the latest 2.2.0-rc2 version of Parsley, but it exhibits the same problem. Unfortunately, Parsley appears to be broken with RequireJS. Unlike other posters in this thread, I'm not getting any errors. Parsley just doesn't work, whether initialized via JS or via Again, loading Parsley via a plain old I should note that I'm not using the remote version of Parsley. |
Sorry about this. We're very close of merging the |
Thanks for the response. I look forward to it, I'll check regularly for the merge. In the meantime, my forms go on unvalidated :) Thanks for all that you do. |
FWIW, I tried the |
What issues exactly with the |
@marcandre I may not have done it exactly right; I just replaced the The issues I had were very similar to what I was having with the release branch: When loaded with RequireJS, sometimes, ParsleyJS would not work for underdetermined reasons. The symptoms are the Parsley won't validate blocks, and won't validate on form submission (it'll just hang). In the same environment, if I load it via a I can give you a live staging URL to take a look at if it'll be helpful. Should I be doing anything other than grabbing |
@marcandre Let me know if there is anything I can do to assist you in tracking down this issue. |
A live link would help for sure. The Do you have an estimate at how often you get a problem? |
@marcandre I updated to 2.2.0rc4 and it seems to be working! Here is a live URL for you: |
Cool. So I'm closing this, but if anybody runs into issues with the current version, let me know! |
I just installed it yesterday and have the issue as described at the top of @SebT's post trying to work with Parsley Remote. |
@jessemorton Please upgrade to 2.2.0rc4 |
Thanks for the speedy reply, @marcandre Maybe the NPM module just needs updating on your end? I installed via npm yesterday, but it looks like its v2.1.2. Doing |
Hi,
I upgraded to the last version and I use parsley.remote instead parsley but when I load the script through requirejs I have an error
Uncaught TypeError: Cannot read property 'on'
caused by this code at line 2065 in parsley.remote.js
window.Parsley.on('form:submit', function () { this._remoteCache = {}; });
Any idea?
The text was updated successfully, but these errors were encountered: