Theorema egregium violated in dimension $n \ge 4$? Gauß showed that for surfaces in $\mathbb{R}^3$ the Gaussian curvature ( = sectional curvature) is invariant under local isometries. This is known as the thema egregium.
Now in another question (click me) I defined i.e. $3$ types of spaces:
1.) Locally symmetric spaces. They were Riemannian manifolds with the property that $\nabla R=0$ everywhere.
2.) Symmetric spaces. They were path-conn. Riemannian manifolds such that there is for each $p \in M$ a global isometry $f_p: M \rightarrow M$ such that $f(\gamma(t)) = f(\gamma(-t))$ for all geodesics $\gamma: (-\varepsilon,\varepsilon) \rightarrow M$ satisfying $\gamma(0)=p$ and $Df_p(p) = -id.$
3.) Homogenous spaces. They were spaces admitting for every $p,q\in M$ a global isometry $\phi_{p,q}: M \rightarrow M$ such that $\phi(p)=q$
and as it turned out, although all of them have some kind of isometries, they don't have to have constant curvature at all ( as I was told in the answer I got or rather in the comments below the answer in the previously linked thread.) Now, I want to understand whether this means that the Theorema egregium is wrong in dimension $n \ge 4$ or whether I am missing something here?
I mean especially the condition we have for homogenous spaces looks like something that should preserve sectional curvature, but it does apparently not.
Homogenous spaces admit global isometries between any two points. Why doesn't this mean that the curvature tensor is the same for these two points and is therefore constant on the homogenous space?
If anything is unclear, please let me know.
 A: The sectional curvature of a Riemannian manifold $(M, g)$ of real dimension $n > 2$ is not a scalar function on $M$, but a scalar function $K$ on the Grassmannian bundle of $2$-planes in the tangent bundle. To say $(M, g)$ "has constant curvature" means $K$ is a constant function, i.e., the sectional curvature is the same for all $2$-planes (at all points).
A homogeneous Riemannian manifold has "the same curvature at every point" in the sense that if $p$ and $q$ are arbitrary points, there is an isometry $\phi$ of $(M, g)$ with $\phi(p) = q$; consequently, the sectional curvature functions of $M$ at $p$ and at $q$ are "the same" (i.e., correspond after an orthogonal isomorphism $\phi_{*}:T_{p}M \to T_{q}M$).
However, this is not enough to imply the sectional curvature is constant: If $p$ is a point of $M$, the stabilizer of $p$ in the isometry group of $(M, g)$ may fail to act transitively on the set of $2$-planes in $T_{p}M$.
For a simple example, let $(M, g)$ be a Riemannian product of unit $2$-spheres, which is obviously homogeneous. The sectional curvature of a $2$-plane tangent to either factor is unity. The sectional curvature of a $2$-plane spanned by a vector tangent to the first factor and a vector tangent to the second factor is zero. (The product $S^{2} \times S^{2}$ contains a lot of flat tori, a two-parameter family's worth through each point.)
