2

i need help at redirecting the user to the login page if he wants to access a restricted page.

At first i will explain how the tree root looks like. There are multiple domains for that Typo3 instance. Every domain got its own part in the tree with its own typoscript. There is one template domain that has a template for all other domains and also some content for all other domains.

Root (0)
+- Template-Domain (3)
    +- Pagetree-Group-A (13, access restricted, standard)
        +- Content-A-1 (103, standard)
        +- Content-A-2 (113, standard)
    +- Pagetree-Group-B (23, access restricted, standard)
        +- Content-B-1 (163, standard)
        +- Content-B-2 (173, standard)
    +- Other-Pages (33, standard)
+- Domain-A (523)
    +- Pagetree-Group-A (533, access restricted, standard)
        +- Content-A-1 (583, standard)
        +- Content-A-2 (593, standard)
    +- Pagetree-Group-B (543, access restricted, mountpoint->23)
    +- Other-Pages (553, standard) |
+- Domain-B (1643)
    +- Pagetree-Group-A (1653, access restricted, standard)
        +- Content-A-1 (1693, standard)
        +- Content-A-2 (1703, standard)
    +- Pagetree-Group-B (1663, access restricted, mountpoint->23)
    +- Other-Pages (1673, standard)
+- Domain-C (3693)
    +- Pagetree-Group-A (3703, access restricted, standard)
        +- Content-A-1 (3753, standard)
        +- Content-A-2 (3763, standard)
    +- Pagetree-Group-B (3713, access restricted, mountpoint->23)
    +- Other-Pages (3723, standard)

When a not logged in user now wants to access Content-A-X from Domain-X, he gets the content (login-form) from the Domain-X page due to Typo3's behavior.

But if he wants to access a Content-B-X page from Domain-X, Typo3 throws the error

=======================

Oops, an error occured!

The requested page didn't have a proper connection to the tree-root! <br /><br />(MP value remain!)

=======================

I want to redirect the user to the Domain-X Page with the login-form. But using config.additionalHeaders = Location: /... doesn't change anything. I think its because the error is thrown before the TypoScript is executed.

Is there a possibility to not get an error on this behavior?

Mumpitz
  • 51
  • 5
  • Do you have by chance some shortcut in your structure? I know we have an open change request in that area: https://review.typo3.org/#/c/10100/ – pgampe Oct 16 '13 at 22:12
  • No, shortcuts arent used. Only standard pages. Dont know if it matters, there is realurl 1.12.3 used. And another thing i missed to tell, is the Typo3 Version. Its 4.5.25. – Mumpitz Oct 17 '13 at 07:23
  • Does this work without realurl? If so, then you need to fix your realurl config. – pgampe Oct 18 '13 at 13:52
  • No, without realurl, the problem still exists plus additional problems that pages produce the same error, even if logged in. In my given example it would be the pages 543, 1663 and 3713. – Mumpitz Oct 21 '13 at 08:44
  • Can you highlight what you want from where. Please give a more congrete example because I am currently lost of what you are trying to archive. – pgampe Oct 21 '13 at 11:52

1 Answers1

1

I dont know exactly what you are trying to do but I often have problem sharing content over root points in TYPO3.

These settings are essential for typolinks and content sharing across domains..

Do you have these settings in your config?

# Links & content sharing across domains
config.typolinkEnableLinksAcrossDomains            = 1
config.typolinkCheckRootline                       = 1
config.content_from_pid_allowOutsideDomain         = 1
config.MP_mapRootPoints                            = 1, 2, 3 [your root points]
Chris
  • 429
  • 3
  • 14