Skip to content

Commit

Permalink
Merge pull request #914 from tractorcow-farm/8.0
Browse files Browse the repository at this point in the history
Merge 8.0 into 8
  • Loading branch information
GuySartorelli authored Dec 16, 2024
2 parents d174925 + 7e98a0b commit 486aed9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Extension/FluentCMSMainExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function publish_localised_copy($data, $form)
protected function getRecordForLocalisedAction($data, $form): ?DataObject
{
$id = (int) $data['ID'];
$className = $this->owner->config()->get('model_class');
$className = $this->owner->getModelClass();

if (!$id || !$className) {
// Invalid inputs
Expand Down
1 change: 1 addition & 0 deletions src/Middleware/LocaleSwitchRedirector.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function process(HTTPRequest $request, callable $delegate)
if ($response->getStatusCode() === 404
&& !$state->getIsFrontend()
&& $this->getParamLocale($request)
&& !$request->getVar('CMSPreview')
) {
// Redirect to the CMS home page if the requested page doesn't exist
$response = new HTTPResponse();
Expand Down

0 comments on commit 486aed9

Please sign in to comment.