If you are setting up a website for the first time using either the free WYSIWYG web editor Nvu or KompoZer, and you get the uninformative error message "Publishing Failed. Unknown publishing error occurred", know that you are not alone. Here are some pointers as well as a last resort measure to help you work around the problem.
Make sure that you know what the various fields in the Publishing dialog box really means. If you are not sure, check the following articles first.
For KompoZer users, see the first chapter of the tutorial (scroll to the bottom or near-bottom) How to Design and Publish Your Website with KompoZer at http://www.thesitewizard.com/gettingstarted/kompozer-tutorial-1.shtml
For Nvu users, see the first chapter of the tutorial (scroll to the bottom or near-bottom) How to Design and Publish Your Website with Nvu at http://www.thesitewizard.com/gettingstarted/nvu1.shtml
For Mozilla Composer users, see the first chapter of the tutorial (scroll to the bottom or near-bottom) How to Design and Publish Your Website with Mozilla Composer at http://www.thesitewizard.com/gettingstarted/mozillacomposer1.shtml
If you have not already read those tutorials, getting a description of the various fields may help you solve the problem yourself, particular if the error occurred as a result of a simple misunderstanding of where you should enter the various information about your site.
Note: due to the tediousness of having to say "Nvu, KompoZer or Mozilla Composer", I may sometimes refer to the trio as "Nvu" or "KompoZer" or the like. For the purposes of this article, you can take it that anything mentioned about one applies to all the others.
After changing settings in the Publishing dialog box in Nvu or KompoZer, quit the program and then restart it. If you don't, it may continue using the old settings in spite of your changes.
Use an FTP program to see if you can connect to your site. If you don't have one, there are a number of free FTP software around which you can use.
If you don't know how to use an FTP program, see my tutorial How to Upload a File to Your Website Using the FileZilla FTP Client, which presupposes that you are using a free FTP software called FileZilla. (Don't worry: the link to download FileZilla can be found in that article.) You don't have to actually upload anything for our purposes here, but the tutorial will teach you how to setup the program and use it to connect to your site.
Using the FTP program will help you verify a few things:
Did you get the login name (or username) and password correct?
Did you get the publishing address correct? Remember that the publishing address includes the initial directory. If you had to change directory in your FTP client to get to your web files, it means that you need to include that directory in your publishing address in Nvu and KompoZer.
If you are publishing your site to a subdirectory (folder) on your server rather than to your main web directory, connect using your FTP program and create the folder beforehand. This may (or may not) solve the problem.
If you have used an FTP software to check your settings or create a folder, then make sure you quit it before retrying Nvu or KompoZer. And while you're at it, quit Nvu and KompoZer as well, and restart it before testing again. Some web hosts, particularly the free web hosts, prevent you from having more than one FTP connections to your site. If you have an FTP program running at the same time as Nvu/KompoZer, the host will see an existing FTP connection, and refuse the one that Nvu/KompoZer is trying to make. Note that it is sometimes not enough to disconnect from your site in the FTP client. You should quit the program altogether in case the program is still maintaining the connection behind your back.
As a last resort, consider creating your website on your own computer using Nvu or KompoZer, and using an FTP program to upload it. If you have managed to successfully access your server earlier using an FTP client (see above), it means you already know how to use FTP and are no longer dependent on a WYSIWYG web editor to handhold you through that aspect of web publishing.
If you decide to use the FTP software to upload your files, make sure that you check all the links on your web pages in the "Source" mode of the editor. To do this, click the "Source" tab at the bottom of the web editor's window. Scan for all references to "href" and "src" to make sure that none of them point to destinations beginning with "file://". They should have relative addresses like "index.html" or "../images/tsw88x31tut.gif" or a fully-specified URL like "http://www.example.com/images/tsw88x31tut.gif".
For the curious, the "file://" references are normally fixed by the editor when it is uploading, but since you are not going to be using Nvu/KompoZer to publish, you need to fix them yourself. And remember to upload all your images, stylesheets and other files as well. Since you are doing it manually, you will no longer have the web editor to track all the dependent files for you. Be sure to upload them to the correct directories as specified by the "href" and "src" attributes. Or change the href/src accordingly to point to where you want them uploaded.
Diagnosing the cause of the vague "Unknown Publishing Error" messages can sometimes be quite tricky. The tips given here can help you to either fix the problem or provide you with a workaround so that you can get your website published on the Internet.
Do you find this article useful? You can learn of new articles and scripts that are published on thesitewizard.com by subscribing to the RSS feed. Simply point your RSS feed reader or a browser that supports RSS feeds at http://www.thesitewizard.com/thesitewizard.xml. You can read more about how to subscribe to RSS site feeds from my RSS FAQ.
This article is copyrighted. Please do not reproduce this article in whole or part, in any form, without obtaining my written permission.
It will appear on your page as: