Um, let me guess you've never seen fermentation before? And by "slow conisistnat fermentation" you meant your airlicok was bubbling, right?
What that "dough" is is krausen, your yeast trying to fement your beer. But without checking that that fermentation was complete by seeing that your gravity was stable over 3 days, you interrupted the fermentation process.
Then when you moved it to secondary (waaaaaayyyyy too soon, if necessary at all, most of us don't use them anymore and opt for month long primaries instead) you yeast, still trying to ferment your beer, re-krausened. Which overflowed the airlock, because a 5 gallon secondary is really not meant to be used to FERMENT beer, and can't hold 5 gallons of beer PLUS the krausen.
It happens all the time. Most new posts on here are exactly about this.
There is nothing wrong except you moved you beer way to soon, now clean up your mess, and leave the beer alone,
for at least 2 more weeks.
ANd don't do anything else like bottle then until you've taken 2 grav readings over three days and they stay the same.
Airlock are NEVER a good gauge of fermentation, they are vents to bleed off excess co2, but sometimes they don't even blip, or they blip long after fermentation is done...You really need to use your hydromter.
The worst thing you can ever do, is to go by a calendar or airlock to gauge when fermentation is done.
Where fermentation is concerned, If you arbitrarily move your beer, like to follow the silly 1-2-3 rule (or instructions that say move after a week or when bubbles slow down), you will often interrupt fermentation. Because sometimes the yeast won't even begin to ferment your beer until 72 hours after yeast pitch, so if you rush the beer off the yeast on day 7 then you are only allowing the yeast a few days to work. The problem is that yeast don't know how to read so they seldom follow the instructions. They dance to their own tune and its seldom 4 x 4 Time.
This often leads to stuck fermentation because you have removed the beer from the very stuff you need to ferment your beer. The yeast....It can often lead to the same off flavors one gets if they undrpitch their yeast.
Besides, fermenting the beer is just a part of what the yeast do. If you leave the beer alone, they will go back and clean up the byproducts of fermentation that often lead to off flavors. That's why many brewers skip secondary and leave our beers alone in primary for a month. It leaves plenty of time for the yeast to ferment, clean up after themselves and then fall out, leving our beers crystal clear, with a tight yeast cake.
What happened was more than likely your yeast didn't start for a few days so when you racked it you did at the height of fermentation.
That's why you need to take a gravity reading to know how your fermentation is going, NOT go by airlocks, or size of krausen, or a calendar, the horoscope or the phases of the moon (those things in my mind are equally accurate).
The most important tool you can use is a hydrometer. It's the only way you will truly know when your beer is ready...airlock bubbles and other things are faulty.
The only way to truly know what is going on in your fermenter is with
your hydrometer. Like I said here in my blog, which I encourage you to read,
Think evaluation before action you sure as HELL wouldn't want a doctor to start cutting on you unless he used the proper diagnostic instuments like x-rays first, right? You wouldn't want him to just take a look in your eyes briefly and say "I'm cutting into your chest first thing in the morning." You would want them to use the right
diagnostic tools before the slice and dice, right? You'd cry malpractice, I would hope, if they didn't say they were sending you for an MRI and other things before going in....
Thinking about "doing anything" like repitching, or bottling, or racking, without first taking a hydrometer reading is tantamount to the doctor deciding to cut you open without running any diagnostic tests....Taking one look at you and saying, "Yeah I'm going in." You would really want the doctor to use all means to properly diagnose what's going on?
You'll learn that this is a game of patience.....So just relax and let this beer finish.
By the way, here's what fermenting beer looks like...But that is in a 6.5 gallon fermenter, just like what is happening in your bucket and you couldn't see it.
Dough is good.
Just don't be afraid of fermentation, it is often ugly AND stinky, and perfectly normal!