sendgrid / wordpress

SendGrid plugin for WordPress
51 stars 64 forks source link

Settings continuous reload #40

Closed jaskipper closed 7 years ago

jaskipper commented 7 years ago

Thanks for the great service, and plugins. I did want to report an issue. The settings page for the plugin continually reloads when the API key isn't loaded. It just keeps giving an error, and reloading. You can stop the reload with the browser stop button. This is in Wordpress 4.7 in PHP 7 by the way.

sebastianplesciuc commented 7 years ago

@jaskipper This issue might be caused by using the plugin with PHP 7.

At this time this plugin does not officially support PHP 7. It is in our backlog though and we'll have this in a future version. We will test the issue you mention then.

sebastianplesciuc commented 7 years ago

@jaskipper This doesn't seem to be caused by PHP 7.0. Are you still experiencing this issue with the latest version of the plugin?

If you do, we might need more information in order to debug this.

PHP Version, Wordpress Version, list of installed plugins and themes would be very helpful.

tonystech commented 7 years ago

If anyone still needs help with this, this issue is caused by your browser auto-filling an unrelated username and/or password, and then it's submitting the form. To fix it, disable auto-fill in your browser's settings.

sebastianplesciuc commented 7 years ago

Thanks @tonystech

That is in fact the solution.

jaskipper commented 7 years ago

@sebastianplesciuc, sorry for not responding to the earlier comment, but yes the issue continued with the latest version. Disabling auto-fill does in fact fix it, although I question why it is submitting the form. Maybe I'm wrong, but I've not noticed autofill submitting any other forms.

sebastianplesciuc commented 7 years ago

@jaskipper This happens because when you enter your API key on the settings page, the form is automatically submitted when you click out of the field. This is because most other settings rely on the API key being set and a lot of users were confused as to why they couldn't change the other settings after entering the API key.

jaskipper commented 7 years ago

@sebastianplesciuc Makes sense. In my opinion, I would think that instead of automatically submitting (creating continuous issues with users who have autofill turned on), some sort of visual cue to submit would be best. It is not ideal for a user to have to change something in their browser in order to make it work correctly, in essence taking away features for other websites as well. Just my opinion. Thanks again for the service and the plugin.

sebastianplesciuc commented 7 years ago

@jaskipper Thank you for the feedback. We appreciate it. We'll take it into consideration.

thiskbj commented 6 years ago

+1 on this request. I tried to change my settings (Chrome) & that still didn't work, was finally able to update settings in a different browser (Safari).

Akamaozu commented 6 years ago

Still experiencing this problem.

I'm a programmer, so I'm used to working around weird behaviors, but this one is particularly hard to work around.

Going to try using a different browser instead.

Akamaozu commented 6 years ago

Thanks for the different browser tip, @katieben. Worked in a different browser.

DenJohX commented 6 years ago

This should be re-opened, having to disable the auto-fill feature makes no sense.

If the key is so important for the other fields it should be editable only once, and then optionally removed, but not act like crazy everytime the field gets changed. This is just bad programming.

Do sendgrid really don't care? this was first reported in 2016

jamesryan-dev commented 6 years ago

To this day still an issue.. auto complete submit in 2018 not really great ux tbh

Dowgirl commented 6 years ago

Still doing this - I cannot tell other people to muck around in their browser settings. This is a paid service it needs to work.

tomatillodesign commented 6 years ago

Agreed, there should be a fix for this that doesn't involve opening another browser...

DenJohX commented 6 years ago

lets all get sendgrid attention https://twitter.com/denjohx/status/1035284996536389633

opaweb commented 6 years ago

To partially solve this, please comment lines 105 to 124 of file: wp-content/plugins/sendgrid-email-delivery-simplified/view/js/sendgrid.settings-v1.7.3.js

BJW commented 6 years ago

A quick fix is to disable JS in your browser. Then resubmit the form. It's crazy that this doesn't work.

armandolas commented 6 years ago

How come such an issue is still affecting this plugin? Many people will abandon it after a couple of tries

ksjones commented 5 years ago

There is no need for the JS in the file, it's a simple form. Please just remove the JS that is causing this and post the updated plugin. It'll take longer to read this thread than it would to solve the issue at source!

hdavy2002 commented 5 years ago

Same issue. Disabling autofill does not help. I am using php7

startadesign commented 5 years ago

Same issue. Disabling autofill does not help. I am using php7 Works in Firefox, No problem.

Sort this out sendgrid - I've noticed this issue for over 6 months now!

Shocking support

andymagill commented 5 years ago

Happening to me on latest Chrome. Nearly 2 year old issue. I expected more from a paid service.

timbrandon commented 5 years ago

Yeah, trying to figure it out right now.... turning off auto-fill didn't work for me..

bekeeg commented 5 years ago

We manage over 30 WordPress sites using SendGrid and I have the login information saved in my browser. Every time I go to check whether the site's SendGrid is set up after a deploy, I have to remove the password from Chrome in order to RE-paste in the correct API Key because the page automatically refreshes when I arrive. This is not an acceptable workaround.

ksjones commented 5 years ago

@sebastianplesciuc

Thanks @tonystech

That is in fact the solution.

That is not a solution, why is the form auto-submitting... autofill is irrelevant, there are billions of web forms on the internet and when they autofill they don't auto-submit. Please reopen this as a major bug so that it can be fixed.

