diff --git a/app/src/main/webapp/themes/basicmobile/weblog.vm b/app/src/main/webapp/themes/basicmobile/weblog.vm index 88504abad5..4ee14ea74d 100644 --- a/app/src/main/webapp/themes/basicmobile/weblog.vm +++ b/app/src/main/webapp/themes/basicmobile/weblog.vm @@ -7,22 +7,15 @@ $model.weblog.name #showAutodiscoveryLinks($model.weblog) #showAnalyticsTrackingCode($model.weblog) - #showMetaDescription() @@ -51,7 +44,7 @@
#includeTemplate($model.weblog "sidebar")
From 7092e9150f3ce48950c46cccd2074897a3f806a1 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Fri, 25 Sep 2026 12:22:53 -0600 Subject: [PATCH 4/4] Fix the Basic Mobile stylesheet, entry teasers, and weblog script errors The mobile templates now request their stylesheet with ?deviceType=mobile. The server picks a stylesheet rendition from the device cookie or user agent, so a mobile page reached through a ?deviceType=mobile link got the standard stylesheet; jQuery Mobile's own CSS used to hide that. The mobile day template chose between an entry's text and its summary by testing whether the text was empty, so entries without a summary printed a literal $entry.transformedSummary or an empty teaser. It now tests the summary and uses quiet references. roller.js is included with every weblog's comment form, but most themes don't load jQuery, so its form validation block threw "$ is not defined" on those pages. The block now runs only when jQuery Validation is present, which the admin and editor pages still load. --- app/src/main/webapp/theme/scripts/roller.js | 4 +++- app/src/main/webapp/themes/basicmobile/_day-mobile.vm | 6 +++--- app/src/main/webapp/themes/basicmobile/permalink-mobile.vm | 2 +- .../main/webapp/themes/basicmobile/searchresults-mobile.vm | 2 +- app/src/main/webapp/themes/basicmobile/weblog-mobile.vm | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/src/main/webapp/theme/scripts/roller.js b/app/src/main/webapp/theme/scripts/roller.js index 066061c3d4..cecaaaddea 100644 --- a/app/src/main/webapp/theme/scripts/roller.js +++ b/app/src/main/webapp/theme/scripts/roller.js @@ -212,7 +212,9 @@ function validateEmail(email) { var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } -$(document).ready(function () { +// weblog pages include this script with their comment form, and most themes +// do not load jQuery, so validation only runs where jQuery Validation is loaded +window.jQuery && jQuery.validator && jQuery(function () { jQuery("form.validate-form").validate(); // Added method to check valid email address and add a custom error message jQuery.validator.addMethod( diff --git a/app/src/main/webapp/themes/basicmobile/_day-mobile.vm b/app/src/main/webapp/themes/basicmobile/_day-mobile.vm index 95b1701340..6c5362fbb9 100644 --- a/app/src/main/webapp/themes/basicmobile/_day-mobile.vm +++ b/app/src/main/webapp/themes/basicmobile/_day-mobile.vm @@ -22,10 +22,10 @@ #end

- #if($utils.isEmpty($entry.text)) - $entry.transformedText + #if($utils.isEmpty($entry.summary)) + $!entry.transformedText #else - $entry.transformedSummary + $!entry.transformedSummary #end

#if($model.permalink) diff --git a/app/src/main/webapp/themes/basicmobile/permalink-mobile.vm b/app/src/main/webapp/themes/basicmobile/permalink-mobile.vm index 44825261aa..dd0b1f6e8e 100644 --- a/app/src/main/webapp/themes/basicmobile/permalink-mobile.vm +++ b/app/src/main/webapp/themes/basicmobile/permalink-mobile.vm @@ -6,7 +6,7 @@ $model.weblogEntry.title : $model.weblog.name - + #showMetaDescription() #showAnalyticsTrackingCode($model.weblog) diff --git a/app/src/main/webapp/themes/basicmobile/searchresults-mobile.vm b/app/src/main/webapp/themes/basicmobile/searchresults-mobile.vm index 64c5ce235e..2599aad45c 100644 --- a/app/src/main/webapp/themes/basicmobile/searchresults-mobile.vm +++ b/app/src/main/webapp/themes/basicmobile/searchresults-mobile.vm @@ -6,7 +6,7 @@ Search Results for '$model.term' : $model.weblog.name - + diff --git a/app/src/main/webapp/themes/basicmobile/weblog-mobile.vm b/app/src/main/webapp/themes/basicmobile/weblog-mobile.vm index b7fc01113b..2cb9bc3a36 100644 --- a/app/src/main/webapp/themes/basicmobile/weblog-mobile.vm +++ b/app/src/main/webapp/themes/basicmobile/weblog-mobile.vm @@ -8,7 +8,7 @@ #showMetaDescription() #showAnalyticsTrackingCode($model.weblog) - +