ogdsgn
Forum Replies Created
-
Forum: Plugins
In reply to: [Members - Membership & User Role Editor Plugin] Role PriorityHey @stephunique,
For me the issue was I had set some restrictions using the adminimize plugin which disables editing of specific menu items for certain roles, rather than the actual role overriding another.
Forum: Plugins
In reply to: [Members - Membership & User Role Editor Plugin] Role Priorityas you were
Forum: Plugins
In reply to: [Members - Membership & User Role Editor Plugin] Role Prioritynv. I just realized the issue I was having was a conflict in capabilities using another plugin adminimize.
Hey @glenwpcoder, thanks for including the fix for multiple forms.
And nicely handled it much classier by getting the actual target from the event rather than my newbie code of looping through them all.
cheers!
So I was able to put together a fix by looping through each form.
// Fires when an Ajax form submission has completed successfully, and mail has been sent. document.querySelectorAll('form.wpcf7-form').forEach(function(form) { form.addEventListener('wpcf7mailsent', function(event) { // Get input type file element var inputFile = form.querySelectorAll('.wpcf7-drag-n-drop-file'); var status = form.querySelectorAll('.dnd-upload-status'); var counter = form.querySelector('.dnd-upload-counter span'); var error = form.querySelectorAll('span.has-error-msg'); // Reset upload list for multiple fields if (inputFile.length > 0) { inputFile.forEach(function(input) { localStorage.setItem(input.getAttribute('data-name') + '_count_files', 1); // Reset file counts }); } else { // Reset file counts localStorage.setItem(inputFile[0].getAttribute('data-name') + '_count_files', 1); } // Remove status / progress bar if (status) { status.forEach(function(statEl) { statEl.remove(); }); } if (counter) { counter.textContent = '0'; } if (error) { error.forEach(function(errEl) { errEl.remove(); }); } }, false); });So the problem arises with this.
It just gets the first form.var form = inputFile[0].form;Ahh, I think I figured it out. The issue is from having multiple forms in the DOM. I have them built into overlays that open into full-screen windows.
So I don’t seem to have any errors appearing.
Here’s the page I’m using it on.
https://w.thesurfsocial.com/tellyourstory/cheers!
I’m so sorry, I broke my first rule of debugging. Rule#1. Never assume the problem is with the plugin.
Yes, of course, I’ll review my code and see if I can find something that’s interfering with that code. I take it it’s a part of the .js ?Forum: Plugins
In reply to: [Contact Form 7] Schema files showing up in my activity list.Actually got this sorted today….
It’s possible it was just a combination of plugins I have running. I have a REST Api Log Plugin that creates new posts for each entry, and those were getting queried in ‘Recent Published Posts’. I was able to simply filter them out and I’m good to go.Forum: Plugins
In reply to: [Contact Form 7] After update CF7 adds /schema to all forms (indexable)Hey all,
Any resolution here?
I’m also seeing these schema items show up in my recent activity of published pages which is not helpful.Here’s a snag right after uploading the image. You can see the compat-item data is missing

And then if I click off the image and re-select it magically appears.

- This reply was modified 3 years ago by ogdsgn.
Forum: Plugins
In reply to: [CMB2] Media Modal issue when opened using type file_listFor anyone interested… I’ve pinpointed the issue down to here.
This is the render function for the Attachment details in the media-view.js
For some reason the compat.item is not available at this point when I upload a new file through this media uploader.render: function() { console.log('Rendering AttachmentCompat view'); // Debug statement var compat = this.model.get('compat'); if (!compat || !compat.item) { console.log('No compat or compat.item found'); // Debug statement return; } this.views.detach(); this.$el.html(compat.item); this.views.render(); console.log(compat.item); // Debug statement return this; },Forum: Plugins
In reply to: [CMB2] Media Modal issue when opened using type file_listTime to dive into WP source code. media.php here we go……
Forum: Plugins
In reply to: [CMB2] Media Modal issue when opened using type file_listHey Michael,
Doh, I just realized I’m not actually placing CMB2 fields in that media modal. I just happened to place the code for it in my CMB2 meta boxes file, but after taking a closer look I’m actually using the native $form_fields and the add_filter(‘attachment_fields_to_edit’). Sorry for thinking it might be CMB2.Thanks for your time.
– Stephen