I'm trying to post a question on Stack Overflow and I'm getting "an error occurred submitting the question." I suspect there's something in my code snippet. All my code is in code blocks, but I do have some SQL commands that could be causing a problem. As a matter of fact, I'm pretty sure that they are causing a problem, because when I try to type what the commands are in this question, I'm not able to post this question either. So how do I get around this?

As requested, I've tried to post a screenshot. I no longer have the original post and the error message, but I've got a screenshot showing the three commands, one of which was causing the error. But when I try to post the screenshot (a PNG file from my desktop), it tells me it can't reach imgur.

  • 3
    What are you trying to put in? Make the SQL invalid and try to input it again because without seeing what you are trying to input we have no idea. That being said, I really dont think the SQL is the problem. – Josh Mein Apr 12 '13 at 18:49
  • 2
    If you think SQL is interfering with the posting of a question, copy the SQL to Pastebin and attach the link to your question. – Aza Apr 12 '13 at 18:50
  • 3
    Could you show a screenshot of the commands? – Undo Apr 12 '13 at 18:54
  • Are you also getting "Your post appears to contain code that is not properly formatted as code"? – Pops Apr 12 '13 at 19:20
  • 2
    Related: meta.stackexchange.com/questions/171916/…. This was also reproduced yesterday with some SQL that included table altering code, but I was able to make the edits without issues. This does sound like a bug to me. – Adam Lear Apr 12 '13 at 20:04

Actually, I just figured it out. It was the SQL (I was creating a table, executing a query string, dropping a table). I'm not sure which of these was the problem, but I took them out of the code snippet and just described that part of the code. If it's too confusing for folks, I'll use Pastebin as Telthien suggested. Thanks!

  • 6
    It would probably still be useful if you posted a screenshot of the commands, in-case future users encounter this problem – Sam I am Apr 12 '13 at 18:59
  • 13
    Add this to your main question and retag it as bug; this is a code help site. There should be no code users can't post. – Aza Apr 12 '13 at 19:02

I'm retagging this to because over the last couple years we figured out the cause here - and it's not on our end.

Typically what happens is that there's a particularly zealous firewall or anti-virus that gets twitchy over certain SQL and blocks the post submission. The workaround is to either remove the "offending" code or post over HTTPS.

  • Just changing the HTTP to HTTPS in URL worked for me. – Vikrant Goel Sep 23 '16 at 22:14
  • If this is true, it should be marked as accepted. A moderator can do that? – David Balažic Jul 15 at 19:14
  • @DavidBalažic A moderator can't mark an answer as accepted, no. But, this whole thing is moot anyway now that we use HTTPS by default and HTTP is unsupported. – Adam Lear Jul 15 at 21:10

This happened to me today. After removing the SQL code from the question, it worked. The SQL code was:

Ehh, can not submit it here either. Put it on pastebin.

In both cases (new question and this edit*) it "spins" for like 10 seconds and then shows the error.

enter image description here

* I first added this to the question, but it was rejected

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .