On Thu, Apr 28, 2011 at 11:45 AM, Matt Raible <[email protected]>wrote:
> > > On Wed, Apr 27, 2011 at 11:22 AM, Matt Raible <[email protected]>wrote: > >> >> >> On Wed, Apr 27, 2011 at 6:39 AM, Matt Raible <[email protected]>wrote: >> >>> >>> On Apr 26, 2011, at 7:44 PM, Dave wrote: >>> >>> > On Tue, Apr 26, 2011 at 2:23 PM, Matt Raible <[email protected]> >>> wrote: >>> >> On Apr 26, 2011, at 12:20 PM, Dave wrote: >>> >>> On Tue, Apr 26, 2011 at 11:14 AM, Matt Raible < >>> [email protected]> wrote: >>> >>>> This morning I discovered a couple new issues with my 5.0 RC4 >>> install. >>> >>>> 1) My tag cloud isn't working on my site. When I hit the following >>> link, I don't get any errors in my log, but it results in a 404. Any ideas? >>> >>>> http://raibledesigns.com/rd/tags/appfuse >>> >> >>> >>> That probably means that you don't have a tag index page in your >>> side, >>> >>> or something the page you do have became "unmarked" as a tags index >>> >>> page. If that's the case, it would be very nice to know why that >>> >>> happened so we can fix it before release. >>> >> >>> >> Is this a servlet that should be in web.xml? >>> > >>> > No. In a custom theme, there are four types of template actions that >>> > you can create (weblog, permalink, search, tagsIndex and custom). For >>> > the "/blog/tags/tag" form of URL, then you need one template that is >>> > the tagIndex template. >>> > >>> > Unfortunately, Roller does not display the name of a template's action >>> > anywhere so it is hard to tell which templates are which actions. >>> > Please check the "webpage" table and see if you have a template with >>> > action of "tagsIndex." >>> > >>> > >>> >>>> 2) It looks like some of my blog entries are truncated. For example: >>> >>>> http://raibledesigns.com/rd/entry/2010_a_year_in_review >>> >>>> >>> >>>> Is there something in the import script that might've truncated my >>> entries when I re-imported all of them? >>> >>> >>> >>> Which import script are you talking about? I was not aware (or >>> forgot) >>> >>> that we have an importer in Roller. >>> >> >>> >> I'm talking about the db upgrade script. I had issues upgrading my >>> database (MySQL 3.x) and ended up changing to a 5.x database. However, it >>> looks like something got lost when I imported my 3.x database into 5, so I'm >>> wondering if there's a length on the weblogentry.text field that might've >>> chopped off content. Or maybe mysqldump did it when exporting. I'm not sure. >>> I'm working with my hosting provider to try and see if there's a MySQL Diff >>> tool I can use to see what entries need refreshing from my old database. >>> > >>> > That is scary. There is no limit on the blog entry content field size, >>> > we declare it as type "text" which is an unlimited CLOB type. I guess >>> > it is possible that something went wrong with MySQL dump or import >>> > commands, but I'd expect those tools to be pretty rock solid by none. >>> > I hope have the dump files that you exported. >>> >>> My hosting provider guy looked into it and it seems like the problem is >>> the charset. My old MySQL 3.x database used latin1 while my MySQL 5.x >>> database uses UTF-8. >>> >>> http://en.gentoo-wiki.com/wiki/Convert_latin1_to_UTF-8_in_MySQL >>> >>> The symptom certainly looks familiar: >>> "Be careful when switching to UTF-8. Once you have converted your data, >>> any program/webapp that uses the database will have to check that the >>> data >>> they are sending to the database is valid UTF-8. If it isn't then MySQL >>> will silently truncate the data after the invalid part, which can cause >>> all sorts of problems." >>> >>> Did anything change structurally b/w Roller 4 and 5 as far as the >>> weblogentry and roller_comments tables go? I think those are the only tables >>> where things got messed up. I think I can convert, delete and then >>> re-import. Do you see any issues with that? >>> >>> >> I'm attempting to do this locally. Here's my strategy: >> >> 1. Take my 20110302.sql dump and convert it so it works with MySQL 5. This >> involves changing TYPE=MyISAM to ENGINE=MyISAM and then using the "convert >> dump" section from >> http://en.gentoo-wiki.com/wiki/Convert_latin1_to_UTF-8_in_MySQL. >> 2. Create a new 5.x database with UTF-8: >> >> CREATE DATABASE roller CHARACTER SET utf8 COLLATE utf8_general_ci; >> >> 3. Import 20110302.sql. >> 4. Upgrade from Roller 4 to Roller 5 using >> WEB-INF/classes/dbscripts/mysql/400-to-500-migration.sql >> 5. mysqldump all rows in roller_comment and weblogentry tables that are >> older than 3/2/2011. >> 6. In production, delete all records in roller_comment and weblogentry >> that are older than 3/2/2011. >> 7. Insert weblogentry and roller_comment rows from mysqldump. >> >> I believe this will work. However, it looks like things fail on Step 4: >> >> $ mysql -u root -p roller < 400-to-500-migration.sql >> Enter password: >> ERROR 1005 (HY000) at line 141: Can't create table 'roller.#sql-d9_d' >> (errno: 150) >> >> Line 141 is: >> >> alter table roller_mediafiledir add constraint mf_websiteid_fk >> foreign key ( websiteid ) references website( id ) ; >> >> Any ideas? The only thing I can think of is my 20110302.sql file has some >> partially-created relationships from a Roller upgrade attempt. I'd like to >> think it doesn't though. ;-) >> >> > I commented out line 141 and was able to get past this. To delete records > older than 3/2/2011, I used the following queries: > > delete from weblogentry where pubtime < 2011-03-03; > delete from roller_comment where posttime < 2011-03-03; > > Then I attempted to import comments and weblogentries, but received the > following errors. I'm kinda stuck. Do I need to turn off auto-incrementing > on insert? If I search the file before importing, there is no key with the > value below and if I search the db, it doesn't exist until after the failure > below. > > mraible:Desktop mraible$ mysql -u root -p roller5 < roller_comment_dump.sql > > Enter password: > ERROR 1062 (23000) at line 12: Duplicate entry > '92fe6c8d-fb11-4c32-ba88-d2da36789c43' for key 'PRIMARY' > > mraible:Desktop mraible$ mysql -u root -p roller5 < weblogentry_dump.sql > Enter password: > ERROR 1062 (23000) at line 6: Duplicate entry '' for key 'PRIMARY' > > I got it fixed by dropping the table and creating it again after combining all entries and comments with pubtime < 20110303 (from MySQL 3.x) and those with pubtime > 20110303 (from MySQL 5.x). http://raibledesigns.com/rd/entry/be_careful_when_switching_mysql Let me know if you see any of my entries/comments that are out of wack. Cheers, Matt
