Appframework fix backports

Collection of backports from https://github.com/owncloud/core/pull/8178 https://github.com/owncloud/core/pull/8139 and https://github.com/owncloud/core/pull/8156 to make news and notes run on stable6

For reference https://github.com/owncloud/core/issues/8179

@DeepDiver1975 @LukasReschke @tanghus