Visual Editor in WordPress is Missing or Broken
Visual Button Disappeared from the Word Press Blog Editor
I setup another blog for a friend this weekend. This installation went almost perfect except for one small nagging issue.
Problem Description
When we installed WordPress onto his host and logged in for the first time we noticed the “Visual” button was missing from the WordPress Editor. It only gave him the option to write his posts as HTML, and all the buttons that are associated with Visual Editor were missing as well.
Troubleshooting
We thought it might have been a problem with how the files had been uploaded to his host. His hosting service has a very poor FTP system which errored out three times while we were upgrading to the latest version of WordPress.
We uploaded the files again to make sure nothing was corrupt. Once we had done this we deactivated any plugins that were running to make sure they were not causing issues either.
After looking on the WordPress forums and realizing other people were running into this issue, we checked around for people’s recommendations.
A lot of the advice on the forums was that it was some sort of bug in WordPress, or that you needed to install TinyMCE or TinyMCE Advanced. Unfortunately none of these answers were the “True” answer.
It turns out the problem is much easier to fix than most people think.
Solution
This may vary depending on your situation but what we found was that this was actually an option that needed to be toggled within WordPress itself.
There is a setting in Word Press that allows users to disabled the Visual editor if they choose not to use it.
To turn the Visual editor back on and get your “Kitchen Sink” back you need to go into:
Users > “Your Username” > Visual Editor (At the top of the screen)
Because this was a new installation of WordPress this option had apparently never been enabled (although it is usually on by default). When I create user accounts, it is usually just to give someone access to an existing blog and this has never been an issue.
Near the Visual Editor Option make sure there is a check mark in the box next to “Use the visual editor when writing”.
Once this is done scroll to the buttom of the screen and click the “Update Profile” button. WordPress will now save your user settings and you should now have access to the Visual Editor once again.
Detailed .HTACCESS Setup Information for WordPress Blogs
Today’s guide is going to cover creating and setting up an .HTACCESS file for your web server and blog. This will allow you to create custom rules for how traffic and server requests to your site are handled.
I have broke the guide into sections based on questions I had when going through this project and learning how to configure the .htaccess file myself. You can follow the entire guide if you would like a detailed overview or read the title of each section to find the information you need.
(WARNING: Always backup your HTACCESS file before making any changes. This way if a change you make affects rules that are already in use they can be restored.)
01. What is HTACCESS and what does it do?
The .htaccess file is the default name of a configuration file that specifies rules for the way in which requests to a web server are handled. This can be something as simple as a 301 redirect from an old page to a new page (in the case that the old page has been removed or renamed) to something as complex as changing the format in which permalinks are displayed on your site.
It can also cover advanced functions like blocking specific IP addresses, or specifying file permissions on the web server.
02. How can I create and setup an .htaccess file
To setup an .htaccess file you need to first create the file itself. To create the .htaccess file, “right click” on your desktop and select the “New” > “Text Document” option.
Once you have created this file name it “htaccess.txt”. We will be changing this later but you need to do this to create a file we can edit. If you try to add the period before the file name (which is needed when the file is on your server) you will get a Windows error message that states.
** Rename ** You must type a file name
The reason this happens is because Windows will not handle files that start with a period, but unix and linux systems will. The htaccess file is a common component found on Apache web servers which are usually loaded on these types of systems.
To get around this we will make our changes to htaccess.txt in Windows, and then upload this file to the web server where we will rename it to .htaccess
To create a basic rule set for your .htaccess file you will need to copy the following code into the top of your text file.
RewriteEngine on
Followed by whatever rules you would like to assign for how your webserver should handle various requests. For our example lets assume you have an old website with a bunch of articles that you have converted into a blog.
To redirect traffic from existing links that point toward old HTML files, and send them through to the main page of your new site you could use the following command in your .htaccess file.
RewriteEngine on
RewriteRule ^([a-z]+).html$ /directory/newpage.html [R,NC,L]
Where /directory/newpage.html would be the location where you would like to send this traffic.
In the above example the carrot ^ designates that the base directory of your site is where the .htaccess file is located. (example www.yoursite.com). The .htaccess file must be located in the root directory of your website to work properly.
The $ indicates the closing of the rule or function you are specifying in your file.
You will see these used in other rules that can be used in the .htaccess file. For a comprehensive list of these commands and rules check the following link:
HTACCESS Configuration, Rules and Settings
The web server I was working on was a friend’s website which is hosted by Netfirms. If you are working with an htaccess file on a Netfirms account refer to the following documentation for examples of htaccess commands.
Netfirms HTACESS Command Examples
03. Windows will not let me create a file beginning with a period? What do I do?
As I mentioned above this is not a problem. The way to get around this is to take the htaccess.txt file we created and to copy it to the root directory of your web server via FTP. (of however you transfer your files.) Once the file has been transferred to your webserver it can be renamed to “.htaccess” because it is no longer on a Windows system.
Make sure that if you have an existing .htaccess file on your web server that you back it up. You don’t want to lose the file by overwriting it as it may already be specifying rules that are in use on your server. This is almost definitely the case if you are running a blog.
04. When I uploaded my .htaccess file the links to articles on my blog stopped working!?! HELP!
Uh oh! It sounds like you overwrote the existing htaccess file on your web server. Not to worry…
WordPress will create an htaccess file on your web server by default when you specify any custom permalink structures for your blog. This means if you have gone with the /%postname%/ option a lot of authors recommend, WordPress will have written a custom htaccess file to implement this permalink structure throughout your site.
To resolve this issue you need to recreate this file so the article links will work again. This can be done by going into your blogs admin panel, and selecting the “Settings” > “Permalinks” and clicking “Save Changes”. This should recreate your WordPress htaccess file and restore your broken links.
05. WordPress is overwriting my .htaccess file?
Yes. WordPress will overwrite your custom htaccess file if you upload one to your server and then change anything in the permalink options within WordPress, or load a plugin that utilizes these features.
This will cause your htaccess file to be overwritten and you will lose any changes you have made.
06. I need to use custom rules in the .htaccess file in addition to the changes WordPress makes. How can this be done?
You can actually edit the htaccess file that WordPress creates and add your own custom rules to it. This is very helpful if you are maintaining a large site or are converting old HTML documents to a blog format and need to redirect old links.
To do this you first need to generate the WordPress htaccess file. This can be done by following the steps in part #4 of this guide.
(Go into “Settings” > “Permalinks” > and click “Save Changes”)
Once you have done this, you should see an htaccess file appear in the root directory of your webserver. Copy this file to your computer via FTP so that you can edit it on your local machine.
You will notice that since you have copied the file from the web server, it has a file name that starts with a period and Windows will allow you to modify and save this file. (even though it wouldn’t allow us to name the file like this before.)
Open your file in a text editor so that we can make the necessary changes and apply your custom rules.
We are looking for an area in the file that looks like this:
# BEGIN wordpress
<ifmodule mod_rewrite.c>
rewriteEngine On
rewriteBase /
rewriteCond %{REQUEST_FILENAME}!-f
rewriteCond %{REQUEST_FILENAME}!-d
rewriteRule . /index.php [L]
</ifmodule>
# END wordpress
If your code looks different than this it is most likely because your looking at the file in notepad. We will actually need to use a proper text editor to modify this file correctly. If you do not already have one read sections #7 and #8 for a good free PHP editor.
Once you see the block of code I referenced above you will need to make the following change. Add this block of code above the “# BEGIN wordpress” section in the file:
<ifmodule mod_rewrite.c>
RewriteEngine On
CUSTOM RULES ARE ADDED HERE
</ifmodule>
Once you have done this your file should look similar to the example below:
<ifmodule mod_rewrite.c>
RewriteEngine On
redirect 301 /olddirectory/oldpage.htm http://www.newsite.com/
</ifmodule>
# BEGIN wordpress
<ifmodule mod_rewrite.c>
rewriteEngine On
rewriteBase /
rewriteCond %{REQUEST_FILENAME}!-f
rewriteCond %{REQUEST_FILENAME}!-d
rewriteRule . /index.php [L]
</ifmodule>
# END wordpress
The rule above is just an example. For more information on htaccess rules refer to section #2 and the links provided for the proper use of different rules and functions.
Now that you have made the listed changes you can upload the htaccess file back to your web server and overwrite the old one. (As mentioned before always backup the old htaccess file incase something goes wrong.)
The file should now utilize your custom rules in addition to allowing WordPress to update the file as needed without overwriting the changes you made.
The custom rules need to be listed outside of the “# BEGIN wordpress” tag and need to come before this function to avoid being overwritten by WordPress.
You should now be able to test your custom rules by trying to access old files on your server. If run into an issue triple check your rule syntax to make sure it is correct as this could cause a problem.
(Keep in mind that you cannot easily test custom rules by overwriting your WordPress htaccess file with one you created in Windows, because any permalink structures you reference will be destroyed when you overwrite the WordPress generated htaccess file on the server.)
From here any issues you might be running into will most likely need to be researched in Apache help for htaccess or on various forums. Good luck!
The following sections provide additional information on other issues that may come up during the process I outlined, or questions people may have that were not covered in the previous sections.
07. When I open the .htaccess file created by WordPress it is garbled, and shows carriage return characters. (Squares)
It sounds like you are looking at the file right through notepad. To display the information correctly you need to download a proper editor. Since we are working with PHP files for most things with our blog we should download a PHP editor to use with our files.
08. Where can I get free PHP editor software for editing my files?
When I was working on this issue the other day I came across a great free editor called “Arisesoft Winsyntax”. It is a very small download, does everything I need it to do, is easy to use, and is completely free to use.
You can download it from the authors homepage here:
09. I have seen the custom .htaccess code created by WordPress mentioned on other blogs but no one has told me where I need to go to find and edit this code.
The code be located in the custom .htaccess file that WordPress creates on your web server. Follow the steps outlined in section #4 of this guide to create the file.
Once the file appears on your web server in your root directory you will need to download this file to your computer so you can edit it. Open this file in a text editor (as outline in sections #7 and #8 and you will see the code people have been referring to.
10. I am trying to create some custom rules for an old site that I am converting over to blog format, but some of the pages I am trying to redirect are not working. It seems like .htaccess is ignoring these files?
Hmm. It could be a number of things. The main cause I found for this issue is that the file you are trying to reference in your .htaccess file is using characters that are not “web friendly”.
In my friends case they had created file names like index[new].html and new page title.htm
.htaccess really seemed to take issue with the fact that they were using strange chacters like ] [ and spaces in the file names. Always make sure you are using web friendly file names and urls to help minimize potential problems down the road.
Overview
I hope this guide has helped answer some of the questions people may have about creating and setting up the .htacess file. This information can be used for a standard server also, but a lot of the situations I outlined pertain specifically to WordPress blogs.
If you have any questions of comments please feel free to post, and I will try to answer them if I can. I am not an .htaccess guru by any means. I am just outlining the pitfalls I ran into to help others avoid these problems.
Thanks for checking out Pseudorant. We appreciate the support!
Wordpress Stats Plugin is not Working or Gathering Information
WP Stats is not displaying any information for my blog!
If you are a blogger then you probably use the WordPress Stats plugin. For those who don’t, it is a plugin that gathers various statistics from hits to your blog. It gathers information on the number of page views, the most popular posts, search terms people use to find your blog, what sites send send you traffic, and lot of other great stuff.
Now imagine how lost you would be without this information. I recently ran into a situation where this was the case, and after a little research I was able to find out why WP Stats was not working on this particular blog.
I was helping a friend get their blog setup, and we ran into quiet a few issues. They were transferring an old website they barely maintained over to a blog format to make it easier to update and manage the information they already had.
During all the troubleshooting involved in switching the old site over to a blog, I noticed the WordPress Stats plugin was not gathering data. I tried several things to fix this, deactivating and restarting the plugin, re-entering the API key, checking settings in the admin panel and on WordPress.com, uninstalling and reinstalling the plugin, updating the plugin. None of this seemed to work.
Then I came across a post on the WordPress.com forums talking about this issue. Apparently on some themes there is a function that is left out of the footer that is needed for WP Stats to work correctly. If this is the case with your theme, that is probably what is causing the problem. To fix this you need to go into the “footer.php” file in your theme editor.
In the footer.php file scan to the bottom and look for the “</body>” tag [without the “ “]. Once you have found the tag you will need to insert this line of code above it:
<?php wp_footer(); ?>
Once that is done update (save) the file and then test WordPress Stats to see if it is working.
You may want to do this by logging out of your blog admin panel, and them clearing your cookies and temporary internet files. Once you have done this go back to your website and browse through a couple pages and this should generate a couple page views in WP Stats.
You need to make sure you are logged out of admin, and to clear your temp files or else your blog will not count hits from you because it will think you are the admin.
Hopefully your WP Stats plugin should be working now, and you will see your test page views showing up in the stats. If you see those page views WordPress Stats should now be working correctly.
Thanks for checking out Pseudorant. We appreciate the support!
The Address Book Failed to Load. Outlook Express…
…is incorrectly configured, please re-install.
If you are reading this article right now because you were searching for this through Google I am sure you are not too happy. I don’t blame you. Let me guess, Outlook Express is on the fritz, it won’t open (or it will but all you get is the mentioned error) you can’t get your email, and you are being told to reinstall the program but you were never given a disk to do this. Sound about right?
It will be okay. I have been there too. This issue was one of the main experiences that made me decide to switch over to Linux but I want to share my story to help others that are running into this problem.
I am going to outline what caused the problem. Things I tried that didn’t fix the problem, and the way I finally resolved the issue.
CAUSE:
A corrupted or damaged Address Book in Windows.
When I came across this it was because the Address Book in Windows became corrupt after I deleted all the contacts from it at once. I was working on a clients PC and she had upgraded from Windows 2000, to XP.
When we backed up her address book and exported the CSV file some of the information did not get copied to the correct columns. To fix this I manually edited the CSV file in Excel to put the data into the proper fields. Once this had been done I deleted all the contacts so I could re-import the corrected list.
Unfortunately Outlook Express (or Windows) does not like when you delete all the contacts. This can sometimes lead to a corrupt address book, which will lead to the above error message.
FIXES (That do not work)
Now it’s funny that Windows tells you to reinstall Outlook Express because the program actually comes embedded in the operating system. Don’t mistakenly think that a Microsoft Office disk will correct this because the mail client MS Office installs is “Outlook” and not “Outlook Express”.
So because the program is embedded in Windows you cannot reinstall it in any traditional way. Going into Program Files > Control Panel > Add Remove (Windows Components) will only actually remove shortcuts from the Desktop or Start Menu.
So now you would think the logical thing to do to fix software that is embedded into your operating system is to do a Windows “Repair”.
This was a huge mistake on my part. Because I had all the most current Windows updates and I did the Windows repair this forced Internet Explorer to roll back from 7.0 to 6.0. Because IE and OE are embedded in your OS, and are tied so closely together this totally borked Outlook Express. Now the program wouldn’t load period. *sigh*
So after checking online for some other ways to “reinstall” Outlook Express someone recommended that installing the latest service packs should take care of the problem.
I went ahead and downloaded all the latest Windows updates and got the program back to a point where it would startup. Although I was still getting errors when I tried to access the address book.
Other methods that failed to work were the numerous registry fixes people recommended, or programs that supposedly repaired corrupted DBX files.
Finally I came across a blog with a fix that was written out so easy I was sure it was bound to fail. It’s funny how sometimes the most simple solutions are no where to be found on the internet or the Microsoft support pages about their own software. The solution went as follows:
SOLUTION:
The solution was to rename the file extension on any instances of the Windows Address Book that show up on the system. To do this you need to first open a search window.
Start Menu > Find > Files or Folders
In the search field type
*.wab
This tells the computer to search for any files that end with the WAB (Windows Address Book) extension. Make sure you have selected the “All files” option in the search window so it is not limited to a specific type of file.
When the search is complete it might have found a couple files with the WAB extension. Right click on each file and select the “Rename” option.
(You need to make sure you can see the file extensions in order to rename the extension. If you cannot see the file extension open Windows Explorer (Start > Run > Explorer > Enter) and go into Tools > Folder Options > View, and uncheck the option for “Hide Extensions for Known File Types“. You should now be able to see and rename the file extension.)
Rename the file/s from “Addressbook.wab” to “Addressbook.old”. Once they are renamed the system should no longer be able to find the existing address book, so when you re-launch Outlook Express the program should create a fresh address book from scratch.
This will not help you recover data but it will allow you to access your address book once again. From here you can re-import your old address book data to recover your contacts. If you did not back up this data beforehand you will need to recreate your contacts, but hopefully this will have helped get you to a point where this is possible.
Thanks for checking out Pseudorant. We appreciate the support!
“Database Locked” After Adept Manager Crashed
The Problem
If you have ever used the Adept package manager for Kubuntu (or other Debian based systems running KDE) you already know how valuable a tool it can be. It provides a very convenient way to install new software and keep your system updated. However, when such a convenient tool suddenly stops working, it can be very disorienting.
This is exactly what happened to me last weekend when I was trying to setup Eclipse on my PC. For those of you who haven’t heard of Eclipse, it is an Integrated Development Environment (IDE) that can be extended with plugins to support new languages, debugging tools, analytic tools, and more. I was planning on using it to manage some of the PHP projects I have been working on lately. I selected Eclipse from the Adept window and installed it, but it only came with the most common languages such as C, C++, and of course Java.
After searching online, I found out that there is an Eclipse project called PDT (PHP Development Tools) that provides exactly the functionality I am looking for, so I started to follow the instructions on the Eclipse PDT page (http://www.eclipse.org/pdt/) to install it on my PC. Since Eclipse is Java based, it needs to run on a Java Virtual Machine.
Unfortunately, the JVM that comes bundled with Kubuntu is GCJ (GNU Compiler for Java) and the Eclipse PDT instructions said that either a Sun or IBM Virtual Machine would be necessary. Luckily that is already a package in Adept, so naturally I selected it to install and clicked next to continue. This was a big mistake apparently, since I overlooked the little checkbox for “I agree”, which you need to scroll to the end of the End User License Agreement (EULA) to even see.
This caused Adept to crash, and it crashed hard. When I tried to open it again it said “Database Locked - Adept Manager” and then a short message that another process had locked the package database - even after restarting my PC. I could still open Adept, but only as read-only which makes it pretty useless.
I could go on and on about how it should have just aborted if I didn’t check the “I agree” box, instead of breaking Adept altogether - it’s not like anyone reads the EULAs anyways, but that’s a rant for another day.
After a little bit of Googling, I found a few posts on the official Ubuntu forums of others who were having similar problems, and one of them (http://ubuntuforums.org/showthread.php?t=348952) had a simple solution using only two commands…
The Solution
To fix the “Database Locked” message, you will need to open a terminal window. To do this, go to the K menu, then to the System submenu, and select Konsole - Terminal Program. Then just type the following two commands one at a time:
sudo apt-get -f install
sudo dpkg –configure -a
That’s it! The first command tries to automatically fix any broken dependancies, which for me just gave an error message. I’m not entirely sure if it is necessary but I would run it anyway. The second command tries to “reconfigure all unpacked but unconfigured Debian packages” (according to the man pages). This ran for a moment listing a bunch of packages, and when it finished I was able to run Adept once again!
I’m not sure whether the culprit for this problem was Adept or the Sun JDK package. I had read about other specific packages causing this problem with Adept, but that doesn’t tell me anything. All of the pages I came across recommended these steps or something very similar. Since this was the simplest approach and it worked like a charm, I would recommend you start with this. As always, you can search the Ubuntu forums or use Google if this doesn’t work.
