I have noticed on two Plone 5.1 sites that we experience a condition occasionally where the contents of a folder will show as empty, even if there is content present in those folders. This seems to happen if we have a url that has a repeating "word" at the beginning of its path.
For example https://somesite.com/plone/plone-five.
In the above example, if I remove the word plone from plone-five in the short name of the folder (plone-five in this case), the contents are displayed as expected.
I have tested this condition without front end webservers (nginx and apache).
There is no reason that this should be the cause of the problem.
I would try to reproduce the problem in an interactive session (i.e.
bin/instance debug or
bin/client1 debug). There try
f = app.unrestrictedTraverse("plone/plone-five") (the
unrestrictedTraverse partially emulates the Web traversal) and look at the contents of
f be empty, this would give an empty sequence. In this case, look at the path of
f.getPhysicalPath()) to find out which
f precisely was located.
If you mean
Thanks for the suggestions for those that replied. I will look deeper into this and report back. The odd thing is, some folders work fine. Its simply the ones that are named with duplicates of the URL path that break.
Interesting, I stumbled across something that seems to be the root cause, but not sure how else to fix/test. This particular server contains 12 other Plone sites. We used specific naming convention when naming our sites, using underscores. The sites that have the folder contents issue are ones that do not contain the underscore naming convention.
Here is an example:
siteone_somedomain_com is the name of the site in the ZMI. We can access this site by going to the server directly at http://someserver.com:8081/siteone_somedomain_com. If we create a directory named siteone-about... it works as expected.
Now, a situation that is not working.
siteone is the name of the site in the ZMI, accessed at http://someserver.com:8081/siteone. If we create that same folder... siteone-about. The folder contents are empty.
Definitely a bug; I wandered in here after a Google search for
plone folder_contents empty. The site is behind a VHM and if I navigated to https://mcl.REDACED.gov/mcl-sc-meetings/folder_contents it would indeed appear empty.
As soon as we renamed the folder from
mcl-sc-meetings to just
sc-meetings then the contents view worked fine.
This was on an older Plone 5.0.8 site; I do not have access to its logs, database, etc.