Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
TYPO3
languagevisibility
Commits
828ab7cf
Commit
828ab7cf
authored
Jul 10, 2020
by
Fabian Galinski
😾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BUGFIX] A page link to another language isn't working
parent
5f80b1d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
Classes/Hook/PageHook.php
Classes/Hook/PageHook.php
+2
-4
No files found.
Classes/Hook/PageHook.php
View file @
828ab7cf
...
...
@@ -75,8 +75,6 @@ class PageHook implements PageRepositoryGetPageOverlayHookInterface, PageReposit
}
$pageInputIsArray
=
is_array
(
$pageInput
);
$languageUid
=
GeneralUtility
::
makeInstance
(
Context
::
class
)
->
getPropertyFromAspect
(
'language'
,
'id'
);
$queryBuilder
=
GeneralUtility
::
makeInstance
(
ConnectionPool
::
class
)
->
getQueryBuilderForTable
(
'pages'
);
$queryBuilder
->
getRestrictions
()
->
removeAll
()
->
add
(
GeneralUtility
::
makeInstance
(
DeletedRestriction
::
class
));
$row
=
$queryBuilder
->
select
(
'*'
)
...
...
@@ -90,7 +88,7 @@ class PageHook implements PageRepositoryGetPageOverlayHookInterface, PageReposit
return
;
}
if
(
$l
anguage
Uid
>=
0
&&
!
FrontendServices
::
checkVisiblityForElement
(
$row
,
'pages'
,
$l
anguage
Uid
))
{
if
(
$lUid
>=
0
&&
!
FrontendServices
::
checkVisiblityForElement
(
$row
,
'pages'
,
$lUid
))
{
if
(
$pageInputIsArray
)
{
$pageInput
[
'_NOTVISIBLE'
]
=
TRUE
;
}
...
...
@@ -98,7 +96,7 @@ class PageHook implements PageRepositoryGetPageOverlayHookInterface, PageReposit
}
// call service to know if element is visible and which overlay language to use
$overlayLanguage
=
FrontendServices
::
getOverlayLanguageIdForElementRecord
(
$row
,
'pages'
,
$l
anguage
Uid
);
$overlayLanguage
=
FrontendServices
::
getOverlayLanguageIdForElementRecord
(
$row
,
'pages'
,
$lUid
);
if
(
$overlayLanguage
===
FALSE
)
{
if
(
$pageInputIsArray
)
{
$pageInput
[
'_NOTVISIBLE'
]
=
TRUE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment