Consultation to fix a problem I created. :(


I'm looking for someone to give me a bid on fixing a problem I created. (See log file below)

this is Plone 6 classic installed via Docker on linux VPS server.. The issue is with the image "Plone6-backend". the other image is one i installed in a failed attempt to fix the problem. this second image isn't part of this problem

The problem was created when I tried installing Plone collective embed (collective.portlet.embed · PyPI) in Plone 6 classic. I had used this product in a previous setup and it solved a problem for me.

I didn't pay enough attention to the applicability to Plone 6. So, it installed properly (based on Docker logs); however, now I can't start either of my Plone instances (shit!).

I was wise enough to install on a test site; however, I was not wise enough to realize they share the same Zope instance - this caused both the test and the production site to be messed up

Basic question seems to be how to i undo the mistake and make my site happy again.

Anyone interested in looking into this issue and help fix, please contact me directly and I'll give the login credentials.

wayne glover

Log file (there is more but I thought this might be enough)

File "/app/lib/python3.11/site-packages/zope/configuration/", line 1077, in contained
return RootStackItem.contained(self, name, data, info)
File "/app/lib/python3.11/site-packages/zope/configuration/", line 897, in contained
factory = self.context.factory(self.context, name)
File "/app/lib/python3.11/site-packages/zope/configuration/", line 628, in factory
raise ConfigurationError("Unknown directive", ns, n)
zope.configuration.exceptions.ConfigurationError: ('Unknown directive', '', 'includeDependencies')
File "/app/etc/site.zcml", line 14.2-14.23
File "/app/lib/python3.11/site-packages/Products/CMFPlone/configure.zcml", line 118.2-122.8
File "/app/lib/python3.11/site-packages/collective/portlet/embed/configure.zcml", line 9.2
[rileygirl@125 ~]$

Hi Wayne,

I you haven't activated, used or "installed" the addon in your Plone site(s), you should be ok by removing the collective.portlet.embed dependency from you setup, release/make/build a new docker container and use that instead of the current. That should resolve this specific error, which prevents your app from starting.

tbh, if this is preventing starting up, you haven't been able to actually use c.p.embed I guess and we should be fine.

@jaroel thanks for the input.

Either I'm not understanding the solution or I'm not explaining the problem well enough as others have mentioned similar solutons. Let me try again with my explanation:

1, I created a Plone6 classic using Docker
2. for months I added content, products - all good.
3. then i added the referenced product (which I should 't have)
4. the site (from url) won't open
5. I went into docker and looked at the logs: (partial shown below).
6. the plone container was shown as "Exited" (i've seen this before - typically just restart)
7. ssh'd in and tried to restart Plone image - no luck.
8. I tried to bash in to rerun install , but can't work because site is down.

So, my question is:

I realize under the non-Docker installation method the files referenced by you and others would be available to me and i could manipulate them to salvage my site.

However, under Docker-installed plone I assume any of these files would be contained within the container and thus not accessible if the container can't be started. Is this true?

Thanks for any help. I've lost a lot of my work and would like to salvage it.


File "/app/lib/python3.11/site-packages/zope/configuration/", line 1077, in contained
return RootStackItem.contained(self, name, data, info)
File "/app/lib/python3.11/site-packages/zope/configuration/", line 897, in contained
factory = self.context.factory(self.context, name)
File "/app/lib/python3.11/site-packages/zope/configuration/", line 628, in factory
raise ConfigurationError("Unknown directive", ns, n)
zope.configuration.exceptions.ConfigurationError: ('Unknown directive', '', 'includeDependencies')
File "/app/etc/site.zcml", line 14.2-14.23
File "/app/lib/python3.11/site-packages/Products/CMFPlone/configure.zcml", line 118.2-122.8
File "/app/lib/python3.11/site-packages/collective/portlet/embed/configure.zcml", line 9.2
[rileygirl@125 ~]$

Please explain this step a bit more; ie, did you login to a container and modified a buildout.cfg, used pip install c.p.embed or something else?

We need to revert these changes, so your site can start up again. In the mean while it might be a good idea to figure out where your backups are (just in case). Do you happen to know how your database and blobs are setup? I want to make sure we don't make you do things that will destroy your data if we can prevent it.

hi @jaroel @espenmn Thanks for the reply

I used (pretty much) the following (i did replace CONTAINER with the proper docker container name. also, ignore the user name )

user@debian11:~$ sudo docker exec -it CONTAINER bash

root@8e6211328007:/app# bin/pip install collective.portlet.embed

response: Successfully installed collective.portlet.embed

root@8e6211328007:/app# exit

user@debian11:~$ sudo docker restart CONTAINER

I never installed in "apps" section of Plone as the site can't be started.

As for backups, i must admit I had planned on depending on CPanel for backup configuration - once i was done. So for now, assume I don't have a backup.

Anything bad that might happen to my data is my fault.

Previously, I've installed Plone via buildout and had a reasonable understanding of how that works.

This time i installed via Docker (which works well) I don't understand at all where the files for the Plone site would be. Inside the docker image?

I tried using bash to look inside the image; however, the message tells me the image must be running to use bash.

any help you can give me would be appreciated. If nothing can be done, i will manually recreate and consider this a (very tough) learning experience.

<includeDependencies package="."/>

<include package="plone.portlets" />

in collective/portlet/embed/configure.zcml

perhaps, this helps. I think the package need a little bit work for Plone 6.

afaict your should be able to uninstall using pip.

user@debian11:~$ sudo docker exec -it CONTAINER bash
root@8e6211328007:/app# bin/pip uninstall collective.portlet.embed

should give something like

❯ bin/pip uninstall collective.portlet.embed
Found existing installation: collective.portlet.embed 1.3.0
Uninstalling collective.portlet.embed-1.3.0:
  Would remove:
Proceed (Y/n)? y
  Successfully uninstalled collective.portlet.embed-1.3.0

Then try to restart your container. If you see stuff other then ^ weird stuff, please let us know.

I unfortunately cannot tell where your data is. Someone who knows a bit more about Plone+docker setup has to help out.

Hope this helps.

@jaroel Thanks again. It seems we have hit a dead end unless i can restart the image (which I can't because of the problem product.)

I tried to bash in using :

I got the error back (attached) stating that the container isn't running.

I think the issue is I can't do anything unless i can restart that container.

Unless you have another idea, I'll post on the community just about restarting a crashed/corrupted container.

thanks for all you help. if you have any other ideas, please let me know

i'm looking on docker community to see if there is an answer.

I'll post back if I find anything useful

Can you ssh in and edit the files jan mentioned?

no. the container/image can't be started.

I'm working on some troubleshooting of the container. i'll get back with any updates

Assuming you only have a volume for /data, than all your data is safely persisted. In that case, you can just remove the container and recreate it with the same options (volumes, variables, labels, etc). This way, none of the addons you installed using pip will be present (including collective.portlet.embed).

In the case you have made a volume for your eggs/weels you have a couple of options:

  • Delete the eggs volume or
  • Mount that volume in another container so you can manually remove the addon

On a side note, I recommend you don't install anything by bashing into the container and running pip, especially in production. Instead, create your own plone image with all necessary requirements. Remember that containers are disposable. It's easier to have your custom image and when you update it you can just recreate the container with the new one and be good to go.

Hi @lyralemos
thanks for your soltuion.

I want to make sure i understand something as this is the first time I've used Docker containers. I've created many plone sites using wget and understand the concept of data.fs.

However, the unknown for me is how Docker containers respond. So, I apologize but I need to answer some basic questions.

  1. I have the very basic setup of Plone - data.fs only (no external storage). I installed with something like: docker run -e SITE=themeadows -e TYPE="classic" -e SETUP_CONTENT=1 -p 8080:8080 plone/plone-backend:6.0.4 start.
    from that site I created a "classic Plone site". Just the very basic way.

  2. You state:

  1. when you say "remove the container" do you mean: "rm "? Would this leave the data.fs unhurt? That is what you call "safely persisted"?

  2. then i would recreate a plone site using the code in (1). Would the data (webpages) be there? how would the container know to use the old data.fs?

Thanks for any help you can give to allow me to understand how to salvage my site

If you did not created a volume for your Data.fs, then your data is NOT safely persisted.

That means, your data will not survive container recreation!

There is a example for creating a volume using compose in the docs:

Since you can't start it anymore, in order to retrieve your data, you'll have to find a way copy it out the container or into a volume. In a quick google search i've seem that you can commit your current container turning into a new image. You can use the new image to create a new container with a volume for /data.

I personally never done that in docker, but it seems possible.

hello I'm and trying to fix the issue using the google link you sent. I will be away for a few days and try again.

tbanks for the help