FAQ Database Discussion Community


How to transfer a structure from one Plone to another

plone,data-migration,plone-4.x
I have a Plone instance which contains some structures which I need to copy to a new Plone instance (but much more which should not be copied). Those structures are document trees ("books" of Archetypes folders and documents) which use resources (e.g. images and animations, by UID) outside those trees...

Plone/IRelatedItems- How can I programatically set relatedItems of a dexterity content type?

python,plone
In an event, IAfterTransitionEvent, I'm trying to capture the event of an object being published and when the object is published, two objects are created and I want to relate. In the type xml file of the object that's being published, I added to behaviors: element value="plone.app.relationfield.behavior.IRelatedItems" So that I...

“TypeError: make_staticdir() got an unexpected keyword argument 'document_root'” running Diazo through Proxy

python,plone,diazo
I exactly followed the steps on the Diazo quickstart guide hosted at docs.plone.org (docs.diazo.org is out of date as I write this in April 2015) and received a strange error when I attempted to execute the final command bin/gearbox serve --reload -c proxy.ini. This error prevented me from continuing and...

full text searching for various external formats plone 4.2

plone
I wanted to enable full text searching in plone 4.2(windows).I ultimately installed Products.OpenXml and ftw.tika addon using buildout and properly adding their packages in eggs as well as zcml category, after which they both show in portal_transforms tools. i.e included this in buildout.cfg and ran it. eggs = Products.OpenXml ftw.tika...

Migrate Plone users and groups to relational data

plone,plone-4.x
I have a Plone 4 site which contains a lot of users and groups which are stored in the ZODB. Over time, we added some functionality which uses relational data (in a PostgreSQL database); some tables have fields which contain user or group ids. However, currently the users and groups...

Error while starting Plone instance

osx,python-2.7,plone
I'm trying to run Plone on my mac. but I couldn't its showing the following message. Any idea about how to fix this? learner-Mac:zinstance learner$ ./bin/instance fg 2015-02-14 17:14:37 INFO ZServer HTTP server started at Sat Feb 14 17:14:37 2015 Hostname: 0.0.0.0 Port: 8080 2015-02-14 17:14:39 INFO DocFinderTab Applied patch...

Upgrade step to remove profile

plone,upgrade,genericsetup
We have one package that we identify that we don't need its profile (collective.js.cycle2) so I need to write an upgrade step to remove the existent profile. Looking at the code I usually have to update profile, I found that in the end it calls: portal_setup.runAllImportStepsFromProfile(profile, purge_old=False) Is it a...

Plone - Syntax Error when doing hello world tutorial

syntax-error,plone
I am following this "hello world" tutorial on plone.org But I stuck in one moment due to error: [email protected]:~/Plone/python_dev/env-27# cd hello_world [email protected]:~/Plone/python_dev/env-27/hello_world# ../bin/python bootstrap.py Traceback (most recent call last): File "bootstrap.py", line 70, in <module> exec urllib2.urlopen(setup_url).read() in ez File "<string>", line 1 <!DOCTYPE html> ^ SyntaxError: invalid syntax I...

Ploneboard conflict with AccessControl?

plone,zope
i’m trying to install the latest Ploneboard (v3.6) on a Plone 4.2 site, but getting the error The version, 2.13.11, is not consistent with the requirement, AccessControl>=3.0 i see that the most recent Ploneboard change log for this version mentions "Fixed dependency for AccessControl. Plone < 4.3 have an old...

Plone- In a dexterity.EditForm why is attempting to disable a widget causing a ConstraintNotSatisfied error?

plone,dexterity
I'm trying to disable a widget in a dexterity.EditForm, but I'm getting an error . Here is a part of my interface class with the particular widget I want to disable class IRestaurant(IPlace): restaurant_code = schema.TextLine(title=_(u""), required=False, ) IPlace is a form.Schema that IRestaurant inherits from. (from plone.directives) Here is...

Dynamically change dropdown options for one field, after setting another field in a dexterity form.Schema

python,sql,forms,plone,dexterity
i'm failing at dynamically changing the dropdown options for one field, after setting another field in a dexterity form.Schema. the vocabularies are based in a sql database. specifically i want to update the vocabulary options for township after selecting the county. right now i am just pulling the full list...

Dealing with the error: A different document with value xxxx already exists in the index

plone
What would cause multiple documents on my catalog to have the same "unique id"? Effectively an error like this: ERROR Products.ZCatalog A different document with value 'xxxx341a9f967070ff2b57922xxxx' already exists in the index.' And how do I go about fixing it?...

Usage of ZODB temporary storage

plone,zope,zodb
In plone.recipe.zope2instance there is an option called zodb-temporary-storage that is used to replace Zope's default temporary storage definition. When is this recommended? What are the upsides and downsides?...

Redirecting Site Root URL to its Language Root Folder

