diff --git a/ghost/admin/app/components/modals/email-preview.js b/ghost/admin/app/components/modals/email-preview.js index a84ae3d575..29c1e0d5fd 100644 --- a/ghost/admin/app/components/modals/email-preview.js +++ b/ghost/admin/app/components/modals/email-preview.js @@ -79,9 +79,10 @@ export default class EmailPreviewModal extends Component { } else if (this.args.data.email) { html = this.args.data.email.html; subject = this.args.data.email.subject; - // data is a post? try fetching email preview + // data is a post or has no html, try fetching email preview } else { - let url = this.ghostPaths.url.api('/email_previews/posts', this.args.data.id); + const id = this.args.data.post_id || this.args.data.id; + let url = this.ghostPaths.url.api('/email_previews/posts', id); let response = await this.ajax.request(url); let [emailPreview] = response.email_previews; html = emailPreview.html; diff --git a/ghost/admin/package.json b/ghost/admin/package.json index ad3b29f45d..c2f4078781 100644 --- a/ghost/admin/package.json +++ b/ghost/admin/package.json @@ -1,6 +1,6 @@ { "name": "ghost-admin", - "version": "5.33.2", + "version": "5.33.3", "description": "Ember.js admin client for Ghost", "author": "Ghost Foundation", "homepage": "http://ghost.org", diff --git a/ghost/core/core/server/services/email-service/wrapper.js b/ghost/core/core/server/services/email-service/wrapper.js index 4c0ae00de6..3070414d29 100644 --- a/ghost/core/core/server/services/email-service/wrapper.js +++ b/ghost/core/core/server/services/email-service/wrapper.js @@ -36,6 +36,7 @@ class EmailServiceWrapper { const audienceFeedback = require('../audience-feedback'); const storageUtils = require('../../adapters/storage/utils'); const emailAnalyticsJobs = require('../email-analytics/jobs'); + const {imageSize} = require('../../lib/image'); // capture errors from mailgun client and log them in sentry const errorHandler = (error) => { @@ -60,7 +61,7 @@ class EmailServiceWrapper { mobiledoc: mobiledocLib.mobiledocHtmlRenderer, lexical: lexicalLib.lexicalHtmlRenderer }, - imageSize: null, + imageSize, urlUtils, storageUtils, getPostUrl: this.getPostUrl, diff --git a/ghost/core/package.json b/ghost/core/package.json index 0dcd9e7662..0a6ef5f2ee 100644 --- a/ghost/core/package.json +++ b/ghost/core/package.json @@ -1,6 +1,6 @@ { "name": "ghost", - "version": "5.33.2", + "version": "5.33.3", "description": "The professional publishing platform", "author": "Ghost Foundation", "homepage": "https://ghost.org",