Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qfq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
typo3
qfq
Merge requests
!603
B16574: Added multiple siteConfigurations compatibility for typo3 v10 and 11. refs#16574
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
B16574: Added multiple siteConfigurations compatibility for typo3 v10 and 11. refs#16574
B16574_multiple_site_configuratoin_failure
into
develop
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Enis Nuredini
requested to merge
B16574_multiple_site_configuratoin_failure
into
develop
1 year ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
399ac7ce
1 commit,
1 year ago
1 file
+
20
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
extension/Classes/Core/Store/T3Info.php
+
20
−
4
Options
@@ -113,12 +113,10 @@ class T3Info {
return
null
;
}
$allSites
=
$sf
->
getAllSites
();
if
(
count
(
$allSites
)
>
1
)
{
Thrower
::
userReportException
(
'Site language Error.'
,
'QFQ is does not run on Typo3 setup with multiple sites yet. Please contact QFQ maintainers.'
);
}
elseif
(
count
(
$allSites
)
<
1
)
{
if
(
count
(
$allSites
)
<
1
)
{
return
null
;
}
else
{
$site
=
reset
(
$allSites
);
$site
=
self
::
getSiteConfiguration
(
$sf
);
$lang
=
$site
->
getLanguageById
(
$lid
);
$base
=
$lang
->
getBase
();
return
(
string
)
$base
;
@@ -162,4 +160,22 @@ class T3Info {
return
$languagePath
;
}
/**
* Returns the site configuration from current page. Used for T3 >=V10.
*
* object $sf
* @return object
*/
public
static
function
getSiteConfiguration
(
$sf
):
object
{
if
(
T3Handler
::
typo3VersionGreaterEqual10
()
&&
isset
(
$GLOBALS
[
'TYPO3_REQUEST'
]))
{
$siteIdentifier
=
$GLOBALS
[
'TYPO3_REQUEST'
]
->
getAttribute
(
'site'
)
->
getIdentifier
();
$actualSite
=
$sf
->
getSiteByIdentifier
(
$siteIdentifier
);
}
else
{
$allSites
=
$sf
->
getAllSites
();
$actualSite
=
reset
(
$allSites
);
}
return
$actualSite
;
}
}
\ No newline at end of file
Loading