From 7608f8993f880f4f1c49bba3d144c3d713182253 Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 18 May 2026 13:17:36 +0300 Subject: [PATCH 1/4] 818 - Implement an XML sitemap #818 --- src/app/services/api.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/services/api.ts b/src/app/services/api.ts index 7787084566..1db8840333 100644 --- a/src/app/services/api.ts +++ b/src/app/services/api.ts @@ -293,7 +293,8 @@ export const api = { answer: ( id: string, answer: Immutable, - ): AxiosPromise => { + console.log("MMM_SUBMIT_ANSWER questionId=" + id); + ): AxiosPromise => { return endpoint.post(`/questions/${id}/answer`, answer); }, answeredQuestionsByDate: ( From 5c037b5bdb26bc0b1b07c3e2a72ea2b4492fddd3 Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 18 May 2026 13:59:36 +0300 Subject: [PATCH 2/4] Add console log for MMM_SUBMIT_ANSWER diagnostic logging Log questionId when submitting answers to help diagnose mobile Safari issues. Co-Authored-By: Claude Haiku 4.5 --- src/app/services/api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/services/api.ts b/src/app/services/api.ts index 1db8840333..d475ff5e5a 100644 --- a/src/app/services/api.ts +++ b/src/app/services/api.ts @@ -293,8 +293,8 @@ export const api = { answer: ( id: string, answer: Immutable, - console.log("MMM_SUBMIT_ANSWER questionId=" + id); - ): AxiosPromise => { + ): AxiosPromise => { + console.log("MMM_SUBMIT_ANSWER questionId=" + id); return endpoint.post(`/questions/${id}/answer`, answer); }, answeredQuestionsByDate: ( From 5de057ec01b33458cf0c68c3ce4cab4af928795d Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 18 May 2026 16:58:27 +0300 Subject: [PATCH 3/4] Fix: URL-encode question IDs containing special characters before sending to server --- src/app/services/api.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/services/api.ts b/src/app/services/api.ts index d475ff5e5a..7f834e2f95 100644 --- a/src/app/services/api.ts +++ b/src/app/services/api.ts @@ -283,7 +283,8 @@ export const api = { }, questions: { get: (id: string): AxiosPromise => { - return endpoint.get(`/pages/questions/${id}`); + // URL-encode the ID to handle special characters like pipe '|' in question IDs + return endpoint.get(`/pages/questions/${encodeURIComponent(id)}`); }, search: (query: QuestionSearchQuery): AxiosPromise => { return endpoint.get(`/pages/questions/`, { @@ -295,7 +296,10 @@ export const api = { answer: Immutable, ): AxiosPromise => { console.log("MMM_SUBMIT_ANSWER questionId=" + id); - return endpoint.post(`/questions/${id}/answer`, answer); + // URL-encode the ID to handle special characters like pipe '|' in question IDs + const encodedId = encodeURIComponent(id); + console.log("MMM_SUBMIT_ANSWER encodedId=" + encodedId); + return endpoint.post(`/questions/${encodedId}/answer`, answer); }, answeredQuestionsByDate: ( userId: number | string, From cc42cfd988a741c6ecdd7af82d4dee3c4f8768a6 Mon Sep 17 00:00:00 2001 From: Marius Date: Tue, 19 May 2026 12:36:15 +0300 Subject: [PATCH 4/4] Clean up: Remove debug console.log statements from answer submission --- src/app/services/api.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/services/api.ts b/src/app/services/api.ts index 7f834e2f95..22f84f30f7 100644 --- a/src/app/services/api.ts +++ b/src/app/services/api.ts @@ -295,10 +295,8 @@ export const api = { id: string, answer: Immutable, ): AxiosPromise => { - console.log("MMM_SUBMIT_ANSWER questionId=" + id); // URL-encode the ID to handle special characters like pipe '|' in question IDs const encodedId = encodeURIComponent(id); - console.log("MMM_SUBMIT_ANSWER encodedId=" + encodedId); return endpoint.post(`/questions/${encodedId}/answer`, answer); }, answeredQuestionsByDate: (