When typing in wrong username/password, the message is displayed informing the user that username/password combo was wrong. The loading spinner does not disapear.
I have tracked down the cause. When updating all the Abp nuget packages to 3.2.4, the following file was updated:
abp.sweet-alert.js.
Old code:
return $.Deferred(function ($dfd) {
sweetAlert(opts, function () {
$dfd.resolve();
});
});
New Code:
return $.Deferred(function ($dfd) {
sweetAlert(opts).then(function () {
$dfd.resolve();
});
});
The problem is that sweetAlert() does not return a promise.
Reverting the code back to the old code from pre 3.2.4 solves the problem, but I think that simply updating all the nuget packages should not result in this happening.
4 Answer(s)
-
0
ABP v3.2.0 had a few Breaking Changes:
#2145 Upgrade to sweetalert v2.x. Existing applications should upgrade sweetalert packages to v2.x.
- You can check that sweetAlert() does return a Promise on <a class="postlink" href="http://demo.aspnetzero.com">http://demo.aspnetzero.com</a>.
- If you are on Asp.Net Zero v5.0.0 - v5.0.4, it may be caused by outdated references to SweetAlert v1.1.3. You can upgrade to SweetAlert v2.0.8 using yarn.
-
0
This is an MVC project, and there is no package.json for yarn to act on.
But I agree that I need to upgrade to latest sweetalert.
The folder looks like this currently:
So I need to update this entire folder to latest. Where do I get these? For instance, I pulled latest using yarn, but the node_modules\sweetalert folder does not contain all these files so that I can replace them. the .scss, html, css, and ie9.css files are missing in the node.js version of sweetalert.
The sweetalert nuget package was not used in the MVC project either, and the latest nuget package is on an old version anyways.
I tried replacing the js files with the ones from the npn repository, but that does not work at all.
It looks like someone handcrafted the sweetalert folder in the libs folder for the MVC project, but I might be wrong.
So I guess my question is how do I go about updating sweetalert to latest in the MVC project?
-
0
I solved this by downloading a latest copy of the whole project from the website with the latest version, and merging the changes into my existing project.
-
0
Thanks for letting us know!