I'm getting an error when trying to save edits in my custom component.

I have another edit.php that works well.

I identified that the problem lies in the table file, specifically in the function check().

When I have the function in my table file, whenever I save the edit, it gives me an SQL error:

`table_users` was not locked with LOCK TABLES

When I take the function out, it gives me a different error (the weirdest part is that even with the function not being there, it still says the function name):

Error Save failed with the following error:
Invalid parent_id [0] in PrefixNameTableTableName::check()

The problem is that I don't need parent_id. How can I solve it?


1 Answer 1


I have found a solution:

1 . Verify your table file (make sure the table and the class name is correct).

2 . Make sure your class (in table file) extends JTable and not JTableNested if you don't need parent_id.

3 . Verify all of your class and table names.

4 . Make sure your database user has permissions.

  1. You can also uninstall and reinstall your component (don't forget to fix the database before reinstalling it)

You can fix the database by going to

Extensions > Manage > Database

then click on "Fix"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.