I somehow managed to lose (?) a 'portal_groups' object, which I would like to restore. I've been reading through Products.CMFPlone and a few other products, but haven't yet managed to find the location where this tool is created or registered. The most irritating thing was that I couldn't find this thing in a new Plone 4 site which I created from scratch, either.
Hi Toni,
portal_groups is typically located at your Plone site root. You can inspect this by going through the Zope Management Interface (in short: ZMI), e.g. http://localhost:8080/Plone/manage (whereas "Plone" is the site id).
All tools in Plone are located as objects contained in the site root object, and are all listed when viewing /manage_main for your site (the Zope Management Interface, or ZMI).
This tool in particular, if it was accidentally deleted somehow:
Is necessary for site function, but
does not store data on its own, so you have lost site function, but not likely any data of value
Can likely be re-added in the Zope 2 ZMI by:
visiting /manage_main and navigating to the root of your Plone site in the ZMI
selecting PlonePAS Tool from the Add dropdown (possibly clicking the Add button after, I cannot remember, since this is changed in Zope 4+).
I tried, but that didn't work out too well because the old site also has some bad registrations that I'll need to get rid of first - they spilled over into the new site, so the new site was immediately broken.
Too bad most of those errors are in a PAS related custom product... so not easy to fix.