Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Posting Comment - System.Net.Mail.MailAddressParser.TryReadCfwsAndThrowIfIncomplete() call #635

Open
mklump opened this issue Jun 26, 2022 · 7 comments
Assignees
Labels

Comments

@mklump
Copy link

mklump commented Jun 26, 2022

I recently updated /blog to version 3.2.931, and set environmentVariable ASPNETCORE_ENVIRONMENT to Development so that this error can be seen reproducing 100% at https://blog.klump-pdx.com/post/comments on any post.
The error is FormatException: The specified string is not in the form required for an e-mail address. This happen all the time no matter what config I use in web.config, deleting and reinstalling, or erasing all site settings to default.
The steps that reproduced the error are:

  1. navigate to https://blog.klump-pdx.com/
  2. Activate any post in the comment area.
  3. Attempt to post a comment using any name, email address, and test comment.
  4. Activate the RE-captcha check box.
  5. Submit/save comment and observe screen out error dump.
    I attached the log file with my test several futile attempts to trace the problem.
    logs-20220626.0.txt
    I can't help but wonder - Did I misconfigure a setting?
    Is there another server-side setting that I missed during the upgrade I am grossly negligent over?
    I apologize if this is a repeat issue or already resolved - Do you know what I can do to fix this?
@poppastring poppastring self-assigned this Jun 26, 2022
@poppastring
Copy link
Owner

@mklump Thanks for finding the issue and providing detailed steps, I will start looking into this right away. Cheers!

@poppastring
Copy link
Owner

poppastring commented Jun 27, 2022

@mklump There are several issues that I have to resolve :(

  1. "post/comments" is broken when I do a GET (it supposed to be a POST only).
  2. I seemed to have broken the Median theme you use (ugh).
  3. The actual problem is related to email alerts we can send when a comment is left. I am thinking the email format is incorrect for the either

I have fixed the first two relatively minor issues, however, the 3rd issue requires a bit more time to flush out the details. In the meantime I believe disabling the Send Notification in the "admin/settings" section should bring some temporary relief.

image

Is it your intent to send an email notification at this point? Have you setup the email mail notifications correctly? If not this is the permanent fix.

@mklump
Copy link
Author

mklump commented Jun 27, 2022

Thank you for steps!
The comment-email error is somewhat gone with disabling that Send comment notification box, but not we have more strangeness...
The 'add comment' button and comment fields now seems to work, but only after changing themes from the admin page, or erasing the /Themes folder and copying the default themes files .cshtml, .css, and .js files, and also wwwroot and all the other source file folders were also overwritten with the latest version.
Strangely also the /admin view page is showing additional weirdness with not properly reading/rendering back the data last saved to config/site.config, and I also tried making changes to the admin user to not notify on comment posts/replies that did not save to the siteSecurity.config file?!
Lastly, some additional weirdness is login as admin user, click on admin site, then click on manage comments at the top show all presently added comments - When I attempt to approve or delete a comment from this page I get a prompt asking to confirm which is done and nothing happens to public view new comment or erase respectively - just nothing happens.
I an attaching my last site.Development.config and latest log file for your review!
I guess something still could be done to try to fix?
site.Development.config.txt
logs-20220627.0.txt

@poppastring
Copy link
Owner

poppastring commented Jun 28, 2022

@mklump It does not sound like all your files are getting updated during your installs, are you stopping your site first?

A quick primer on how the config files work. There are 4 config files (site.config, siteSecurity.config, meta.config, IISUrlRewrite.config)

Think of these as owned by dasblog, they should only be updated by a dasblog installation. The config files you own should be of this format site.Production.config (for your 'production' environments). When you save changes they should always go to these custom files. Environments tend to be Production by default but this can be set to Development or QA or whatever, just like the file you shared with me. A few config updates require site restarts because the data is read only during startup.

If you want to start over (reset your site) the files and folders to keep are as follows (assuming you are configured to "Development" environment:

  • /config/site.Development.config
  • /config/siteSecurity.Development.config
  • /config/meta.Development.config
  • /config/IISUrlRewrite.Development.config
  • /Themes/mycustomthemefolder/.
  • /content/.

Log back in and complete a Save from the admin site should update everything correctly.
Just to be super clear, the content folder is everything you own and have created, please do not lose this :)

Aside: I have published some fixes to the Theme you use, and a couple of other stability fixes I think will help you.

@mklump
Copy link
Author

mklump commented Jun 30, 2022

THANK YOU! Thank you! For clearing the corruptions steps!
Things with the comment appearance and admin rendering are doing much better after the last reset, but...
The old notifications bug looks like it still remains on I guess the median theme, or other themes as much more testing is greatly needed beyond just simply resetting so far...
logs-20220630.0.txt
The attached log file at about a quarter the way down is still saying the old "System.FormatException: The specified string is not in the form required for an e-mail address" if you so much as attempt the last/same sighted as before notification check box under admin settings for sending an email notification message, etc.
To keep things in the working state, that is still turned off until such time a fix presents itself.

@poppastring
Copy link
Owner

@mklump Excellent, glad that helped.

Apparently I have do not enough in place to stop that error if you send a test email from the Admin page (SendTestEmail is what gave the exception). I will leave this bug open to get that fixed next.

@mklump
Copy link
Author

mklump commented Jul 1, 2022

Thank you so much @poppastring !
I hear that.
Here is the resultant log file and screenshot output for that error put expected problem for now,,,
Screenshot 2022-06-30 203838
logs-20220630.0.txt
I hope this helps...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants