Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "bug",
"message": "Use error page in preview",
"issue_origin": "github",
"issue_number": null,
"domain": "builder",
"bullet_points": [],
"created_at": "2026-02-25"
}
32 changes: 19 additions & 13 deletions web-frontend/modules/builder/components/PublicSiteErrorPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<div class="placeholder__logo">
<nuxt-link
:to="{
name: 'application-builder-page',
params: { pathMatch: '/' },
name: routeName,
params: { pathMatch: '' },
}"
custom
>
Expand Down Expand Up @@ -52,22 +52,28 @@ export default {
content() {
return this.error.content || this.$t('errorLayout.error')
},
routeName() {
return this.$route.name
},
},
methods: {
onHome() {
if (
this.$route.name === 'application-builder-page' &&
this.$route.params.pathMatch === '/'
['application-builder-page', 'application-builder-preview'].includes(
this.routeName
)
) {
// Reload the current page
this.$router.go(0)
} else {
// Navigate to the home route
this.$router.push({
name: 'application-builder-page',
params: { pathMatch: '/' },
query: null, // Remove query parameters
})
if (this.$route.params.pathMatch === '/') {
// Reload the current page
this.$router.go(0)
} else {
// Navigate to the home route
this.$router.push({
name: this.routeName,
params: { pathMatch: '' },
query: null, // Remove query parameters
})
}
}
},
},
Expand Down
3 changes: 2 additions & 1 deletion web-frontend/modules/builder/errorPageTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export class PublicSiteErrorPageType extends ErrorPageType {

isApplicable() {
return (
this.app.$router.currentRoute.value.name === 'application-builder-page'
this.app.$router.currentRoute.value.name === 'application-builder-page' ||
this.app.$router.currentRoute.value.name === 'application-builder-preview'
)
}

Expand Down
Loading