Skip to content

Commit

Permalink
[BUGFIX] Use correct module routes (#1273)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonakieling authored May 24, 2020
1 parent af5beda commit 802e6a6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Classes/Backend/RecordList/RecordListConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class RecordListConstraint
public function isInAdministrationModule(): bool
{
$vars = GeneralUtility::_GET('route');
return $vars === '/module/web/NewsAdministration';
return strpos('/module/web/NewsAdministration', $vars) !== false;
}

public function extendQuery(array &$parameters, array $arguments)
Expand Down
4 changes: 2 additions & 2 deletions Classes/Controller/AdministrationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ private function redirectToCreateNewRecord($table)
/** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
$uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);

$returnUrl = $uriBuilder->buildUriFromRoutePath('/web/NewsAdministration/', [
$returnUrl = $uriBuilder->buildUriFromRoutePath('/module/web/NewsAdministration/', [
'id' => $this->pageUid,
'token' => $this->getToken(true)
]);
Expand Down Expand Up @@ -609,7 +609,7 @@ protected function redirectToPageOnStart()
if (!empty($id)) {
/** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
$uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
$url = $uriBuilder->buildUriFromRoutePath('/web/NewsAdministration/', [
$url = $uriBuilder->buildUriFromRoutePath('/module/web/NewsAdministration/', [
'id' => $id,
'token' => $this->getToken(true)
]);
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Templates/Administration/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h1>
<f:if condition="{showSearchForm}">
<f:form id="administrationForm" name="demand" object="{demand}" method="get" data="{autoSubmitForm:autoSubmitForm}">
<input type="hidden" name="formSubmitted" value="1">
<input type="hidden" name="route" value="/module/web/NewsAdministration">
<input type="hidden" name="route" value="/module/web/NewsAdministration/">
<input type="hidden" name="token" value="{moduleToken}">
<input type="hidden" name="id" value="{page}">
<f:form.checkbox style="display:none" property="selectedCategories" value="0" />
Expand Down
3 changes: 2 additions & 1 deletion ext_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
'icon' => 'EXT:news/Resources/Public/Icons/module_administration.svg',
'labels' => 'LLL:EXT:news/Resources/Private/Language/locallang_modadministration.xlf',
'navigationComponentId' => $configuration->getHidePageTreeForAdministrationModule() ? '' : 'TYPO3/CMS/Backend/PageTree/PageTreeElement',
'inheritNavigationComponentFromMainModule' => false
'inheritNavigationComponentFromMainModule' => false,
'path' => '/module/web/NewsAdministration/'
]
);
}
Expand Down

0 comments on commit 802e6a6

Please sign in to comment.