It's never stated that it's a newly-constructed ship. It's a new ship to Scotty and the gang, and the faulty construction work it's been having could be the result of the ship's trashing by the Whale Probe.
So, in a period of a few days (literally), they dragged the
Yorktown back, rebuilt all of her internal assemblies, put in a new engine (explicit), decommissioned or reassigned the entire crew (or cleaned up the bodies), re-allocated the ship as the Enterprise, AND were able to get Kirk on it despite not knowing if he would be exonerated at trial?
OR
Once Kirk was exonerated, they took a new ship and simply rechristened her the Enterprise rather than the Tai-Ho?
Sorry, but the Enterprise-A having been an uprated Yorktown
does not make sense, and was nothing more than Roddenberry once again inserting himself into a production that he had nothing to do with otherwise. It was an 'homage' to himself and 'Star Trek Is...' and shouldn't be regarded as anything more than that.
Once the probe stopped doing what it was doing, plenty of power systems came back online all over the place. No reason to believe that things were any different with the Yorktown, so refurbishing was probably very straightforward.
Also, Starfleet seemed to be quite enamored with the new Excelsior class and was determined to phase out the older ships, so it's entirely possible that Yorktown was already scheduled for decommissioning in the near future, or possibly was already in the process but with the emergency, was pulled out of spacedock and sent out to meet the probe. So it's well within the realm of possibility that we're talking about a ship that was already on the decommission list and was given a few extra years of service life as the Enterprise-A.
Makes a helluva lot more sense than Starfleet deciding to decommission a relatively new ship (less than ten years old) right on the heels of Khitomer.
And remember, anything from TFF in between campfire scenes is just the product of Kirk and McCoy trying to tell Spock a ghost story, with the help of several helpings of McCoy's "secret ingredient" and therefore easily discountable.
On the Yorktown thing, I've seen nothing to indicate a contradiction between "A" being a rechristened Yorktown, and it being a brand-new ship, fresh out of the shipyard, and indeed, my understanding was that both were true, with the Yorktown simply being the next Constitution-class vessel in line for launching.
The USS Yorktown (NCC-1717) is explicitly one of the ships hit by the whale probe in the movie. Moreover, the NCC-1717 can be
very briefly seen on the tail end of one of the ships during the Enterprise-A reveal.
Um, no. An unidentified Constitution refit is partially seen, the registry is never visible.
As for GR and RA forgetting about the Yorktown being referred to in TVH, I don't see that as a problem, since it establishes that the Yorktown was nearby and available. So, while she's in the repair dock, another item gets added to the to-do list: "Change name and registry to U.S.S. ENTERPRISE, NCC-1701-A".
But it doesn't have to be the same ship. IIRC, we never get an external view of the ship crippled by the Probe, just see its captain describing how they plan to survive the (temporary) loss of power - and it could be, say, a new Excelsior-class
Yorktown that was in the path of the Probe, with its old Constitution-class
Yorktown predecessor being refitted back in drydock, just like the
Enterprise had been prior to TMP.
(Pardon me for going slightly overboard with the multiquotes here, but I wanted to bring these specific posts together for this discussion)
In regards to go through all of the refitting of Yorktown (assuming the E-A is the old Yorktown) while not knowing if Kirk, et al would be exonerated at trial, my thoughts are that they had determined his innocence well in advance (folks, never underestimate the power of extenuating circumstances, especially in the face of outstanding success...) and were waiting for the E-A to be readied for departure so that in a big public-relations glitz they could "exonerate" Kirk and hand him the keys.
On a slightly-related note, in "Mr. Scott's Guide", reference was made to the new ship originally being called the USS Ti-Ho. "Ti-Ho" isn't any name I'm familiar with in regard to historical ships, so I believe what Shane Johnson was in all likelihood referring to was the WW2 Japanese carrier Taiho and someone just flubbed on the spelling.
(...unless one of you writers retcons it into being named after, say, the glorious victory of the nascent Federation over the Romulans at the 2159 Battle of Ti-Ho or something, during which there were many Romulan ships destroyed and much beer drank, etc....)
That's an interesting theory about the Yorktown in TVH being a new Excelsior-class. However, there were only a few months between TSFS and TVH, during which it's difficult to envision Starfleet building any more Excelsior-class ships until they've had some time to iron out the bugs in the prototype...remember, it did go tits-up in TSFS, and though Scotty confessed to taking some computer chips out of it, the fact that he was able to do so and the ship's computer still determined it was transwarp-ready might give the Excelsior designers pause. IIRC from the TNG Tech Manual, the USS Galaxy predates the Yamato and Enterprise by a few years, during which extensive shakedowns would occur to insure that building additional Galaxy-class ships wouldn't be a dry hole. Despite BBS discussions about money in the 23rd century and how quickly ships can be built, I wouldn't think Starfleet would sink resources into building additional Excelsiors until they've had time to shakedown and evaluate (and improve) the original Excelsior.
And though a revamped Yorktown would be new to Scotty, he's still one of Starfleet's most experienced engineers. If he's having difficulties with it in TVH, then rational explanations range from (1) it's the old Yorktown and the systems were so profoundly affected by the Probe that gremlins still existed in the system well after the fact and needed to be tracked down to (2) it's a brand-new ship a la the Ti-Ho description and there's enough new stuff in there that he's not quite up to speed with that it throws him off a little as described in his log entries.
As far as the Yorktown name itself goes, I am thinking that the original Yorktown (NCC-1717) might have been destroyed or decommissioned prior to the events of TVH, whether it went through the refit process or not, and that the name Yorktown was slated to be given to the brand-spanking-new Constitution-refit coming off the assembly line. As the Excelsior-class was not fully tested as of yet, it stands to reason that additional Con-refits would be constructed at least until such time as the Excelsior proved itself to be a good and valid design (which, by TNG times, we knew it did), especially if there were still Constitution-refit parts laying about and already paid for. As big as Starfleet appears to be on naming their big ships after historical warships of the 20th century, I don't really see them taking the Yorktown name away from a commissioned, long-serving (40+ years, if indeed it is a refitted 1717) ship-of-the-line, merely to supplant it with Enterprise-A...especially when an Excelsior-class Enterprise-B is just a few years down the road, probably already in the planning stages.
I offer you two competing theories...the Yorktown as seen briefly in TVH is either (1) the old 1717 refitted and still serving even after TVH, with some other ship (Taiho) being renamed Enterprise-A but not the Yorktown herself or (2) the new Con-refit renamed Enterprise-A was indeed the "Yorktown" and was constructed as such with the intention of joining the fleet as Yorktown, was launched prematurely in the face of the Probe approaching Earth, where it was damaged, towed back to SpaceDock and given a name change...since it was not actually commissioned as Yorktown, merely built under that name, the name could be given to another ship and the Enterprise-A decals slapped down.