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

Unclear Documentation regarding Preview of Hidden Pages #684

Open
apus-0 opened this issue Dec 6, 2023 · 5 comments
Open

Unclear Documentation regarding Preview of Hidden Pages #684

apus-0 opened this issue Dec 6, 2023 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@apus-0
Copy link

apus-0 commented Dec 6, 2023

Following sentence can be found in the documentation:
"If your frontend application passes all cookies from backend correctly you should be able to preview content associated with the root domain."

In my case the backend user cookie is available in the frontend, but i got an 404. This makes sense cause i don't know how to pass the cookie information back to TYPO3 to get the data of the hidden page. I mean the fronted has to send the cookie data to the backend when fetching data? Or am I wrong?

@twoldanski
Copy link
Collaborator

Hi @apus-0, what domain setup do you have? You have something like api.your-site.tld (TYPO3) and your-site.tld (FE) or something different?

@apus-0
Copy link
Author

apus-0 commented Dec 13, 2023

first I tried api.your-site.tld (TYPO3) and frontend.your-site.tld (FE) and after your response I also tried api.your-site.tld (TYPO3) and your-site.tld (FE). both appoached didn't work for me. in both cases cookie was set in frontend by TYPO3 when previewing the page, but the in the end i got a 404 page

@twoldanski
Copy link
Collaborator

if your main domain is matching and you have setup TYPO3 is api.your-site.tld and fe app is your-site.tld just setup backend cookie (which allows you see hidden pages) to domain .your-site.tld and it should work :)

@lukaszuznanski
Copy link
Collaborator

@apus-0 could you send some screenshots of your cookie setup? This would help I believe. We have tested this in several projects, so we can provide some assistance for you.

@lukaszuznanski lukaszuznanski added the documentation Improvements or additions to documentation label Jan 3, 2024
@apus-0
Copy link
Author

apus-0 commented Jan 4, 2024

Thanks a lot for your replies and for your help.

I set up the cookie domain in the ext_localconf.php of my sitepackage to
$GLOBALS['TYPO3_CONF_VARS']['BE']['cookieDomain'] = getenv('HKC_COOKIE_DOMAIN');

which is
HKC_COOKIE_DOMAIN=.hkc-de.local

and when opening the backend, following cookie is set:
image

and by opening the fronted app, following cookie is set:
image

What came into my mind is that i am currently running the site on my local machine, in a docker environment and the domains are no "real" domains. they are only network aliases of docker. Maybe this causes the disfunctionality? At the moment i dont have a test system with "real" domains. But I am working on it. Maybe this solves the problem?

Please let me know, if i should provide further information regarding the set up.

Tank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants