Today, after briefly recovering from migrating 50 or so sites away from a Hoster From Hell, I took some time to look at one of the error reports for a website. On one of the pages (A Category Blog), it showed the following error:
User::_load: Unable to load user with id: 48
After poking around in Joomla! and some Googling I found the solution to this problem.
The error itself
The error gives you an enormous hint about what’s going wrong: it can’t load a certain user. In most of the cases, this means that a user has been deleted. When the user was the creator of an article, published on a page, this error is shown.
How to verify this for yourself
First of all, open your User Manager and look at the ID’s. If you can’t find the ID in the list, the user has likely been deleted.
Find the article
Next, you’ll need to search the article(s) affected by removing the user. They will be reasonably(*) simple to find. In the Article Manager overview, they’ll show no information under “Created By”. Spooky!
Once you’ve detected the orphaned articles, you can either open the MySQL database and edit the created_by field with an ID of an existing user. This is by far the easiest way if you’ve got a lot of articles to fix. Otherwise, you can fix the articles from within Joomla!.
Fixing the article
To fix the article, do the following:
- Open the article.
- To the right, under “Publishing Options” click “Select User” next to “Created by”. Sure, we might be altering history just a little bit, but it’ll be worth it.
- Select the new “Creator” of the article
- Save the article.
- Repeat for any article if needed.
And Voila! If you open your website on the page that previously showed you the error, the issue should be resolved.
Although we used our own experiences, testing and experimenting to write this article, we also relied on this forum post to confirm our suspicions.