Invalid Extensions after an Upgrade
Explanation
After upgrading the .war package, the log can report as invalid extensions that were valid before the upgrade:
WARN ltInstalledExtensionRepository - Invalid extension [org.xwiki.platform:xwiki-platform-distribution-flavor-mainwiki/10.11.1] on namespace [wiki:xwiki] (InvalidExtensionException: Dependency [org.xwiki.platform:xwiki-platform-oldcore-[10.11.1]] is incompatible with the core extension [org.xwiki.platform:xwiki-platform-legacy-oldcore])An installed extension records the versions of the extensions it depends on. Replacing the distribution replaces the core extensions the wiki runs on, so an extension installed against the previous distribution can no longer be satisfied: its dependency is pinned to the version that is gone. An extension that was renamed or removed in the new version becomes invalid for the same reason.
These messages are warnings, not failures: the wiki starts and its content is intact. The extension is simply not usable until a version matching the new distribution is installed, which is what the flavor upgrade does, the Distribution Wizard offers the valid versions and removes the ones that became invalid.
The message therefore does not need acting on by itself. It is worth reading, though: the extensions it names are the ones the flavor upgrade has to fix, so any that are still reported after the upgrade point at an extension the Distribution Wizard could not resolve.