There is at least 3 javascript-based submits in the main js file that are fired on 'change' and on 'focusout'... Using: $("#sendgrid_form_mc").submit(); and $("#sendgrid_general_settings_form").submit();

This would be why disabling JavaScript in the browser prior to opening the settings area works best of us. Which isn't a solution! I haven't tried yet (because it's all nicely working with SendGrid at the moment, thanks!) but just commenting out these lines should fix it. Who needs auto-save settings anyway, the button click is not hard.

EDIT: Tested.... and that solves the issue, comment out all .submit() lines in wp-content/plugins/sendgrid-email-delivery-simplified/view/js/sendgrid.settings-v1.x.x.js and you can edit the settings without any problems.

adriandlg commented 5 years ago

This is still an issue. Extremely frustrating.

gerharddt commented 5 years ago

Any other plugins that works better anyone?

timbrandon commented 5 years ago

@gerharddt - truthfully nothing works as well as send grid in my experience for sending emails with WordPress, especially if you are using wpengine. I ended up getting it to work by downloading a new browser (firefox), I typically use chrome and filling in the api there since I had never inputed any thing in that field before. Or try to clear all history, cache, and try to find your auto fill settings and turn it off. That should get by the Sendgrid API issue.

wolffe commented 5 years ago

SendGrid is one of the best, indeed. You can fix it yourself, if you think it's broken, that's why the code is on GitHub.

Or, as an alternative solution, add the snippet in the theme, bypassing the need for a plugin.

jarrodagims commented 5 years ago

This is pretty ridiculous bug

alipj333 commented 5 years ago

@Sendgrid you are doing the development community a dis-service by not addressing this bug. Many of us rely on this [and your service] to send emails through WP. As an enterprise level software company AND thought leader, you should listen to user feedback and update the plugin.

It truly is poor code that could be resolved in a matter of hours (if not sooner). I understand why the previous developer chose to use AJAX for this scenario... but it's a pretty shitty approach. Anyone with basic coding knowledge would agree.

Don't make me spark a Twitter rant about something this small/ridiculous... :)

Just update the code, please!!

pixelpylon commented 5 years ago

@sendgrid Your WP plugin

hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

sendgrid-wp

Doesn't seems like it requires complete rewrite of plugin. Just fix it please, extremely annoying.

MogulChris commented 5 years ago

+1 please fix this plugin-breaking bug, it should not still be here after 2.5 years!

drawcard commented 4 years ago

Can confirm this issue is occurring, and is caused by the bug raised by @tonystech

As you can see here Chrome autofills the SendGrid API field with the user's password:

image

Because the page refreshes so quickly there is no opportunity to put in a replacement API key and hit Save Changes. Disabling autofill on the browser is not a useful workaround either as autofill works fine elsewhere.

There is however code that can be added to the field to tell the browser not to autofill the field:

https://www.w3schools.com/tags/att_input_autocomplete.asp

Thanks for looking into this.

ksjones commented 4 years ago

In Chrome, click the area immediately to the left of the address bar, go to site settings and block JavaScript. Close the settings page and a button will appear at the top of the WordPress admin stating that you need to reload the page/site. Click it. Once reloaded navigate to the sendgrid settings page and update as needed. Once done, repeat the process setting JavaScript to load as before but never visit the settings page with JavaScript enabled otherwise 'zap' your settings will be screwed up! It's shocking that this plugin hasn't been updated in so long and this issue still exists, but you can still work around it using the above method.

On Sun, Nov 24, 2019, 11:16 PM Drawcard notifications@github.com wrote:

Can confirm this issue is occurring, and is caused by the bug raised by @tonystech https://github.com/tonystech

As you can see here Chrome autofills the SendGrid API field with the user's password:

[image: image] https://user-images.githubusercontent.com/1435638/69503285-fb46f100-0f67-11ea-8929-d3213d2d10f8.png

Because the page refreshes so quickly there is no opportunity to put in a replacement API key and hit Save Changes. Disabling autofill on the browser is not a useful workaround either as autofill works fine elsewhere.

There is however code that can be added to the field to tell the browser not to autofill the field:

https://www.w3schools.com/tags/att_input_autocomplete.asp

Thanks for looking into this.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sendgrid/wordpress/issues/40?email_source=notifications&email_token=ABWMS4E7C55RBSFICHZIQWLQVMDM5A5CNFSM4CZRWYAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAXT2Y#issuecomment-557939179, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWMS4HXPHHCREKX6LGBJ5LQVMDM5ANCNFSM4CZRWYAA .

adamscreation commented 4 years ago

I am just choosing to comment the code that is responsible for this annoying behaviour until there is an official update.

File: sendgrid.settings-v1.7.3.js Lines: 119 to 124

// $("#sendgrid_general_apikey").focusout(function() { // var new_general_api_key = $("#sendgrid_general_apikey").val(); // if ( old_general_api_key != new_general_api_key ) { // $("#sendgrid_general_settings_form").submit(); // } // });

avanwart commented 4 years ago

@adamscreation - This solution worked for me, thanks so much for sharing.

erok415 commented 3 years ago

I too can confirm that this worked. https://github.com/sendgrid/wordpress/issues/40#issuecomment-384471210

jamesryan-dev commented 3 years ago

not really a solution tho.. I've been following this bug for a while now and it still astounds me that sendgrid haven't resolved this..

bekeeg commented 3 years ago

Any other plugins that works better anyone?

I've switched to WP Mail SMTP.