lagdonkey
Forum Replies Created
-
Hmmm you mention bootstrap. Can I ask what theme you’re using?
Good catch. I notice that in our wp-admin log there are tonnes of errors like this:
[22-Jan-2017 14:50:39 UTC] PHP Warning: Error while sending QUERY packet. PID=32902 in /**removed for my safety**/public_html/wp-includes/wp-db.php on line 1877
Which I traced through my own debugging to basically mean there’s an invalid where clause in a query.
I think that script must be causing this issue. I will report back my findings.
I as well am having this issue. I realize it’s because NGG is stuffing up ajax calls but I cannot figure out why. Can you please post what your solution was?
I love the totally generic form response, so convincing.
Please, explain to me how deploying PHP code on to someones server that parses un-validated/un-sanitized form data is even remotely secure?
Please, tell me how putting code that phones back home to YOUR server, downloads a package that your server tells it to, unpacks and deploys on to someone else’s server is event remotely safe?
Please, elaborate on what sort of security measures, beyond a simple “token”, are taken to ensure your code cant be compromised?
This is absolutely reprehensible behavior!
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Broken DependenciesAnother update. So I had thought my issue was resolved, but it turns out that wasn’t the case. However, I FINALLY managed to trace the issue to this:
if ( version_compare( $acf->settings['version'], '5.2.6', '<' ) ){ wp_register_script( 'acf-validated-field-group', plugins_url( "js/field-group{$min}.js", __FILE__ ), array( 'jquery', 'acf-field-group' ), ACF_VF_VERSION ); }As soon as I removed that, ACF client-side validation resumed working as it should, and input masking still works.
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Broken DependenciesGreat, I’ll drop you a pm and mark this as resolved.
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Broken DependenciesACF5 does have client side (JS, via ajax) validation, for required fields etc. Usually it throws an error and wont submit. But in this case, its posting and I’m seeing php validation errors instead. I’m wondering if it, in fact is, how I’m registering acf. I’m doing it correctly, but due to Plugins loading in alphabetical order through WP, I’m wondering if that’s what causing it (My plugin is Aideed Events Manager) which would load AFTER your plugin.
I’ll play around and see what I can come up with. Thanks so much for taking the time to work on this. While we’re talking, I was wondering if you’d have a problem with me utilizing your code in my plugin. I likely will be maintaining a free copy here, as well as releasing a premium version down the road. Of course if you’re okay with that, I’d give proper attribution to you as the author 🙂
Quick update, removing those 2 lines fixed the validation issues, and now the fields save. Still the issue where I have to save before the validated field will populate, but that’s a trivial issue to me anyways 🙂
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Broken Dependencieswp_enqueue_script( array( 'jquery', 'jquery-ui-core', 'jquery-ui-tabs', 'jquery-masking', 'acf-validated-field', 'acf-validated-field-input', ));Starting on 1133. What script should ‘acf-validated-field’ be?
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Broken DependenciesWell as I said, within the field builder (custom fields), adding the field, I have to save and load before the actual validated field select populates. I see the broken dependency message when I’m in the post editor, editing the post that has the field in it.
My guess is, it’s a missing JS file causing both issues, but damned if I can figure out why. The rest of acf itself works fine (short of the validation client side, but my guess is that somethings trying to make a call to the missing file, which is tripping a JS error which is causing the client side validation to fail).
As far as I can tell, I have all ACF files loaded properly, so I don’t think it’s anything to do with ACF itself.
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Broken DependenciesSent too soon. As for webserver, just a generic apache server, running php 5.4.
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Broken DependenciesWow, thanks for the fast response. I’m using ACF 5.0, and 1.7.7 of your plugin. I’m using the latest build of Chrome. Nothing in php error logs pertaining to this. The 2 JS files I see it’s loading from your code are
field-group.min.js and jquery-maskedinput.min.js. It wont actually load your plugins input.js file, unless I remove the dependency parameter within your code (validated_field_v5.php)wp_register_script( 'acf-validated-field-input', plugins_url( "js/input{$min}.js", __FILE__ ), array( 'acf-validated-field' ), ACF_VF_VERSION, true );on line 1145
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Broken DependenciesOn further inspection, it seems like when your code is active, it’s removing all of acf’s client side form validation. With your code active, it stops at the php validation instead. I also briefly see a Script error in console, but it goes so fast I don’t get a chance to see it.
Well, I manged to make some headway. I wrapped your binding/listening events in a function called init, and can now call the event on the fly.
However, because the plugins wrapped in an anonymous function, there’s no way to call it externally. At this point, I think the course of action I’m going to take, at least for myself, is to add another listener that will fire the init function when my content is reloaded via the ajax call.
I can post the modified code on pastebin if you want.
Okay, so I got it working the way I wanted. Here’s the modded code here. http://pastebin.com/GC8KNgmh
As I said above, I wrapped your binding functions in a wrapper. I also added an initial call within the dom-ready wrapper, to set things up the first time. I also added my own listener, which re-fires the init. After that, I can easily fire it externally, by calling $( “.editor_wrapper” ).change(); which triggers the on-change function.
Hit send too soon. While I added the listener to my own element, you could set it up to target one of acf’s elements.
However, the other issue, where the button text isn’t changing still persists.