Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sotiris Filippidis 286 posts 1501 karma points
    Oct 13, 2016 @ 06:14
    Sotiris Filippidis
    2

    Quick ways to fix spotted bugs in version 1.0.3

    Your feedback has been amazing so far and thank you for that! A couple of bugs were discovered, so since some of you have already started working on the theme and wouldn't want to have to install an update, I'll just give you some quick ways to fix them while staying in version 1.0.3 of the Starter Kit.

    Contact form displays JSON result instead of proper "thank you" message

    Reason: There are some entries missing from web.config that haven't been added by the package (will be fixed in 1.0.4)

    Please make sure the following entries are present in the

    <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
    

    (the above should probably exist, but just to be safe)

    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
    

    After you add those, your success/failure messages should appear correctly.

    When using the blog with a multilingual site (i.e. multiple homepages/content subtrees) sidebar widgets are cached for the first language displayed and cached result is carried to other languages

    Reason: Sidebar widgets are (wrongly) cached globally

    This is a big oops :) Actually, there was an error specifying the cache type there, so you'll have to go and change things in two files:

    Views/pageBlogList.cshtml Views/pageArticleItem.cshtml

    Scroll to the bottom of the page in both pages and you'll see the following three lines of code:

    @Html.CachedPartial("BlogCategories", currPage, 3600, false, false, null)
    @Html.CachedPartial("BlogRecentArticles", currPage, 3600, false, false, null)
    @Html.CachedPartial("BlogPopularTags", currPage, 3600, false, false, null)
    

    Change the parameter after the 3600 from "false" to "true", like this:

    @Html.CachedPartial("BlogCategories", currPage, 3600, true, false, null)
    @Html.CachedPartial("BlogRecentArticles", currPage, 3600, true, false, null)
    @Html.CachedPartial("BlogPopularTags", currPage, 3600, true, false, null)
    

    (This makes those partials cached by page instead of being cached globally, hence the problem in multi-lingual sites or even sites with multiple blogs. I know that caching by page is not the most efficient way of caching things that should be cached by blog instance, but this will be fixed on a later version).

    When using background images on the home page or other pages, menu items sometimes appear dark even if "Light Top menu" option has been checked

    Reason: A crazy script from the original HTML theme

    I discovered that the theme's original HTML had a javascript that was doing a "background check" - This is supposed to change background styles depending on image brigthness. I included it blindly since it was on the theme's original HTML template, totally missing its purpose. This script can cause unpredicted results, since it depends on the image being used. In any case, that script shouldn't be there at all since the editor has control over the menu displaying in light or dark color.

    To fix that (if you have this problem), go to views/sitetemplate.cshtml around line 23 and DELETE the line which reads:

    Html.RequiresJs("/scripts/plugin/background-check.min.js");
    

    This will do it - it's pretty safe to delete that line since this script is probably only causing trouble and not offering anything more.

Please Sign in or register to post replies

Write your reply to:

Draft