Dean Learner: We found out that the mist was poisonous when two techies died. Now I don’t like to see anyone die, but if someone has to die, it might as well be a techie… because another one comes along, it’s the same belt, it’s the same hammer in the tool belt, you can barely tell the difference.
- Create a working folder and go into it.
mkdir redir cd redir
- Go to http://redir.sourcearchive.com/ and find the latest version.
- At the time of writing this article the latest version is 2.2.1-9. Download those components.
wget http://redir.sourcearchive.com/downloads/2.2.1-9/redir_2.2.1.orig.tar.gz wget http://redir.sourcearchive.com/downloads/2.2.1-9/redir_2.2.1-9.diff.gz wget http://redir.sourcearchive.com/downloads/2.2.1-9/redir_2.2.1-9.dsc
- Check the integrity of the downloads with md5sum and compare them against the values listed in the *.dsc file
md5sum redir_2.2.1-9.diff.gz redir_2.2.1.orig.tar.gz e82abbecfa8ca5941e6601d61b84303d redir_2.2.1-9.diff.gz 4342fadac30504c86c8db7beefe01995 redir_2.2.1.orig.tar.gz
- Uncompress the sources.
gunzip redir_2.2.1-9.diff.gz tar -xvzf redir_2.2.1.orig.tar.gz
- The first patch expects the files to be in different places, so shift things around a little to make it match up, don’t worry about the mv/subdirectory warning.
mv redir-2.2.1 redir-2.2.1.orig mkdir redir-2.2.1.orig/debian mv redir-2.2.1.orig/* redir-2.2.1.orig/debian
- Now apply the patch.
patch -p0 -i redir_2.2.1-9.diff
- There’s no dpatch on Plesk so we will have to apply the patches by hand using the normal patch command. Change to the main source folder.
- The patches must be applied in order so list them out and build a patch script.
ls patches/[0-9][0-9]_* | sed ’s/^/patch -i &/’ > do.patch
- Then run them all.
- Now that we have applied all the patches, we must clean and build.
make clean make
- Launch the port redirector service in the background.
./redir –lport=12345 –cport=22 &
- Connect to the service.
ssh -D 12345 localhost
- Log in and then log out.
- Kill service.
- From Word’s menu select File->Properties.
- Goto the General tab.
- Fill in as many of the document properties as you can but do include at the very least: Title, Subject, Author, Company.
- Now go to the Custom tab.
- Next to Name enter version.
- Next to Type select Number from the drop down box.
- Next to Value enter 0.1 (or whatever your document version is).
- At this point the Add button will become enabled, so click it.
- version will appear in the Properties: list in the bottom part of the screen.
- Finally click Ok.
- Set up the image in the centre of the page and make it look pretty.
- Under the image we want the document Title, so place the cursor somewhere sensible and set the font and format you want.
- From the menus select Insert->Field…
- Make sure the Category is set to (All).
- Select Title from the field names.
- Choose the Format of the field.
- Click Ok.
- The title of your document will appear, when you click on it, it will appear with a grey background to show it’s a field code.
- First write the text: Document File name
- Next set up the font and format in the way you like for this piece of information.
- From the Insert menu select Field….
- Ensure the Category is set to (All) and select FileName.
- Next write Date and from the field’s menu select SaveDate picking the format you would like the date to be displayed in.
- Getting the idea yet? Next write Author and select Author from the field’s dialogue.
- Finally enter Version. This one is a custom field in the document properties so select DocProperty from the Field names and because we have already set up the version value it should appear in the Property list so select it and press Ok.
my-list-nameand list email address is
email@example.com. Normal user login List email address = firstname.lastname@example.org Password reminder, subscribe and unsubscribe http://lists.example.com/mailman/options/my-list-name Administrator login http://lists.example.com/mailman/admin/my-list-name Archive - email history http://lists.example.com/mailman/private/my-list-name/ Export list members This exports the list of members in the following form and places one member per line:
“Full name” <emailaddress>From the command line:
/usr/lib/mailman/bin/list_members -f my-list-nameList commands Send blank email with subject of:
-requeston the end) List of members Send blank email with subject of:
-requeston the end) Subscribe to list http://lists.example.com/mailman/listinfo/my-list-name Fill in “Subscribing to My-List-Name” section. Personal settings http://lists.example.com/mailman/options/my-list-name Change email address From the following page you can unsubscribe from the list using your old email address. When you have unsubscribed from the list you can add yourself back on under a different email address and password. http://lists.example.com/mailman/options/my-list-name Administration section http://lists.example.com/mailman/admin/my-list-name/general
I recently had a very strange problem with my B2evolution installation. Some of my posts had gone missing! When I say missing I mean half missing! You could search for the articles and they would appear in the list of search results. You could also find them by looking at them in the year/month/day grouping view. When the article was displayed in the results view or the date grouping view it looked fully formed, however when you clicked on the title to open the actual article it replaced the last '-' (dash or minus (for the search engines ;) )) in the URL title with a ':' (colon) and gave the message:
Tags: move-a-window-when-its-title-bar-is-off Sorry, there is nothing to display...
I asked in the forums and they said check the configuration file for a work around. So in
$BLOGROOT/conf/_advanced.php I found the comment in question:
// Enable a workaround to allow accessing posts with URL titles ending with dash (workaround for old bug).
In b2evolution v2.4.5 new tag URLs were introduced: You could choose to have tag URLs ending with a dash. This lead to problems with post URL titles accidentally ending with a dash (today, URL titles cannot end with a dash any more): Instead of displaying the post, the post title was handled as a tag name. When this setting is enabled, all tag names which are exactly 40 chars long and end with a dash are handled in the following way: Try to find a post with the given tag name as the URL title. If there is a matching post, display it; otherwise, display the normal tag page.
Note: If you use a 39 chars-long tag name, have an URL title which is the same as the tag *but* additionally has a dash at the end and you use the dash as a tag URL "marker", you won't be able to access either the post or the tag page, depending on the value of this setting.
/** * Enable a workaround to allow accessing posts with URL titles ending with * a dash (workaround for old bug). * ... * @global boolean $tags_dash_fix * * @internal Tblue> We perhaps should notify the user if we detect bogus * post URLs (check on upgrade?) and recommend enabling * this setting. */
So to fix the problem immediately add the following line to
$tags_dash_fix = 1;
This will fix the problem and give you time to fix the database. Fixing the database requires SQL command line access to the database so careful what you do! Always take a backup before attempting any SQL on a database.
To check which other articles have been affected you can run the following bit of SQL:
This gives you the following output. I have surrounded the post url title with '|' (pipe) characters so you can easily see where the field value starts and stops.
SELECT post_ID, concat('|', post_urltitle, '|') FROM evo_items__item WHERE post_urltitle like '%-';
We will now run the SQL that removes the last '-' (minus or dash) from the post's URL title.
+---------+--------------------------------------------+ | post_ID | concat('|',post_urltitle,'|') | +---------+--------------------------------------------+ | 132 | |attempted-to-assign-id-from-null-one-to-| | | 53 | |import-and-access-to-mysql-database-for-| | | 90 | |move-a-window-when-its-title-bar-is-off-| | | 105 | |prevent-tomcat-redeploying-when-running-| | +---------+--------------------------------------------+
For each record where the
UPDATE evo_items__item SET post_urltitle = substr( post_urltitle, 1, length(post_urltitle)-1 ) WHERE post_urltitle like '%-';
post_urltitleends with a '-' (minus), replace it with the parts of the text from character position 1 to character position one less than the length of the text.
When you have completed the database fix you can remove the
$tags_dash_fix line from
The current B2evolution code prevents post URL titles from being created ending in a '-' (minus or dash) so once you have fixed the issue it doesn't need to be revisited.