The first page in my documentation is always the title page. You know the sort - big company logo along with the title of the document and a couple of other useful pieces of information for filing like file name, version, last updated date and author. Each one of my pages has headers and footers. The page header contains the title and the version of the document whilst the footer contains the company name with a copyright message and the page number.
As you can see there is repeating information which has to be managed and updated. So often I get documents where the version date is changed on the front page but the author has forgotten to update it in the headers or footers. This is where Microsoft Word Fields come in handy.
A Microsoft Word Field is a property that is tucked away inside the document or is generated by Microsoft Word. The best example of a Field that most people use without noticing is Page Number or Number of Pages. These are just 2 of the really common ones, there are loads and you can create your own.
The documentation is a bit thin which is a bit surprising for Microsoft. I had a look on the interweb for other blogs describing how to add these mystical fields but most of them were pretty complicated and I was left to use good old fashioned trial and error to figure it out. And now that I have I’m telling the world.
So let’s go with my example from the first paragraph. In order to make it easier to see when it’s working lets fill in the property information first. If we don’t do this first after we set up our Field it will be blank and we won’t be able to tell if it is blank because it’s broken or it’s blank because it’s empty.
For Office 2010, Go to File->Info and click the Properties drop down on the right hand side (under the preview of the document)and Advanced Properties.
- 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.
You have now added all the information you want in one central place. Next we need to create our front page. We will embed several Fields in it.
- 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.
At the bottom of the screen we are going to write our file and documentation fields.
- 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.
In each case when we add the the Field code to the document it will appear updated in the document, with a grey background if you click on it. Now just do the same for the headers and footers and you’re done.
When you change any of your document properties just go into File->Properties make the changes you want. When you return to the document. Highlight the field by clicking on it and from the context menu select Update Field. Unfortunately the header and footer Fields are not covered in the Select All (Control-A) and so must be done separately.
Plesk provides mail list capabilities via MailMan which is one of those Unix programs (services) that has just been around forever. The software is pretty much rock solid and hasn’t been updated in ages. It does what it says on the tin. It allows users to sign up for a mail list and manage their delivery options.
As far as administering a MailMan list goes there is about a thousand trees worth of documentation. Once the application was completed the developers had no more excuses and so had to finish writing the documentation as well Although the documentation is very thorough you do, kind of, have to read almost all of it in order to find the bits you want. It is like writing socket applications - loads of documentation and options but you generally just reuse the same 5 lines! MailMan has just the same characteristics, there are only a couple of things you need to do.
So here is a cheatsheet for the most commonly used URLs for managing a MailMan list. For the purpose of the following examples I will assume the list in question is called
my-list-name and list email address is
Normal user login
List email address = firstname.lastname@example.org
Password reminder, subscribe and unsubscribe
Archive - email history
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-name
Send blank email with subject of:
email@example.com (notice the
-request on the end)
List of members
Send blank email with subject of:
firstname.lastname@example.org (notice the
-request on the end)
Subscribe to list
Fill in “Subscribing to My-List-Name” section.
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.
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:
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.
@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
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.
+---------+--------------------------------------------+ | 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-| | +---------+--------------------------------------------+
We will now run the SQL that removes the last ‘-’ (minus or dash) from the post’s URL title.
For each record where the
post_urltitle ends 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.
One of the nice things about the N900 is the integrated address book. All contact details exist in the same place: telephone number, email address, SkyPe name, postal address to name but a few. You can also add auxiliary information too, like birthdays.
The calender scans the address book so that you get a nice little birthday cake icon on the day to show that it is someone’s birthday. If an event is a birthday it is automatically an all day event and appears in pink instead of blue.
This does lead to a couple of problems. Firstly there is no way to add a birthday event from the calender and secondly there is no way to add a birthday event for someone that is not in your contacts list.
I can live without the first problem it’s just a case of adding the one-to-one relationship from the correct side but the “not being able to add birthdays to people not in the address book” is a bit of a pain. I didn’t want to clutter up my contacts list with a whole load of casual acquaintances but I’d like to remember their birthdays. I suppose the idea is that all your contact information for a person goes into the same place. They may not have a mobile but they must live somewhere?
Well not sure if my second grumble is a worthy point, it’s just that when creating an event you can set the event type to N900 (Synchronised) or Private and it wouldn’t take much to add birthday into that spot too.
I keep this blog article as a place holder to collate all the issues I have with upgrading my Plesk server from 8.x to 9.3. Each time Plesk produces a new version there are always hacks and fixes that need to be applied to make things work. These days you have to be more than just a system’s administrator; you have to be a programmer and script’er. Luckily for me (and you) I am all three!
Spam is not filtered properly for a domain
The first manifestation of this problem is in the
/var/log/messages file. The following message repeats a couple of times a minute.
spam_hook[pid]: unable to open configuration file /etc/psa/psa.conf: Permission denied
/etc/psa/psa.conf file holds the locations to system resource folders used by Plesk, for example
PLESK_MAILNAMES_D which points to the root of the mail folders for each domain.
Checking the permissions of the file show that it is readable:
# ls -l /etc/psa/psa.conf
-rw-r–r– 1 root root 2564 Mar 9 15:16 /etc/psa/psa.conf
so the problem must be with one of the parent folders. If you didn’t have access to
/etc then almost everything would stop working and you would notice straight away. So the problem must be with the
/etc/psa folder. Checking that revealed a permission error.
drwxr-x— 5 psaadm psaadm 4096 May 6 12:02 /etc/psa
With the permissions set this way (750), the pop user and the spam filtering daemons would fail because they do not have the required permission to read the
In order to fix the problem we must allow all users to read files from that folder. We will add the execute permission to the folder to allow others to read a file if they explicitly know the name but won’t allow anyone else to view the contents of the folder or to alter anything in it.
Changing the permissions like so will allow the other programs and users to read the file.
chown 751 /etc/psa
which produces the file permissions:
drwxr-x–x 5 psaadm psaadm 4096 May 6 12:02 /etc/psa
There is no need to restart any services or reboot. Everything will just start working.