Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using TYPO3-404 handling #19

Closed
meincms opened this issue Mar 2, 2020 · 9 comments
Closed

Using TYPO3-404 handling #19

meincms opened this issue Mar 2, 2020 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@meincms
Copy link

meincms commented Mar 2, 2020

Is there any way to use the TYPO3 Error-Handling?

i.E. when configuring the 404-Error-Handling in TYPO3 and the site cannot be found, the website renders the 404-content, but sends an additional 404-Header. What's your recommendation to handle Errors? In fact it leads to the nuxtjs-typo3-error site – and doesn't render the intended content of the errorHandling-site of the TYPO3....

errorHandling:
  -
    errorCode: '404'
    errorHandler: Page
    errorContentSource: 't3://page?uid=30'
@mercs600
Copy link
Contributor

mercs600 commented Mar 2, 2020

Let me get this straight.. Do you want to display custom error page, not related with nuxt and vue, for example typo3 error page ? Or do you need display specific error content for specific status code on the nuxt page?

@meincms
Copy link
Author

meincms commented Mar 2, 2020

actually i intended to reuse the core implementation of typo3's error-handling.
return a custom error page, which is built within typo3 (same as the whole website) and just return the certain content. But it pretty much looks like typo3 returns the 404-header and breaks the application part of nuxt js....

do you have any suggestion?

@mercs600
Copy link
Contributor

mercs600 commented Mar 2, 2020

Are you talking about this functionality, right ?
SiteHandlingErrorHandling-1

I think we are able to display selected content on error pages. Of course it require some changes on our side, but this is core functionality and we want to support it.

@mercs600 mercs600 self-assigned this Mar 2, 2020
@mercs600 mercs600 added the enhancement New feature or request label Mar 2, 2020
@meincms
Copy link
Author

meincms commented Mar 3, 2020

Yes, exactly.

What happens if I finally end-up at the 404-page, nuxtjs doesn't interpret the page because of its header and throws an application error.

@mercs600
Copy link
Contributor

mercs600 commented Mar 3, 2020

If you want display nice error page instead of application error, just create error.vue page in layouts directory.
https://nuxtjs.org/guide/views#error-page

@mercs600
Copy link
Contributor

@meincms you can switch on develop branch to test selected content page on error pages.
Also you have to modify your error.vue -> https://github.com/TYPO3-Initiatives/nuxt-typo3/blob/develop/example/layouts/error.vue

This is development branch and might be changed.

@mercs600
Copy link
Contributor

mercs600 commented Jul 8, 2020

@meincms sorry for delay, we merged it to master

@mercs600 mercs600 closed this as completed Jul 8, 2020
@pfasang
Copy link

pfasang commented Dec 4, 2020

Hi @mercs600 , can you please add this solution to your documentation?
Thanks in advance!

@mercs600
Copy link
Contributor

@pfasang done: https://typo3-initiatives.github.io/nuxt-typo3/configuration/404-handling.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants