diff --git a/app/client/src/sagas/InitSagas.ts b/app/client/src/sagas/InitSagas.ts index bd8b028855..5316ba4a70 100644 --- a/app/client/src/sagas/InitSagas.ts +++ b/app/client/src/sagas/InitSagas.ts @@ -454,6 +454,32 @@ export function* initializeAppViewerSaga( //Delay page load actions till all actions are retrieved. yield put(fetchPublishedPageSuccess([executePageLoadActions()])); + if (toLoadPageId) { + yield put(fetchPublishedPage(toLoadPageId, true)); + + const resultOfFetchPage: { + success: boolean; + failure: boolean; + } = yield race({ + success: take(ReduxActionTypes.FETCH_PUBLISHED_PAGE_SUCCESS), + failure: take(ReduxActionErrorTypes.FETCH_PUBLISHED_PAGE_ERROR), + }); + + if (resultOfFetchPage.failure) { + yield put({ + type: ReduxActionTypes.SAFE_CRASH_APPSMITH_REQUEST, + payload: { + code: get( + resultOfFetchPage, + "failure.payload.error.code", + ERROR_CODES.SERVER_ERROR, + ), + }, + }); + return; + } + } + yield put(fetchCommentThreadsInit()); yield put({ diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/migrations/DatabaseChangelog2.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/migrations/DatabaseChangelog2.java index fc58dbba6b..2701e81db8 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/migrations/DatabaseChangelog2.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/migrations/DatabaseChangelog2.java @@ -41,6 +41,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; +import java.util.HashSet; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors;