xperseguers / t3ext-ig_ldap_sso_auth

TYPO3 Extension ig_ldap_sso_auth. This extension provides LDAP and SSO support for TYPO3.
https://extensions.typo3.org/extension/ig_ldap_sso_auth
27 stars 70 forks source link

Associated site configurations - option description not existent #111

Closed hartundweich closed 4 years ago

hartundweich commented 4 years ago

Today we startet to experiment with LDAP integration. When creating the configuration the part where associated site configurations are listed does not show anything in the right box. When I take a look at the source code I see the followiing:

<option value="wienxtra_jahresbericht" title=""><div></div></option>

So my site configuration is read but not displayed because title is missing - please tell me what can I do to display the title or make the title visible?

xperseguers commented 4 years ago

don't know how to reproduce.

hartundweich commented 4 years ago

Screenshot_2020-09-22 wienXtra jahresbericht Development  TYPO3 CMS 9 5 21 take a look at the screenshot - you can see where I have marked the untitled entry in the list

hartundweich commented 4 years ago

maybe it is because my site is in german language? Typo3: 9.5.21

xperseguers commented 4 years ago

I tested on v10, but with your screenshot (and your comment), I now understand you are on v9. Still, I can't reproduce. Please share your domain configuration.

hartundweich commented 4 years ago

I still have two domain records - see the attached screenshot. But also having site configuration - see the other screenshots for site configuration

Screenshot_2020-09-23 wienXtra jahresbericht Development  TYPO3 CMS 9 5 21

Screenshot_2020-09-23 wienXtra jahresbericht Development  TYPO3 CMS 9 5 21 (1) Screenshot_2020-09-23 wienXtra jahresbericht Development  TYPO3 CMS 9 5 21 (2) Screenshot_2020-09-23 wienXtra jahresbericht Development  TYPO3 CMS 9 5 21 (3) Screenshot_2020-09-23 wienXtra jahresbericht Development  TYPO3 CMS 9 5 21

xperseguers commented 4 years ago

OK, I guess I see somehow the problem... this is related to your "Einstiegspunkt", I made my tests by providing a full URL like https://jahjresbericht.wienxtra.at/ instead of / otherwise TYPO3 is not able to generate full URL.

Any reason why you don't want to specify the domain anymore? Without that information, we will have to rely on the current host being used to access the Backend.

xperseguers commented 4 years ago

Please check this patch and report:

diff --git a/Classes/Tca/SiteConfigurationItemsProcFunc.php b/Classes/Tca/SiteConfigurationItemsProcFunc.php
index 89b8c32..5fe6a68 100644
--- a/Classes/Tca/SiteConfigurationItemsProcFunc.php
+++ b/Classes/Tca/SiteConfigurationItemsProcFunc.php
@@ -48,9 +48,13 @@ class SiteConfigurationItemsProcFunc

         $config['items'] = array_map(
             static function (Site $site) {
+                $host = $site->getBase()->getHost();
+                if (empty($host)) {
+                    $host = GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY');
+                }
                 return [
                     // displayed value
-                    $site->getBase()->getHost(),
+                    $host,
                     // stored value
                     $site->getIdentifier()
                 ];
hartundweich commented 4 years ago

OK, I guess I see somehow the problem... this is related to your "Einstiegspunkt", I made my tests by providing a full URL like https://jahjresbericht.wienxtra.at/ instead of / otherwise TYPO3 is not able to generate full URL.

Any reason why you don't want to specify the domain anymore? Without that information, we will have to rely on the current host being used to access the Backend.

Specifying the host did the job - now everything is visible. I do not have the time ressources to check your patch at the moment. Maybe someone else can check the patch?

xperseguers commented 4 years ago

it's fixed in master branch, I'm sure the patch is fine :)