[BUGFIX] Remove edit link to not existing record 38/58138/2
authorAnja <aleichsenring@ab-softlab.de>
Mon, 3 Sep 2018 11:18:16 +0000 (13:18 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 3 Sep 2018 11:53:57 +0000 (13:53 +0200)
As long as there is no site configuration record to edit,
the title displayed into Sites Module should not carry a link.

Change-Id: I3c177d4ba889a224577ab53c4d2350e04d57049e
Resolves: #86105
Relates: #86069
Releases: master
Reviewed-on: https://review.typo3.org/58138
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/backend/Resources/Private/Templates/SiteConfiguration/Overview.html

index 1e2338c..6f3ec94 100644 (file)
                                                                                <a href="#" class="t3js-contextmenutrigger" data-table="pages" data-uid="{rootLinePage.uid}">
                                                                                        <core:iconForRecord table="pages" row="{rootLinePage}" />
                                                                                </a>
-                                                                               <f:be.link route="site_configuration" parameters="{action: 'edit', site: page.siteIdentifier}" title="{f:translate(key:'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:edit')}">
-                                                                                       {rootLinePage.title} [ID: {page.uid}]
-                                                                               </f:be.link>
+                                                                               <f:if condition="{page.siteIdentifier}">
+                                                                                       <f:then>
+                                                                                               <f:be.link route="site_configuration" parameters="{action: 'edit', site: page.siteIdentifier}" title="{f:translate(key:'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:edit')}">
+                                                                                                       {rootLinePage.title} [ID: {page.uid}]
+                                                                                               </f:be.link>
+                                                                                       </f:then>
+                                                                                       <f:else>
+                                                                                               {rootLinePage.title} [ID: {page.uid}]
+                                                                                       </f:else>
+                                                                               </f:if>
                                                                        </f:then>
                                                                        <f:else>
                                                                                <core:iconForRecord table="pages" row="{rootLinePage}" />