plone
Environment: Plone 4.3.4.1 , plone.app.multilingual 2.0.0 (from github) I have two Plone sites, both with p.a.m enabled, but they behavior differently when visiting to their site root URL. Say, visit http://www.site1.com/ will redirect to http://www.site1.com/zh , that is what I need. But http://www.site2.com/ will show its item listing, that I...

Mobile app marker for Plone / Diazo

android,ios,iphone,plone,diazo
I'd like to consume some of my Plone site content on my mobile app (iPhone and Android), and potentially use Diazo to deliver leaner content for the mobile app. How can i add a marker that indicates i am coming from the mobile app that i can then use in...

Obtaining the “default” mockup TinyMCE configuration on Plone 5

tinymce,plone,plone-5.x
I'm trying to configure TinyMCE inside Plone 5 template (so: not the z3c.form widget type). Using the TinyMCE Mockup patter you quickly learn how to display a rudimentary TinyMCE configuration (without any i18n support). But how I can get the "default" configuration applied to TinyMCE when it's loaded for default...

Javascript form processing issue in Plone

javascript,plone,plone-4.x
I have an HTML form created in a page in Plone that is to process Javascript code I have been given upon submission. The Javascript has been placed in plone_skins > custom. The code is to check for a keyword in the URL calling the page, which indicates the address...

Can I use plone.protect 3.0 with Plone 4.3?

forms,security,plone,csrf,plone-4.x
Since version 3, plone.protect provides automatic CSRF protection. Plone 4.3 includes, by default, plone.protect 2.0. Can I just upgrade to start using this feature in Plone 4.3?...

How to hide a fieldset (tab) in Plone add/edit form

plone,fieldset,dexterity,z3c.form
I have some code in dexterity content type, as below: form.fieldset( 'transitionsLog', label=_(u"Transitions Log"), fields=['t_log'] ) form.mode(t_log='hidden') t_log = schema.TextLine( title=_(u'Transitions log'), ) In add/edit form, the field t_log hide but fieldset tab 'Transitions Log' still show at form, as above... I have no idea to hide "Transitions Log" tab...

Custom dimension in collective.googleanalytics report

python,google-analytics,plone,google-analytics-api,plone-4.x
I'm using collective.googleanalytics (https://pypi.python.org/pypi/collective.googleanalytics) to add some GA reports to a plone site. How can I use custom dimensions (like ga:dimension1 or ga:dimension2) in a new google analytics report? I can't see any related option in Query Dimensions field....

When not using UnifiedInstaller, why is sys.path not populated?

plone,buildout
When using zc.buildout to install Plone without the UnifiedInstaller, the resulting bin/buildout script has a truncated sys.path. I am used to seeing pages of eggs listed there, where I now only see these: import sys sys.path[0:0] = [ '/home/campbell/Plone/repos/bika.uw/lib/python2.7/site-packages', '/home/campbell/Plone/repos/bika.uw/eggs/setuptools-15.1-py2.7.egg', ] When running bin/zeoserver and bin/zeoclient, everything works as expected...

Can zope.publisher.browser.BrowserView be used in Plone?

plone,zope,zope3
Given that Products.Five is an integration layer to make the Zope Component Architecture (ZCA) usable in Plone: Is it possible to use zope.publisher.browser in Plone or do I have to use Products.Five.browser to import BrowserView? The former produces a traceback: 2015-06-04 14:47:02 ERROR Zope.SiteErrorLog 1433443622.720.549321919726 http://localhost:8080/Plone/@@hello Traceback (innermost last): Module...

What is the way to know a Zope permission title by knowing its id (and vice-versa)?

permissions,plone,zope,zope3
On Zope and Plone you can register permissions like this: <permission id="choosen.id.for.your.permission" title="Old Zope 2 permission, shown in ZMI" /> What is the way to get the permission's title from Python when you know the permission's id? I mean something like: >>> something_magic.get('choosen.id.for.your.permission') 'Old Zope 2 permission, shown in ZMI'...

What's the buildout:zcml option for?

plone,buildout,zcml
In one of my projects' buildout.cfg files I have something like this: [buildout] ... zcml = my.package plone.reload ... Everything works fine but I'm still puzzled about what's the reason some packages do need to be listed here and why others don't. What's the purpose of it to begin with?...

How do I override the main template in Plone 3?

plone,zope,plone-3.x
I'm working on a theme product for Plone 3.2.3. My theme product works perfectly on the default Plone installation. However, when I apply it to our existing site all the features of my theme are applied except the modifications to the main template. The product file structure is based on...

How can I run archetypes.querywidget test suite locally?

testing,plone
I need to make a fix at archetypes.querywidget and it's buildout is not creating the bin/test script. Should I use buildout.coredev? do I need to change it's checkouts to run the tests?...

Create copy of plone installed onto another server with data

python,linux,plone
To create another exact copy of the plone install running along with data, is it sufficient to copy buildout.cfg and Data.fs with same version of Plone on the other install? Does it restore the uploaded pdf and image files that have been done on the first server? Using plone 4.2.1...

Multiple contact forms in a Plone website

