plone

Cleanup unused blobs in filestorage in Plone

≡放荡痞女 提交于 2019-12-11 01:20:44
问题 Is there a way to find and remove unused blob storage space in a Plone site? I'm looking for something like bin/zeopack , but that detects unused blobs in the blobstorage directory. 回答1: The ZODB takes care of unused blobs by itself. Packing will remove blobs together with removed transactions as required. 来源: https://stackoverflow.com/questions/13938983/cleanup-unused-blobs-in-filestorage-in-plone

Logger does on work in RestrictedPython script in Plone

我的未来我决定 提交于 2019-12-11 00:08:39
问题 How to print in a .cpy file (python) ? I'm using Zope/Plone and I've just started with Python. I've tried this import logging logger = logging.getLogger() logger.info("hello plone") But it doesn't work. Thank you for your answer 回答1: The answer above means that you cannot import any modules in RestrictedPython scripts which are through-the-web editable Plone scripts. These scripts have end-user permissions, so they are not allowed to run arbitrary Python code. http://collective-docs

New theme product gives “ValueError: Theme my.theme is not available”

怎甘沉沦 提交于 2019-12-10 22:09:05
问题 I have created a new theme via zopeskel using these instructions http://docs.plone.org/adapt-and-extend/theming/theme_product_with_diazo.html However trying to install the product, I get the error: Module plone.app.theming.exportimport.handler, line 38, in importTheme ValueError: Theme hccrems.theme is not available I'm not sure what my theme is missing as I have followed through the doc twice. src/hccrems.theme/hccrems/theme/configure.zcml http://pastie.org/9142461 src/hccrems.theme/hccrems

Failed Plone 4.1.4 install: lxml build failed: libxml2:

六月ゝ 毕业季﹏ 提交于 2019-12-10 20:31:31
问题 Expected Outcome: Successful installtion of Plone 4.1.4 Actual Outcome: Installation fails with: libxml2: cmmi failed: Stack: Ubuntu Ubuntu 10.04.4 LT (Lucid) Apache 2.2.14 Plone-4.1.4-UnifiedInstaller Install System Libraries, Header Files, etc root@li54-28:~#apt-get update root@li54-28:~#apt-get install g++ python-dev python-setuptools python-lxml python-libxml2 libxml2-dev libxslt1-dev openssl subversion Install Plone joeblow@li54-28:~/Plone-4.1.4-UnifiedInstaller$ ./install.sh standalone

How to send mail with attachments in Plone using a template approach?

老子叫甜甜 提交于 2019-12-10 20:25:14
问题 I've been reading the official docs about sending emails from Plone using some templates, and it's working so far. My question is: how do I add attachments using the template approach? 回答1: The MailHost.send command takes both python (unicode) strings and email.Message objects. That means you can use the python email package to construct a proper MIME message with attachments. The standard library includes a great page of examples; any text can still be generated by templates just like in the

Customize the search portlet in Plone for specific content types

青春壹個敷衍的年華 提交于 2019-12-10 17:47:10
问题 I'm using the search portlet in certain areas of my website, but I'd like to restrict the results to only search for a specific content type: for example only search the news items, or only show Faculty Staff Directory profiles. I know you can do this after you get to the @@search form through that "filter" list, but is there a way to start with the filter on, so that the "Live Search" results only show the relevant results (i.e. only news items or only profiles). 回答1: I suspect you know it

How light weighted Dexterity-base contenttype can be

妖精的绣舞 提交于 2019-12-10 17:15:40
问题 I'm trying to write a light weight content type that work similar to Facebook's post. The whole content schema is just a text field. There's no title, description. It must be Contentish and is managed by CMFCore: It must have an FTI, a portaltype so that we can create/browse content through standard method; it is catalog-aware. They will have relation/reference within each others. The number of objects is gonna be huge, say 10-100M. The most similar things to this is the comment object (plone

Plone: Upgrading jQuery

蓝咒 提交于 2019-12-10 16:15:03
问题 Using the jQuery SlickGrid plugin with Plone 4.1 and trying to resize a grid column trips up this jQuery 1.4.4 error, which has been fixed in more recent versions. Is it possible to upgrade the core version of jQuery as used by Plone, and if so, how can this be done? 回答1: Updating jQuery in Plone is not trivial because many scripts (including the integration of JQueryTools) depend on jQuery 1.4. JQuery is part of Products.CMFPlone. Thus, the update may break features. Discussions are underway

Plone full text indexing Excel files

China☆狼群 提交于 2019-12-10 15:46:14
问题 how can I customize Plone search engine in order to actvate full text indexing of excel files? I have already installed pdftotext and wv for pdf, word files full text indexing. 回答1: If you add Products.OpenXml to your instance eggs and install it in Plone you can index modern Office formats, at least .docx and .xlsx. For plain old Excel (.xls) files this does not work. I tried it in a Plone 4.3.2 buildout config a few weeks ago: [instance] eggs = ... Products.OpenXml [versions] # You need a

Renaming my.packages to my.package

喜欢而已 提交于 2019-12-10 14:21:30
问题 my.packages is a custom archetypes package in the src directory. Thousands of items in the Plone instance are added with its types. I want to rename the package as my.package. By simply uninstalling my.packages and installing my.package, I find http://localhost:8080/mysite/myfolder/my-item showing <persistent broken my.packages.content.mytype.MyType instance '\x00\x00\x00\x00\x00Un^'> . Should I have to do migration? Or is there a simple way to fix this issue? 回答1: You can create an alias for