Skip to content

Commit

Permalink
[BUGFIX] Refactor providing asset path for wildwebmidi.data (#1500)
Browse files Browse the repository at this point in the history
  • Loading branch information
markusweigelt authored Feb 28, 2025
1 parent 0f55669 commit f5a602b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
9 changes: 9 additions & 0 deletions Classes/Controller/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
use TYPO3\CMS\Core\Log\LogManager;
use TYPO3\CMS\Core\Pagination\PaginationInterface;
use TYPO3\CMS\Core\Pagination\PaginatorInterface;
use TYPO3\CMS\Core\Resource\Exception\InvalidFileException;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\MathUtility;
use TYPO3\CMS\Core\Utility\PathUtility;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Extbase\Mvc\Request;
use TYPO3\CMS\Extbase\Mvc\RequestInterface;
Expand Down Expand Up @@ -137,6 +139,13 @@ protected function initialize(RequestInterface $request): void
'uniqueId' => uniqid(),
'requestData' => $this->requestData
];

try {
$this->viewData['publicResourcePath'] = PathUtility::getPublicResourceWebPath('EXT:dlf/Resources/Public');
} catch (InvalidFileException) {
$this->logger->warning('Public resource path of the dlf extension could not be determined');
}

}

/**
Expand Down
1 change: 1 addition & 0 deletions Classes/Controller/PageViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public function mainAction(): ResponseInterface
// Get the controls for the map.
$this->controls = explode(',', $this->settings['features']);

$this->view->assign('viewData', $this->viewData);
$this->view->assign('forceAbsoluteUrl', $this->extConf['general']['forceAbsoluteUrl']);

$this->addViewerJS();
Expand Down
10 changes: 0 additions & 10 deletions Configuration/TypoScript/setup.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,6 @@ page {
}
}

[typo3.branch=="11.5"]
page.inlineSettings {
dlfAssets = /typo3conf/ext/dlf/Resources/Public/
}
[else]
page.inlineSettings {
dlfAssets = /_assets/007831ab53eafe3f6be2b9b1baf2a8d6/
}
[end]

[request && like(traverse(request.getQueryParams(), 'tx_dlf/multiview'), '1')]
page.includeJSFooter {
# Gridstack
Expand Down
2 changes: 1 addition & 1 deletion Resources/Public/JavaScript/WildWebMidi/wildwebmidi.js

Large diffs are not rendered by default.

0 comments on commit f5a602b

Please sign in to comment.