From 690aa9808c75cdd05a99a8c96accd0b2f13d5187 Mon Sep 17 00:00:00 2001 From: Shigugu Date: Thu, 19 Dec 2024 12:11:39 +0100 Subject: [PATCH] fix: wxr page import fix typos in wxr page import (postID used instead of pageID) add wording for translation key "pagesProgressInfo" --- app/back-end/modules/import/wxr-parser.js | 4 ++-- app/default-files/default-languages/en-gb/translations.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/back-end/modules/import/wxr-parser.js b/app/back-end/modules/import/wxr-parser.js index 4c18b32c..2700dbdc 100644 --- a/app/back-end/modules/import/wxr-parser.js +++ b/app/back-end/modules/import/wxr-parser.js @@ -549,7 +549,7 @@ class WxrParser { }, false); let newPageResult = newPage.save(); - let newPageID = newPageResult.postID; + let newPageID = newPageResult.pageID; this.temp.pages[pageSlug] = newPageID; this.temp.mapping.pages[pages[i]['wp:post_id']] = newPageID; @@ -581,7 +581,7 @@ class WxrParser { }); let featuredPageID = newPage.db.prepare('SELECT last_insert_rowid() AS id').get().id; - let featuredPageIdUpdate = newPage.db.prepare(`UPDATE posts SET featured_image_id = @featuredPostID WHERE id = @newPageID`); + let featuredPageIdUpdate = newPage.db.prepare(`UPDATE posts SET featured_image_id = @featuredPageID WHERE id = @newPageID`); featuredPageIdUpdate.run({ featuredPageID, diff --git a/app/default-files/default-languages/en-gb/translations.json b/app/default-files/default-languages/en-gb/translations.json index dc0a8e35..252a5c87 100644 --- a/app/default-files/default-languages/en-gb/translations.json +++ b/app/default-files/default-languages/en-gb/translations.json @@ -86,6 +86,7 @@ "imageDownloadError": "An error occurred during downloading of the image: {image}", "imagesProgressInfo": "Downloading images ({progress} / {total})", "postsProgressInfo": "Importing posts ({progress} / {total})", + "pagesProgressInfo": "Importing pages ({progress} / {total})", "tagsProgressInfo": "Importing tags ({progress} / {total})" } },