From 464b5b97c0a5b77f341dd4310d8610cc54c14622 Mon Sep 17 00:00:00 2001 From: Rita Chen Date: Thu, 10 Sep 2020 16:44:06 +1000 Subject: [PATCH 1/2] #20 invalid template(s) caused www.ala.org.au outages and other applications to crash. --- .../ala/bootstrap3/HeaderFooterTagLib.groovy | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/grails-app/taglib/au/org/ala/bootstrap3/HeaderFooterTagLib.groovy b/grails-app/taglib/au/org/ala/bootstrap3/HeaderFooterTagLib.groovy index ddf0e6b..6a84274 100644 --- a/grails-app/taglib/au/org/ala/bootstrap3/HeaderFooterTagLib.groovy +++ b/grails-app/taglib/au/org/ala/bootstrap3/HeaderFooterTagLib.groovy @@ -137,13 +137,15 @@ class HeaderFooterTagLib { * @return */ String load(which, attrs) { - def content - if (hfCache[which].content == "" || (new Date().time > hfCache[which].timestamp + cacheTimeout)) { - content = getContent(which) - hfCache[which].content = content - hfCache[which].timestamp = new Date().time - } else { - content = hfCache[which].content + String newContent + String content = hfCache[which].content + if (content == "" || (new Date().time > hfCache[which].timestamp + cacheTimeout)) { + newContent = getContent(which) + if (newContent) { + hfCache[which].content = newContent + hfCache[which].timestamp = new Date().time + content = newContent + } } return transform(content, attrs) } @@ -154,8 +156,6 @@ class HeaderFooterTagLib { * @return */ String getContent(which) { - - def url = headerAndFooterBaseURL + '/' + which + ".html" // Bootstrap versions def conn = new URL(url).openConnection() try { From 9be8a9b1f518ab78a546d33dd779122e80d63bb0 Mon Sep 17 00:00:00 2001 From: Rita Chen Date: Thu, 1 Oct 2020 11:11:21 +1000 Subject: [PATCH 2/2] 3.2.3-SNAPSHOT --- .travis.yml | 1 + build.gradle | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8fd8aeb..5e9012c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ branches: - grails3 - pivotal - grails2 + - ala-bootstrap3-20 before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ diff --git a/build.gradle b/build.gradle index c486d61..9cd6e3d 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ buildscript { } } -version "3.2.2" +version "3.2.3-SNAPSHOT" group "org.grails.plugins" apply plugin:"eclipse"