Skip to main content

Joomla! 2.5: Another LDAP (?) Issue

This one was really driving me crazy. Really.

But we can't blame LDAP for that, at least I don't think so...

We have a LDAP authentication set up which is working really well. Except when a user enters a wrong password - then he just gets a blank page. The same is the case for articles with a user restriction (user need to be logged in to view the article) - again, just a blank page.

Turns out the blank page is not as blank as it seems - the source is there, including a nice error message. And a line somewhere in the head saying


A lot of research took me to this page, and I decided to try the following, out of some instinct:

"Comment out line 823 (or thereabouts) in:
libraries> joomla > html > html> behavior.php
$document->addStyleDeclaration('html { display:none }');
To comment out, just add 2 slashes "//" in front of the line."

Works like a charm. I am afraid the change will be undone by the next Joomla update, but I'll try to report a bug. In the meantime I hope this helps. Happy coding!

edit: Someone reported a bug on a similar problem, seems like version 2.5.9 will not have this line any more. See here.


Popular posts from this blog

Joomla! 2.5: Multiple views, one model

Here goes MVC again: I was a bit confused that every time I created a second or third view for a component, I had to create a separate model for it. Did not make sense to me - I had the necessary algorithms in the model for the first view, did I really need to do copy & paste? I hate it! Redundancy, redundancy, redundancy.

That case occurred in my current project - I created user profiles and needed an "edit" view. The data is the same, but I need to have the data in editable text fields instead of fixed labels, and maybe some other buttons here and there... 

Well, some time later I realized that I just did not quite understand what Joomla! acutally means by "view".  And that there is something called "layout".

Long story short: If you have a model that provides all necessary information and you just want to have a different presentation of it, just add a new .php file to your views/<yourviewname>/tmpl folder - let's call it "layout2&q…

Pi Access Point with RTL9182CU-Adapter

Well, I tried a long time and this is mainly a note to myself:

go here first:

then go here:

you do not need to fix the Invalid Argument error, just apply the WPA-Supplicant fix from here:

Recover Joomla PhpMyAdmin MySQL Database

This morning I found myself confronted with a new problem:

Our server crashed, we had to set it up again - from scratch. Fortunately, we did have some backups - the Joomla! files, and the mysql folder (on Linux: /var/lib/mysql).

(We are using a Linux server with mysql and phpmyadmin.)

I then tried to recover our database. What I thought: Just copy the contents from the database backup folder (mysql/joomla) to the mysql folder on the server and everything should be fine. That was what they said on the internet, too. Turns out there were only .frm files in that folder, no .myd etc. Turns out that .frm only contains the table structure. But where is my data?

Everything's not lost.

I found a huge file in the mysql backup folder, called ibdata1.

So what you need to do now is (instructions are for Linux):

- Stop your mysql service
  sudo stop mysql
- Copy that ibdata1 file to the /var/lib/mysql folder (consider making a backup of the existing ibdata1 file)
  cd /var/lib/mysql
  sudo mv ib…