Plone 6 Classic with Mosaic - No module named ''

I'm trying to use Mosaic in 2022 on Plone 6 classic but coming upon the following error

  File "/home/code/", line 872, in finish
    args = toargs(context, *self.argdata)
  File "/home/code/", line 1702, in toargs
    args[str(name)] = field.fromUnicode(s)
  File "/home/code/", line 173, in fromUnicode
    value = self.context.resolve(name)
  File "/home/code/", line 225, in resolve
  File "/home/code/", line 5, in <module>
    from import isDefaultPage
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/code/", line 8.4-17.10
    File "/home/code/", line 16.2-16.23
    File "/home/code/", line 118.2-122.8
    File "/home/code/", line 10.2-10.47
    File "/home/code/", line 35.4-35.34
    ModuleNotFoundError: No module named ''

I checked on and definitely no longer includes defaultpage, but it seems the standardtiles still believe that it should be there.

For now I'm paring down the site to avoid depending on Mosaic and exploring creating views using just tiles where needed.

David, always check the issues :slight_smile: Plone6 broken, defaultpage moved to plone.base.defaultpage · Issue #135 · plone/ · GitHub

Thanks @mtrebron
It's definitely an issue. Working around it for the moment. It either means

  1. fixing the imports in all the dependent packages
  2. fixing defaultpage back to how it worked
  3. dance around the issue by avoiding anything that is broken by this

#2 sounds like the simplest but I may be missing something.

Interesting... fixed in code here: at main · plone/ · GitHub
but not in the zcml - this might be trivial to fix, rather than paring down the site

Actually, was fixed already: at main · plone/ · GitHub

Ah... so pin a newer version of it seems.

I think so, and ask @mauritsvanrees for a release of and inclusion in Plone 6b3

What's the protocol? Do I just say hey @mauritsvanrees please release a new version of in the next Plone 6 release...
Open an issue?

Either of those will work.

But the new version is already included in 6.0.0b2. Problem is that you have to include explicitly. It is not pulled in by versions.cfg anymore.

1 Like

Ah!... thanks @mauritsvanrees
@petschki gave me the heads on using the versions-ecosystem.cfg trying it out now.

Since my Dockerfile is based on a pip-based install. I created a requirements.txt file from the versions-ecosystem.cfg file.
This is what my Dockerfile looks like now:
I stuffed all the ecosystem and extras into a requirements.txt
(@mauritsvanrees a ecosystem-requirements.txt to complement the ecosystem.cfg file would be helpful, I think.)

FROM plone/plone-backend:6.0.0b2

COPY src/site.profile /app/src/site.profile
COPY src/plonetheme.fourteen /app/src/plonetheme.fourteen
COPY src/site.content /app/src/site.content
COPY src/site.plone /app/src/site.plone
COPY src/site.customviews /app/src/site.customviews
COPY src/requirements.txt /app/src/requirements.txt

RUN apt-get update \
    && apt-get install -y --no-install-recommends gcc \
    && rm -rf /var/lib/apt/lists/*

RUN /app/bin/pip install --editable /app/src/site.content \
 && /app/bin/pip install --editable /app/src/plonetheme.fourteen \
 && /app/bin/pip install --editable /app/src/site.profile \
 && /app/bin/pip install --editable /app/src/site.plone \
 && /app/bin/pip install --editable /app/src/site.customviews \
 && /app/bin/pip install -r /app/src/requirements.txt \
 && /app/bin/pip install "collective.exportimport==1.5" "collective.easyform==4.1.0" already contains the ecosystem.

Also, you may want too look at mxdev and read Install Plone backend from its Packages – Step by Step – Install — Plone Documentation v6.0-dev

@jensens I have a question...
What if I want to use a package on the filessystem as a custom source?

I get that, by convention, mxdev expects to find a requirements.txt and a constraints.txt and relies on a special .ini file to override the configuration with custom packages, the result is a single requirements-mxdev.txt with all needed packages.

The example in the docs shows adding a custom package from a git source....

pip install mxdev
mxdev -c mx.ini

pip install -r requirements-mxdev.txt

The example of an mx.ini file was this:

# constraints of Plone packages
version-overrides =

url =
branch = master
extras = test

What if my source files are on the filesystem (ie. not in a git repo),
can my url be the path to my source on my filesystem?
Something like this...

url = src/my.package
extras = test

Thanks @jensens

Read this, there are clues to solve question

@1letter so basically you append filesystem sources to your requirements.txt...

-e src/my.addon
-e src/my.addon[test]

:thinking: interesting... your example is free but it certainly provides a direction.

you will install your local addon. this happens via pip. is today only useable for checkout via vcs, e.g. git

Point 3 in Overview

Reasonable. I suppose I can live with that.

You have those in filesystem only? I usually put those in git repositories too.
If in FS only, it is enough to add -e src/my.package to the requirements.txt no additional magic needed.

I have a monolithic setup (all project code in one repo), on purpose (it fits the current use case).

I have a semi automated process which builds everything each time I commit my monolithic repo.
The customisations are stored in a src/ folder.
For this reason I'll be using the -e src/my.package approach.

1 Like