Skip to main content

Invalid field: Created by

You open an existing article in Joomla, make a minor change, click Save, and get the message “Invalid field: Created By”. The article can no longer be saved. In the English-language interface, the exact same error is called “Invalid field: Created By”, often accompanied by a message such as “Cannot find user with ID: 67”.

The cause is almost always the same: the user who was once linked to the article as the author no longer exists. When saving, Joomla checks whether the “Created by” field refers to a valid user; if it cannot find that user, it refuses to save. Below, you’ll find how to resolve this on a per-article basis, how to tackle it in bulk via the database, and how to prevent it from happening again.

Why this error occurs

Every article stores the ID of the user who created it in the `created_by` column. If you later delete that user (for example, a former employee or a test account that has been deleted), that ID simply remains attached to the article. The user is gone, but the reference remains.

As long as you don’t touch the article, you won’t notice anything. It’s only when you open and save it that Joomla validates the author field. The link points to an ID that is no longer in the user table, and you get the error “Invalid field: Created by”.

For a while, this was a recognised bug in Joomla 4 ([issue #41008](https://issues.joomla.org/tracker/joomla-cms/41008)), which meant you literally could no longer save the article. This has been fixed in more recent versions of Joomla, but that doesn’t automatically resolve the underlying data issue (an author who no longer exists). The solutions below work on all versions.

Solution 1: Change the author for each article

For one or a handful of articles, this is the quickest and safest option. You do not need database access.
  1. In the admin panel, go to Content and open the relevant article.
  2. Click on the ‘Publication’ tab.
  3. The ‘Created by’ field will show a reference to the deleted user. Click on the user icon and select an existing user, for example your own admin account or a general editorial account.
  4. Save the article. The error message will have disappeared.

Please note: this cannot be done via Batch

You might expect to be able to do this for multiple articles at once using the Batch function in the article list. However, this is not possible. Joomla 5 and 6 do not have an option to change the author via Batch. If you have hundreds of articles by a deleted user, the database is the only efficient way to do this.

Solution 2: in bulk via the database

If you have many articles with the same deleted author, you can replace the old user ID in one go via phpMyAdmin or Adminer.

First, make a backup of your database. An incorrectly executed UPDATE without a WHERE clause will affect all your articles at once, and you won’t be able to undo that without a backup.

First, identify which articles have a non-existent author:
SELECT id, title, created_by
FROM `#__content`
WHERE `created_by` NOT IN (SELECT id FROM `#__users`);
 
Then replace the old ID with that of an existing user:
UPDATE `#__content`
SET `created_by` = 42
WHERE `created_by` = 67;
 
Here, `67` is the ID of the deleted user (as shown in the error message, “Cannot find user with ID: 67”) and `42` is the ID of the existing user to whom you are assigning the articles. You can find the ID of that new user in the admin panel under Users, in the ID column.

Replace `#__` with the actual table prefix for your installation. This is specified in your configuration and will be something like `jos_` or a random string such as `xy7k2_`.

If the author issue also appears in the “Last modified by” field, you can resolve it in the same way via the `modified_by` column. A `modified_by` value of `0` is normal and simply means that the article has never been modified. Leave it as it is.

The same problem in other sections

The author field isn’t limited to articles. A deleted user can trigger the same error message for contacts, categories, news feeds and banners. The approach is identical; only the table and column names differ.

Pay close attention to that difference. Articles, contacts, news feeds and banners use `created_by` and `modified_by`. Categories and tags use `created_user_id` and `modified_user_id`. If you use the wrong column name, the query will return an “Unknown column” error.
 
ComponentTableAuthor columns
Articles #__content created_by, modified_by
Contacts #__contact_details created_by, modified_by
News feeds #__newsfeeds created_by, modified_by
Banners #__banners created_by, modified_by
Categories #__categories created_user_id, modified_user_id
Tags #__tags created_user_id, modified_user_id

For categories, the query looks like this:
UPDATE `#__categories`
SET `created_user_id` = 42
WHERE `created_user_id` = 67;

How to prevent this in future

The error is not a Joomla vulnerability, but a consequence of deleting a user who is still linked to content. Two best practices will help you avoid this.

Block an account instead of deleting it when someone leaves but their content needs to remain. A blocked user can no longer log in, but the author link remains valid and you’ll never get an invalid field.

If an account really must be removed, first assign the content to someone else. Change the author on the relevant articles (or run the UPDATE query) before you delete the user, not afterwards. That way, there will never be a moment when an article points to a non-existent ID.

Also, keep Joomla up to date. The old blocking bug has been fixed in newer versions, so on an updated site, the worst you’ll encounter is a cosmetically incorrect author rather than an article that won’t save.

Frequently Asked Questions

Which user should I choose as a replacement?
An existing account that will remain active, preferably a general editorial or administrator account rather than a personal user account that might be deleted later.

Is the UPDATE query safe to run?
Yes, provided you make a backup beforehand, enter the correct IDs and use the correct column name for that table. The WHERE condition ensures that only the articles belonging to the deleted user are updated.

I’m not confident working with the database. What should I do then?
For just a few articles, stay in the administration interface and change the author for each article via the Publication tab. If there are hundreds of items and you’re not confident using phpMyAdmin, have the bulk edit carried out by someone who manages Joomla databases.

Will I get the original author back?
No. The user has been deleted, so that name is gone. You can only assign the articles to an existing user. If you still want to display a name without an actual account, you can use the “Author Alias” field in the backend.
Jeroen Moolenschot

About Jeroen

I have been working with the Joomla! CMS since 2006. Besides building and maintaining Joomla! websites and webshops, I am also familiar with search engine optimization (SEO), Joomla hosting and developing templates and extensions. Furthermore, I am a frequent visitor and speaker at JoomlaDays and various Joomla user groups.

I am committed to the Joomla! community as a member of the Extensions Directory team and the organization of Joomla user group Breda and JoomlaDagen Netherlands. In short: Are you looking for a Joomla Specialist, you should contact me!

Popular articles

You are a spammer, hacker or an otherwise bad person

The message "You are a spammer, hacker or an otherwise bad person" is not coming from Joomla itself…

Sorry, your PHP version is not supported

From Joomla 4 onwards, you can no longer use PHP versions lower than 7.2 . In Joomla 5, the minimum…

Could not connect to MySQL

When you see a white screen saying "Error displaying the error page: Application Instantiation Erro…

Cannot write to log file

When someone tries to log in with incorrect login credentials in the administrator area of Joomla…

JFolder::create: Could not create directory

"JFolder :: create: Could not create directory" is a common error message. You may encounter this e…

Save failed with the following error: Null primary key not allowed

While saving an article, you encounter this error message "Save failed with the following error: Nu…