Ticket #258 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

update script: weird character in themes table breaks script

Reported by: dmorton Owned by: rjl
Priority: normal Milestone: 1.0.1
Component: PHP scripts Version: 1.0.0
Severity: normal Keywords:
Cc:

Description

I think this may have been a data encoding problem...

From the mailing list:

I ran into a fun little problem myself. Somehow or another, my themes were named "Maia<?>Blue" and "Mild<?>Brown" (the <?> actually being a single character of unknown origin). This was a db that was originally RC5 (or possibly earlier), then updated to svn of a few months ago, then updated to 1.0.0 a few days ago, and I know I didn't edit the theme names... Did some manual mysql cli work to fix the names, then everything went fine. Perhaps alter 6.php to

$updates = array( "UPDATE maia_themes SET name = 'Ocean Surf',

path='ocean_surf' WHERE name LIKE 'Maia%Blue'",

"UPDATE maia_themes SET name = 'Desert Sand',

path='desert_sand' WHERE name LIKE 'Mild%Brown'",

"UPDATE maia_users SET theme_id = $default_theme_id

WHERE theme_id=$dgm_theme_id",

"DELETE FROM maia_themes WHERE id=$dgm_theme_id"

to compensate...

Oh yeah, I also had a problem where $default_theme_id wasn't getting set to anything, so I got syntax errors, along the lines of "invalid syntax: UPDATE maia_users SET theme_id = WHERE theme_id = 2;", so perhaps double-check that $default_theme_id actually gets set to something, and if not, make it 0. Didn't have time to look into why it didn't get set in my case, I manually fixed that at the same time I fixed the theme name problem.

Change History

Changed 3 years ago by dmorton

The $default_theme_id problem is probably the same thing, a corrupted space in the name, and so the query didn't pick it up.

I don't see this causing any more problems, but it is a harmless patch anyway.

Changed 3 years ago by dmorton

  • status changed from new to closed
  • resolution set to fixed

Trunk: [949] merged with 1.0 branch in [951]

Note: See TracTickets for help on using tickets.