Question
Hi there,
A while back I upgraded our Twiki from an older version to 4.12. My question is regarding the user topics. In 4.12, when a new user is created, the user topic contains meta tags with field names for the first name, last name, etc. The user topics we have that were created with the old version, do not have these meta tags. Maybe when I upgraded Twiki, I missed a step to upgrade the user topics.
I have only noticed that the pages are different, since I am trying to build a search to populate a dropdown with all the users. My search results only contain the users created since the upgrade.
Is there any way to either:
- create a search that will pull both old and new users and sort them into one list
- upgrade the old user topics to the new format with the meta tags
Thanks for any advice!
Kathy
Environment
--
KathyDeLaCruz - 31 Jul 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
- http://twiki.org/cgi-bin/view/TWiki/SearchPatternCookbook#Pattern_3_Creating_lists_of_TWik
will help you to get a list of usernames ( both the "old" and the "new" way).
- upgrade the old user topics to the new format : how many users do you have ? how many of them did customise their home pages ? or do your users have just -finally- the same home page for everybody having only differences based on name and email ? Answering these questions could help to decide the best strategy.
--
OlivierThompson - 11 Aug 2008
Hello!
I have about 300 users; none of the home pages are customized. The only difference is the name & country in the meta tags. Somehow I think the email address is getting picked up from the htpassword file.
I've actually started going in and just manually pasting the meta tags into the old user pages (via the file system), and just typing the names in. I've done about 40 so far ... it actually doesn't take that long - but if you have a faster idea, I'm all ears
--
KathyDeLaCruz - 13 Aug 2008
Hello,
- Updating emails in twiki's passwd file :
twiki/tools/upgrade_emails.pl should do the job for you
- Updating user's topic : I've been googling for a ready to use migration script, and I finally found in twikisupport web and twiki irc that such a migration tool is'nt available because of translating WikiUserName to first name and last name :
What to do now : I see you run twiki on vista. Well..I suppose you could do it in a cmd box :
- backup existing usersTopics ( copy the
data/Main directory )
- create a temporary file containing all the missing META fields
- create a file containing the user's topic file names that you need to update, one per line
- parse that file containing user's topic file names ( using
for /F %%FILE )and for each userTopic, do append the temporary file containing the META fields to the userTopic.txt ( type tempfile >> %%FILE )
- finaly edit User's topic to fix first name and last name
- last, you could check with a
diff -r between the Main and the directory containing originals ( see step 1 ), and then cleanup the temporary files
I've not been programming windows script since a long time , this can help too :
A perl script woul'd be better, since it could work on any platform and the algorithm would be very similar..Well I'm not experienced enought in perl, so I won't go further.
Hope this helps
--
OlivierThompson - 14 Aug 2008
Thanks Olivier - That's a really good idea -- I think that could work... I will check it out.
You are very helpful, and I really appreciate it!
--
KathyDeLaCruz - 14 Aug 2008