Skip to content

Commit 2ec6db3

Browse files
author
Nicholas K. Dionysopoulos
committed
# [LOW] The cookie consent code was outside the BODY tag
1 parent 5a5d959 commit 2ec6db3

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

CHANGELOG

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ Akeeba Data Compliance 1.1.0
33
+ Protection of all component and plugin folders against direct web access
44
+ Export data: support for Joomla “privacy” group plugins
55
! Immediate failure accessing the backend of the component [gh-27]
6+
# [HIGH] ATS export, causing fatal error
67
# [LOW] Cookie compliance fails with a fatal error when the server does not set the HTTP_HOST environment variable
78
# [LOW] PHP 7.3 warning in the Control Panel page
8-
# [HIGH] ATS export, causing fatal error
9+
# [LOW] The cookie consent code was outside the BODY tag
910

1011
Akeeba Data Compliance 1.0.1
1112
================================================================================

plugins/system/datacompliancecookie/datacompliancecookie.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,17 @@ private function loadHtml($app)
644644
}
645645

646646
// Append the parsed view template content to the application's HTML output
647-
$app->setBody($app->getBody() . $content);
647+
$body = $app->getBody();
648+
$postBody = '';
649+
$closeTagPos = strpos($body, '</body');
650+
651+
if ($closeTagPos !== false)
652+
{
653+
$postBody = substr($body, $closeTagPos);
654+
$body = substr($body, 0, $closeTagPos);
655+
}
656+
657+
$app->setBody($body . $content . $postBody);
648658
}
649659

650660
/**

0 commit comments

Comments
 (0)