python,plone,plone-4.x
I have /contact-info, as default contact page (http://docs.plone.org/develop/plone/functionality/contactform.html) for my plone website. I want to add a new contact page for a subfolder but with different settings (like from email address and fields). I'm trying to create a new contact page using Products/CMFPlone/skins/plone_templates/contact-info.cpt as model, but I think maybe it...

How to change portlet order (put parent portlets first)

plone
How I can reorder the portlets so that inherited, parent portlets come before the current item's portlets?

I'd like to add a table style, like the ones that appear in the tinyMCE style combo box, not the table properties box

tinymce,plone
When you go through the choices for the tinyMCE "style..." combo box, there is a section for styling tables, cells and rows. How can I add another of these? It doesn't seem to match up with the options in TinyMCE settings -> styles. ...

Does Plone 4.1 use KSS? Can I disabled JS and CSS files associated with KSS safely?

plone,plone-4.x,kss
Does Plone 4.1 use KSS? Can I disable JS and CSS files associated with KSS safely? I see this in the documentation: http://docs.plone.org/develop/addons/javascript.html?highlight=kss#id27 but my Plone 4.1 site still loads files as ploneKss.css, at.kss, plone.kss, etc. Is the plone site still functional (working) without these files?...

Where is the main space used up in Plone file upload?

plone,zodb,plone-4.x
In plone I have uploaded only 800 GB of data (mainly pdfs), it has occupied already 2 TB of hard disk space. Where exactly is the space being used up? I am using collective.documentviewer with its default settings. and plone 4.3. Are files stored by documentviewer changed to various image...

Plone 4 : How to customize a method in Archetypes content types?

adapter,plone,archetypes,plone-4.x
I have tried, under Plone 4.3.3, to customize a class method of an archetype content type in one of my products. I have a product bsw.produit_1 with a content type MyContent defined as follows: class MyContent(base.ATCTContent): implements(IMyContent) meta_type = "MyContent" schema = MyContent` def ma_fonction(self): ...... return res I want...

LookupError on form render if RelationChoice field in custom Dexterity type is not required

plone,dexterity
I have some custom Dexterity types with RelationChoice fields. Everything works fine except that if I set the required property of the RelationChoice field to False, I get an error when trying to display the edit form. This is how one of these custom types look like: class ISceneFolder(model.Schema): """...

Does Reinstalling a product run all the upgrade steps in Generic Setup?

plone,genericsetup
It seems some steps are not being run. Am I missing the place where I should specify these?

How to set Plone to redirect to came_from after logout

python,plone,plone-4.x
I want to set a plone website to redirect to came_from parameter in url after user logout. For login I set string:${globals_view/navigationRootUrl}/login?came_from=${context/absolute_url} and it is working. For logout this is not working. I tried also with its event: <subscriber for="Products.PlonePAS.events.UserLoggedOutEvent" handler="blabla.goCameFromAfterLogout" /> using: def goCameFromAfterLogout(event): """ Redirects user to came_from...

How to declare a subscriber that will be enable for only one plone site?

plone
In a Plone instance I have two plone sites. In one of them, I have a product dedicated to it. I want to declare a subscriber in that product for Products.PluggableAuthService.interfaces.events.IPrincipalCreatedEvent that will be fired only for this plone site. I have tried with zcml:condition="installed my.product" but it test only...

In Plone, how do I fix Archetypes content that is missing the cmf_uid() annotation?

plone
I'm using Plone 4.3 with relstorage and I've somehow managed to lose the cmf_uid annotation on some of my content objects. This prevents collective.iterate from being able to check in content. Is there an easy way to have Plone walk through the database and re-add cmf_uid where it is missing?...

How to register a browser layer programmatically

plone,genericsetup
I know that a browser layer can be registered using GenericSetup and one XML file, but I need to make it programmatically. Is this possible?...

How to restore Plone 3?

plone,plone-3.x
I have a folder backup of a plone 3 instance and I want to run it in a VirtualBox with Debian 5. I installed a fresh plone 3.3.5 into /usr/local/Plone as root with the unified installer and I can start it with ./bin/plonectl start. So what are the next steps?...

Plone Archetypes redirection after creation

python,redirect,plone,archetypes
I've searched in Internet for a while, but I haven't found out anything useful... I want to do something as simple as redirect the page to the listing page (folder) after save/create an AT content type. I already know I have to use validate_integrity.cpy and write my redirect's logic there,...

How to change the content of viewport property of meta tag in Plone 4.1?

plone,plone-4.x
How can I change the content of viewport property of meta tag in Plone 4.1? For example: Plone defines: meta name="viewport" content="width=device-width; initial-scale=0.6666; maximum-scale=1.0; minimum-scale=0.6666" But I need: meta name="viewport" content="width=device-width, initial-scale=1" How I can do this?...

How to conditionally require a field based on a selection in a form?

forms,plone,z3c.form
I am using Plone and z3c.forms. There is a field at the top that selects what content object we are creating. It then shows the fields needed to build that object. I need to be able to conditionally require fields based on what content object is selected at the top...