View Ticket
Not logged in
Ticket UUID: 5483de2ea6bb205e502ca36fa99db2b33d8abbb5
Title: Changing to non default skin causes database error
Status: Closed Type: Code_Defect
Severity: Minor Priority:
Subsystem: Resolution: Fixed
Last Modified: 2010-01-01 21:53:05
Version Found In: [def89b9393]
Description & Comments:
Attempt to change skin on local clone of fossil or sqlite repository in "Skins" section (e.g. http://localhost:8081/setup_skin) to some other than default one with Fossil version [def89b9393] 2010-01-01 01:30:14 causes following page to be displayed. Rebuilding repository does not help.
Database Error

near "$baseurl": syntax error
REPLACE INTO config VALUES('css','/* General settings for the entire page */
body {
  margin: 0ex 1ex;
  padding: 0px;
  background-color: white;
  font-family: "sans serif";
}

/* The project logo in the upper left-hand corner of each page */
div.logo {
  display: table-row;
  text-align: center;
  /* vertical-align: bottom;*/
  font-size: 2em;
  font-weight: bold;
  background-color: #707070;
  color: #ffffff;
}

/* The page title centered at the top of each page */
div.title {
  display: table-cell;
  font-size: 1.5em;
  font-weight: bold;
  text-align: left;
  padding: 0 0 0 10px;
  color: #404040;
  vertical-align: bottom;
  width: 100%;
}

/* The login status message in the top right-hand corner */
div.status {
  display: table-cell;
  text-align: right;
  vertical-align: bottom;
  color: #404040;
  font-size: 0.8em;
  font-weight: bold;
}

/* The header across the top of the page */
div.header {
  display: table;
  width: 100%;
}

/* The main menu bar that appears at the top of the page beneath
** the header */
div.mainmenu {
  padding: 5px 10px 5px 10px;
  font-size: 0.9em;
  font-weight: bold;
  text-align: center;
  letter-spacing: 1px;
  background-color: #404040;
  color: white;
}

/* The submenu bar that *sometimes* appears below the main menu */
div.submenu {
  padding: 3px 10px 3px 0px;
  font-size: 0.9em;
  text-align: center;
  background-color: #606060;
  color: white;
}
div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited {
  padding: 3px 10px 3px 10px;
  color: white;
  text-decoration: none;
}
div.mainmenu a:hover, div.submenu a:hover {
  color: #404040;
  background-color: white;
}

/* All page content from the bottom of the menu or submenu down to
** the footer */
div.content {
  padding: 0ex 0ex 0ex 0ex;
}
/* Hyperlink colors */
div.content a { color: #604000; }
div.content a:link { color: #604000;}
div.content a:visited { color: #600000; }

/* Some pages have section dividers */
div.section {
  margin-bottom: 0px;
  margin-top: 1em;
  padding: 1px 1px 1px 1px;
  font-size: 1.2em;
  font-weight: bold;
  background-color: #404040;
  color: white;
}

/* The "Date" that occurs on the left hand side of timelines */
div.divider {
  background: #a0a0a0;
  border: 2px #505050 solid;
  font-size: 1em; font-weight: normal;
  padding: .25em;
  margin: .2em 0 .2em 0;
  float: left;
  clear: left;
}

/* The footer at the very bottom of the page */
div.footer {
  font-size: 0.8em;
  margin-top: 12px;
  padding: 5px 10px 5px 10px;
  text-align: right;
  background-color: #404040;
  color: white;
}

/* The label/value pairs on (for example) the vinfo page */
table.label-value th {
  vertical-align: top;
  text-align: right;
  padding: 0.2ex 2ex;
}');
REPLACE INTO config VALUES('header','<html>
<head>
<title>$<project_name>: $<title></title>
<link rel="alternate" type="application/rss+xml" title="RSS Feed"
      href="$baseurl/timeline.rss">
<link rel="stylesheet" href="$baseurl/style.css" type="text/css"
      media="screen">
</head>
<body>
<div class="header">
  <div class="logo">
    <nobr>$<project_name></nobr>
  </div>
</div>
<div class="header">
  <div class="title">$<title></div>
  <div class="status"><nobr><th1>
     if {[info exists login]} {
       puts "Logged in as $login"
     } else {
       puts "Not logged in"
     }
  </th1></nobr></div>
</div>
<div class="mainmenu"><th1>
html "<a href=''$baseurl$index_page''>Home</a> "
if {[anycap jor]} {
  html "<a href='$baseurl/timeline'>Timeline</a> "
}
if {[hascap oh]} {
  html "<a href=''$baseurl/dir''>Files</a> "
}
if {[hascap o]} {
  html "<a href=''$baseurl/leaves''>Leaves</a> "
  html "<a href=''$baseurl/brlist''>Branches</a> "
  html "<a href=''$baseurl/taglist''>Tags</a> "
}
if {[hascap r]} {
  html "<a href=''$baseurl/reportlist''>Tickets</a> "
}
if {[hascap j]} {
  html "<a href=''$baseurl/wiki''>Wiki</a> "
}
if {[hascap s]} {
  html "<a href=''$baseurl/setup''>Admin</a> "
} elseif {[hascap a]} {
  html "<a href=''$baseurl/setup_ulist''>Users</a> "
}
if {[info exists login]} {
  html "<a href=''$baseurl/login''>Logout</a> "
} else {
  html "<a href=''$baseurl/login''>Login</a> "
}
</th1></div>
');
REPLACE INTO config VALUES('footer','<div class="footer">
Fossil version $manifest_version $manifest_date
</div>
</body></html>
');

If you have recently updated your fossil executable, you might need to run "fossil all rebuild" to bring the repository schemas up to date. 

jeremy_c added on 2010-01-01 19:51:26:
[af25881866] fixes this bug, thanks for the report. Please reopen the ticket if you still have issues but I came across the same problem when testing your bug and after the fix I can switch to any skin.


anonymous claiming to be PF added on 2010-01-01 20:06:39:
Thanks for prompt fix. Fossil version [af25881866] 2010-01-01 19:49:00 behaves nicely.


anonymous added on 2010-01-01 20:17:18:
Maybe I was to optimistic at the moment. Skins are changeable, but it somehow messes up the menu system. So if I switch to Default skin, I get on Timeline menu item link to "http://localhost:8080/setup_skin". If I click on some other menu item (e.g. Tickets) I get Timeline menu item "redefined" to point at http://localhost:8080/reportlist and so on.

Thanks.


jeremy_c added on 2010-01-01 21:35:44:
Ok, I see what happened. During the last revision of the timeline mods, the timeline link was copy/pasted from one source. The skins.c file for some reason uses single quotes around URL's. The skins.c file uses two single quotes around the URL's. One doesn't work in the other.

So... I tested all skins and they seem to be working for me. Can you please confirm? Again, open the ticket if it's not.

I also fixed the Black and White theme as the timeline copy/paste didn't include the li elements.


anonymous added on 2010-01-01 21:45:37:
Thanks.

Fossil version [5efb82a71a] 2010-01-01 21:33:46 works as expected for me.


jeremy_c added on 2010-01-01 21:52:14:
BTW... It uses two single quotes because it's inserted into the db, unlike the default skin in skin.c...


jeremy_c added on 2010-01-01 21:53:05:
er, in style.c... skin.c uses two single quotes for SQL quote escaping. I'll get it right some day!