Skip to content

Commit

Permalink
Fix output issue when containerId is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
Alban Jubert committed Mar 13, 2019
1 parent 9c4ec2f commit d32737f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .craftplugin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"pluginName":"Google Tag Manager","pluginDescription":"Google Tag Manager","pluginVersion":"1.0.1,1.0.0","pluginAuthorName":"La Haute Société","pluginVendorName":"lhs","pluginAuthorUrl":"https://www.lahautesociete.com","pluginAuthorGithub":"","codeComments":"","pluginComponents":["settings","variables"],"consolecommandName":"","controllerName":"","cpsectionName":"","elementName":"","fieldName":"","modelName":"","purchasableName":"","recordName":"","serviceName":"","taskName":"","utilityName":"","widgetName":"","apiVersion":"api_version_3_0"}
{"pluginName":"Google Tag Manager","pluginDescription":"Google Tag Manager","pluginVersion":"1.0.2,1.0.1,1.0.0","pluginAuthorName":"La Haute Société","pluginVendorName":"lhs","pluginAuthorUrl":"https://www.lahautesociete.com","pluginAuthorGithub":"","codeComments":"","pluginComponents":["settings","variables"],"consolecommandName":"","controllerName":"","cpsectionName":"","elementName":"","fieldName":"","modelName":"","purchasableName":"","recordName":"","serviceName":"","taskName":"","utilityName":"","widgetName":"","apiVersion":"api_version_3_0"}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Google Tag Manager Changelog

## 1.0.2 - 2019-03-13

### Fixed
- Output issue when containerId was not set

## 1.0.1 - 2019-03-08

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "la-haute-societe/craft-google-tag-manager",
"description": "This Craft 3 plugin allows you to configure the Google Tag Manager \"ContainerID\" from the control panel and inject the GTM tags into the template.",
"type": "craft-plugin",
"version": "1.0.1",
"version": "1.0.2",
"keywords": [
"craft",
"cms",
Expand Down Expand Up @@ -32,7 +32,7 @@
"extra": {
"name": "Google Tag Manager",
"handle": "google-tag-manager",
"schemaVersion": "1.0.1",
"schemaVersion": "1.0.2",
"hasCpSettings": true,
"hasCpSection": false,
"changelogUrl": "https://github.com/la-haute-societe/craft-google-tag-manager/blob/master/CHANGELOG.md",
Expand Down
2 changes: 1 addition & 1 deletion src/GoogleTagManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class GoogleTagManager extends Plugin
/**
* @var string
*/
public $schemaVersion = '1.0.0';
public $schemaVersion = '1.0.2';

// Public Methods
// =========================================================================
Expand Down
4 changes: 2 additions & 2 deletions src/variables/GoogleTagManagerVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function headSection()
$containerID = GoogleTagManager::getInstance()->getSettings()->containerID;

if (!$containerID) {
return '<!-- GoogleTagManage plugin : containerID is not set -->';
return new \Twig\Markup('<!-- GoogleTagManage plugin : containerID is not set -->', 'UTF-8');
}

return $this->renderPluginTemplate('head', [
Expand All @@ -52,7 +52,7 @@ public function bodySection()
$containerID = GoogleTagManager::getInstance()->getSettings()->containerID;

if (!$containerID) {
return '<!-- GoogleTagManage plugin : containerID is not set -->';
return new \Twig\Markup('<!-- GoogleTagManage plugin : containerID is not set -->', 'UTF-8');
}

return $this->renderPluginTemplate('body', [
Expand Down

0 comments on commit d32737f

Please sign in to comment.