diff --git a/core/server/services/routing/controllers/static.js b/core/server/services/routing/controllers/static.js index fad03dd412e5..76404417dc49 100644 --- a/core/server/services/routing/controllers/static.js +++ b/core/server/services/routing/controllers/static.js @@ -7,6 +7,16 @@ function processQuery(query, locals) { const api = require('../../../api')[locals.apiVersion]; query = _.cloneDeep(query); + // CASE: If you define a single data key for a static route (e.g. data: page.team), this static route will represent + // the target resource. That means this static route has to behave the same way than the original resource url. + // e.g. the meta data package needs access to the full resource including relations. + // We override the `include` property for now, because the full data set is required anyway. + if (_.get(query, 'resource') === 'posts') { + _.extend(query.options, { + include: 'author,authors,tags' + }); + } + // Return a promise for the api query return (api[query.alias] || api[query.resource])[query.type](query.options); }