If I do virtual hosting using plone, I can't map a directory different than the plone named directory, otherwise, the icons on the navigation tree will not be shown.
I see the problem do not appear on others components that use the mime type icon, let me explain:
In plone.app.portlets-4.4.2-py3.7.egg/plone/app/portlets/portlets :
<img class="mime-icon" tal:condition="python:item_type =='File' and not supress_icon"
tal:attributes="href node/getURL;
src python:view.getMimeTypeIcon(node);">
This above will not work under virtual hosting, the URL will always be the Absolute URL, like:
src="/portal/++resource++mimetype.icons/pdf.png" />
While plone.app.contenttypes-2.1.2-py3.7.egg/plone/app/contenttypes/browser/templates/file.pt :
<img tal:attributes="src view/get_mimetype_icon;
alt content_type;" border="0" /
def get_mimetype_icon(self):
return super(FileView, self).getMimeTypeIcon(self.context.file)
Will work ok, and shows:
src="++resource++mimetype.icons/++resource++mimetype.icons/pdf.png"
I access the website throught mycompany.com/portal , so: in order to fix the above, I decided to rename /Plone to /portal and in this way I will have a 1:1 mapping, however, doing that broke all the plone.global_sections that appears to be hardcoded.
At the end I undo the above and created a new website under '/portal' and that is one solution, but not the solution that fixes the problem.