Fix page type detection
Merge branch 'sonata/master'