You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After enabling the SMS Notifications feature I wanted to set Twilio as the default provider. For that, first, I needed to enable it on the same form where the default provider is needed to be set. However, I can't save it without selecting any provider. It can be worked around if there an option selected until I save the form and Twilio is enabled, then select Twilio, however, if there's nothing in there (e.g., in production), then there is no way to save the form. Locally, the "Log" is an option, but in prod, there's nothing in the list.
Orchard Core version
2.0.2
To Reproduce
Enable "SMS Notifications"
Go to Configuration > Settings > SMS
Notice that Twilio is no in the Default Provider list, and nothing is selected.
Go to Twilio tab.
Enable Twilio and fill the form.
Click Save.
See validation error that Default Provider is not selected.
Expected behavior
Maybe the Default Provider shouldn't be a mandatory field? Or some JS code that adds Twilio to the list right after checking the Enable Twilio checkbox?
Workaround
If there is at least one other item in the Default Provider list, then select that. After enabling Twilio, replace it with that.
If there is no other, then create a temporary one from code like this, and do the same as above:
public class DummySmsProvider : ISmsProvider
{
private readonly IStringLocalizer<DummySmsProvider> T;
public LocalizedString Name => T["Dummy SMS Provider"];
public DummySmsProvider(IStringLocalizer<DummySmsProvider> localizer) => T = localizer;
public Task<SmsResult> SendAsync(SmsMessage message) => throw new System.NotImplementedException();
}
services.AddSmsProvider<DummySmsProvider>(nameof(DummySmsProvider));
The text was updated successfully, but these errors were encountered:
Describe the bug
After enabling the SMS Notifications feature I wanted to set Twilio as the default provider. For that, first, I needed to enable it on the same form where the default provider is needed to be set. However, I can't save it without selecting any provider. It can be worked around if there an option selected until I save the form and Twilio is enabled, then select Twilio, however, if there's nothing in there (e.g., in production), then there is no way to save the form. Locally, the "Log" is an option, but in prod, there's nothing in the list.
Orchard Core version
2.0.2
To Reproduce
Expected behavior
Maybe the Default Provider shouldn't be a mandatory field? Or some JS code that adds Twilio to the list right after checking the Enable Twilio checkbox?
Workaround
The text was updated successfully, but these errors were encountered: