Fixing a “User::_load: Unable to load user with id:” error

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

ImageFirst 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

Your lack of “Created By” is disturbing…

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

Click the “Select User” button, and alter reality just enough to fix your site…

To fix the article, do the following:

  1. Open the article.
  2. 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.
  3. Select the new “Creator” of the article
  4. Save the article.
  5. 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. 

Discover more from PowerUser Guide

Subscribe now to keep reading and get access to the full archive.

Continue reading