We have seen similar issue and the cause of this error is usually that a custom resource was being used along with a manual join vs the Auto PK. There could be some profiles that don't not have that custom resource defined. This usually resolved by rebuilding and relinking the custom resource. You can check either the profiles need to be linked to the custom resource correctly or the resource should be removed.
Take a look at the custom resources under Administration > Development.
In custom resources, check if there are any links to "profile" using manual join conditions (not using the auto pk but some custom fields)
If there is then the profiles which don’t have this custom resource defined will show the error.
We need to link custom resources to that profile to fix this issue.