Problem
When saving a new or existing article you receive the following error message
Save failed with the following error: Invalid Parent ID
The article saves correctly, and is accessible from the front end.
Solution
This issue appears to be caused by corrupted categories, and in my case happened during the migration from Joomla 2.5 to 3.
The solution is to rebuild the menus, categories and replace the category parent item.
How to rebuild the menu items
- Click on ‘Menus’ and select the menu item you are going to rebuild – if you have more than two you will need to repeat this process for all menus
- Click on the select all box to select all menu items then click on the ‘Rebuild’ button
- The ‘Successfully rebuilt’ message will confirm the menus have been rebuilt.
- Repeat for any other menus you have.
How to rebuild the categories
- Click on ‘Content’ and select ‘Category Manager’ from top the menu
- Click on the select all box to select all category items then click on the ‘Rebuild’ button
- The ‘Categories tree data successfully rebuilt’ message will confirm the categories have been rebuilt.
How to rebuild the categories
- Click on ‘Content’ and select ‘Category Manager’ from top the menu
- Click on the ‘New’ button and create a new temporary menu item
- Name the temporary menu item ‘temp’
- Use the item count drop down to select ‘All’
- Use the select all box to select all the items, then un-select the temp menu and the parent menu (in this case Main content)
- Then click on the ‘Batch’ button
- Under ‘Select Category for Move/Copy’ select the temp menu
- Ensure that ‘Move’ is selected then click ‘Process’
- Repeat Steps 7-12, this time moving to the parent menu.
- Trash the temp category.
Now the problem should be resolved – no more error message, no more corrupted categories.