A simple blank line + PHP = Problems with WordPress 2.5.1 (The headaches of a Blog)

The symptoms I observed in blog, published in WordPress 2.5.1, were as follows:

  • I could not edit messages in visual mode ,
  • Syndication was not working properly RSS
  • Slow blog, not too much but if a low performance.

Each of these symptoms, separate solutions are found.

The edition in Visual mode does not work:

When you create a new Post, the editor window shows the two options, Visual and Html, but although the "Visual" option is highlighted, the editor really shows the Html options. Also, even if you try to change to Html it is still "Visual" Highlight.

For this problem I found many indications and varied (all of course in perfect English), one gave me the joy that by turning off all installed plugins it became to see the editor correctly, but when going again "Activating" one by one to see which one could create the conflict, it did not "diagnose" it, since with all the plugins of new assets, it was still seeing correctly the "Visual" mode of the editor.

Although the problem had been solved for the time being, it did not last long, because the next morning he stopped seeing in the "Visual" mode. I had not solved it, but it was an indication that the problem could come from a plugin.

RSS syndication did not work correctly:

Of this problem my account of chance, when using another tool 20 (netvibes.com), of which my RSS gave error. When checking it directly from my blog, I received an error response never seen by me ..:

The address does not correspond, but serves as a courtesy for another of the texts that helped me get to the problem ..
This error if it is quite documented, for example in

 XML reading error

XML reading error in WordPress – aferve :: Ideas and Projects – aferve :: Ideas and Projects [19659009] From here if I really took out the problem, what was causing me so many headaches was simply this:

"The cause of this error is very simple but what is difficult is finding the exact line or lines of code where the problem is And is that due to a wrong manipulation of some script or the installation of a plugin, there may be some blank line before the start tag "<? Php" (or "". "

Now I just was to find the happy line in white. But that was the solution?

Primary problem that created all these secondary problems:

This whole problem is preceded by another one that took a few days too giving problem (Really the transition from WordPress 2.3.3 to 2.5.1 has been easy with respect to the CMS, but the theme of plugins has not been so much, not all work correctly in both versions).

My previous problem I have already solved this bounce, but this has been the announcement of new posts in the blog, for this I had been using the Subscribe2 plugin for a long time, although it has always worked for me in fits and starts. but from the act ualización to 2.5.1 of WordPress, the shipment did not work daily, not like that if I configured it for every hour (digest). This plugin (Subscribe2 by Matthew Robinson .) uses the own mailer function of php for sending mail, and is supported by WordPress cron. Even having the WP-cron installed correctly and using another cron control plugin to force its execution and check if its operation was correct (WP-Crontrol by Edward Dale) . I could not send daily shipments. In addition this plugin creates a "summary" messages that although it allows to parameterize them, there is nothing "aesthetic", because if you try to give it some style with html, the deliveries do not work correctly, which would appreciate a small help of "possibilities" to make the most kind messages for the readers.

Reading and reading forums, I came to one in which I recognized these problems and blamed them on the php's own work, (I'm not going to get into any doubts of any kind), it just looked like option, the creation of a plugin to use an SMTP server to send WordPress emails. So I did, to create that plugin simply created a new file and copied the php code that indicated. Checking the code (with my limited knowledge of php), I saw that it did not have any weird function, more than the own use of SMTP server data and it believes it.

This is where the whole problem occurred … not because the plugin was wrong, or it was nothing weird. the plugin worked, the mail was activated correctly. etc etc. But in the creation of that .php file to solve the problem of sending the daily Subscribe2 emails, create a cascade of errors in the blog, the visual editor, the rss, slowness … etc …

What was the problem? Simply that when creating that new PHP file for the new plugin, I had given an ENTER at the end of the code, after the end "?>". That blank line at the end of the whole .php file was creating all these related problems within the blog. A SIMPLE LINE IN WHITE .

Evidently when removing it disappeared ALL problems.


A simple blank line can produce an incredible headache when it comes to plugin for WordPress 2.5.1. – Zaragoceando.com

NOTICE : this publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading …

That may also help you: