How can I preview my pages before publishing them?

I tried adding the setting session_cookie_samesite manually, refresh permissions, log out, log in but it made no difference.

It seems adding a context setting session_enabled with value ‘0’ solves the problem. I can view unpublished resources from contexts with that setting.
See Introducing session_enabled

Sadly, this did not work for me. I tested installs that have multiple contexts each on separate (different) domains, and I added the session_enabled with value ‘0’ to the second (not “web”) context. Did not enable me to view unpublished resources on the second context, they still return a 404, and it added a parameter of ?preview=true to all resources in that second context.

Which context did you add the setting to?

Also I want to mention the warning from the article you linked – to NEVER set session_enabled to 0 (Off) in the MODX System Settings.

I have 5 contexts: EN, DE, NL and Web. (and manager) I set this setting on the three language contexts
The contexts are all on the same domain.

What exactly didn’t work?
Before I changed the session_cookie_samesite setting, I had to log into the manager through whatever domain I wanted to test in order to view the unpublished resources for that domain (and that context). Once I changed that setting, I can now view unpublished resources for all the domains in the one installation regardless of context.

Did you set it to “Lax”, with a capital “L”? You probably also need to clear the cookies for your domain in your browser.

Sorry I should have been more specific. I edited my comment to better explain.