[Product-Developers] why is folder content not shown?

2012-03-27 Per discussione Maarten Nieber
Hi, I have a Folder (state: Private) that I am viewing using my admin account. The view (folder_listing) tells me that There are currently no items in this folder.. However, inside the folder there is a Page instance (state: Published). If I go to the Contents tab of the folder, this Page

[Product-Developers] collective.recipe.backup: confused about names of snapshot files

2012-03-23 Per discussione Maarten Nieber
Hi, when you create a snapshot backup with bin/snapshotbackup, it adds new backup files of the filestorage to var/snapshotbackups (e.g. 2012-03-23-12-47-20.dat, 2012-03-23-12-47-21.index, 2012-03-23-12-47-20.fsz) and to var/blobstoragesnapshots (e.g. blobstorage.0). Now I would like to

[Product-Developers] cannot remove workflow state, it seems

2012-03-22 Per discussione Maarten Nieber
Hi, I removed some states from my workflow, and created this update step: def upgrade_21_to_22a(setup): setup.runImportStepFromProfile('profile-abb.types:default', 'workflow') This is the typical upgrade step for workflows that I always use. However, when I run it, the old

Re: [Product-Developers] Not allowed to upload a file of this type to this folder

2012-03-16 Per discussione Maarten Nieber
Gauthier, Marcos, thanks, this solved the problem! I did notice some strange behavior: I first had to add an Image instance with the Add New menu. Only then could I upload an image inside the TinyMCE editor. This will maybe confuse my users, but at least I will have the solution ready if it

Re: [Product-Developers] Layout problem: Plone seeing a ghost portlet?

2012-02-20 Per discussione Maarten Nieber
Hi Espen, I'm a bit reluctant to post any HTML, because it comes from a private intranet (so also there is no URL you can access). In the page source, I can see only one instance of dl class=portlet somePortlet (which is correct, because I only have one portlet). However, since the page

Re: [Product-Developers] Layout problem: Plone seeing a ghost portlet?

2012-02-20 Per discussione Maarten Nieber
I managed to reproduce the problem in my local machine. A debug session inside SunburstView.getColumnsClass reveals that in the right column, there are two portlets, of which one is available (called 'news'). When I go to the @@manage-portlets view, it only shows (in the Parent portlets

Re: [Product-Developers] Layout problem: Plone seeing a ghost portlet?

2012-02-20 Per discussione Maarten Nieber
Does this happen everywhere ? or just for some content (a specific view or content type) ? It happens everywhere. I tried to get rid of the 'news' portlet (see my previous post) by adding it in the manage-portlets view and then removing it, but that does not help.

[Product-Developers] Layout problem: Plone seeing a ghost portlet?

2012-02-17 Per discussione Maarten Nieber
Hi, Plone is apparently reserving space on the right side of the screen for a portlet. However, I only have a portlet on the left side. The rendered template contains this HTML code div id=portal-column-content class=cell width-1:2 position-1:4 which was put there by the function

[Product-Developers] Useful/possible to pack the blobstorage?

2012-02-13 Per discussione Maarten Nieber
I noticed that the blob storage for my Plone intranet has gotten huge: 10 Gb (it's huge because I'm only storing some images and texts in my intranet). It's still manageable, but downloading a backup of the blobstorage to my local machine is already a bit painful, and I'm afraid it might get

Re: [Product-Developers] Useful/possible to pack the blobstorage?

2012-02-13 Per discussione Maarten Nieber
ajung lists@... writes: Packing affects of the Data.fs and the blobstorage. Or? I just packed the database on my local machine (filestorage:60 mb, blobstorage: 2.5 Gb) and the filestorage was reduced from 60 to 30 mb, whereas the blobstorage remained the same size. So it seems that the

Re: [Product-Developers] get catalog from Nothing

2012-02-07 Per discussione Maarten Nieber
Simone Orsi simahawk@... writes: It seems you're right http://svn.zope.org/zope.site/trunk/src/zope/site/hooks.py? rev=113062view=markup Thanks for pointing out :) Sorry for the late reply, but thanks, it's working! ___ Product-Developers

Re: [Product-Developers] IObjectAddedEvent fires 5 times instead of 1 time

2011-12-23 Per discussione Maarten Nieber
Believe it or not, that's normal (I thought it was only _four_ times, but I'll believe five. Not much you can do about it. Thanks, that's good to know. I was about to to some more debugging, but now I will just work around the problem. ___

Re: [Product-Developers] Products.ZCatalog A different document already exists in the index.

2011-12-23 Per discussione Maarten Nieber
Test if the folder already exists before creating it. Kind regards, Bas Roijen Sorry, I forgot to mention, my view function checks if the contents were already created. The subfolders are only created once: class HomePageView(BrowserView): def createSubFolders(self): if

Re: [Product-Developers] Products.ZCatalog A different document already exists in the index.

2011-12-23 Per discussione Maarten Nieber
I narrow the problem down to these calls self.currentArtists.reindexObject() self.currentArtistsEnsHanVisitat.reindexObject() self.pastArtists.reindexObject() These three calls are causing the ZCatalog error. If I leave them out, and drop in the debugger later and call reindexObject on these

[Product-Developers] why is my view not used?

2011-12-22 Per discussione Maarten Nieber
Hi, I switched from dexterity to archetypes, and have some problems getting my template to use my view object. I am following the example.archetype example, and would like to use my MessageView class in the template. However, it is not using my view, but instead it is using SimpleViewClass.

Re: [Product-Developers] why is my view not used?

2011-12-22 Per discussione Maarten Nieber
tal:content=python:view.blah() When I try this, again, it seems its using SimpleViewClass and not my own view class. Module zope.tales.tales, line 696, in evaluate - URL: /home/mnieber/code/cm/elmolino.buildout/src/elmolino.backend/elmolino/backend/br owser/instantmessage.pt - Line

[Product-Developers] strange unauthorized exception in unit test

2011-12-22 Per discussione Maarten Nieber
Hi, for some reason, I get an Unauthorized exception when I instantiate the HomePage content type in my unit test (with the website, there is no problem). The 'needed' field of the exception is empty. The rolemap.xml does get loaded (any syntax error there will stop the test), and Since I

Re: [Product-Developers] strange unauthorized exception in unit test

2011-12-22 Per discussione Maarten Nieber
I corrected one mistake (portal_workflow should be portal, but the test result is still the same: invokeFactory produces an UnAuthorized exception) self.assertTrue(permission in testUtils.portal.possible_permissions()) ___ Product-Developers mailing

[Product-Developers] IObjectAddedEvent fires 5 times instead of 1 time

2011-12-22 Per discussione Maarten Nieber
Hi, I registered a handler for the IObjectAddedEvent, but it gets fired 5 times instead of one (I have a set_trace in the event handler), one time when before the add page for the new IHomePage instance is shown, and various times after clicking Save. Also, the second time I get the pdb

Re: [Product-Developers] Some way to avoid propagating permissions?

2011-12-19 Per discussione Maarten Nieber
I agree: add a placeful workflow policy via Site Setup then on the folder in question use the State-Advanced menu to add that policy on the current folder. You will be able to select your static workflow for the current folder and any other workflow you want for children of the current folder.

Re: [Product-Developers] zope.Schema field for referencing an object?

2011-12-16 Per discussione Maarten Nieber
ComponentLookupError: ((zope.schema._field.InterfaceField object at 0xb2f95cc, HTTPRequest, URL=http://localhost:8080/em/etapa- nova/++add++elmolino.types.artist), InterfaceClass z3c.form.interfaces.IFieldWidget, u'') /home/mnieber/.buildout/eggs/zope.component-3.9.5-

Re: [Product-Developers] (help!) How to set site root permissions in the web interface?

2011-12-09 Per discussione Maarten Nieber
Go to the security tab of your site and play with your permission/roles settings it until you're satisfied Hi Gilles, thanks for the suggestion. Most pages in the website are related to a content type, and I know how to set permissions for these. The site root however is not an instance of a

[Product-Developers] (help!) How to set site root permissions in the web interface?

2011-12-07 Per discussione Maarten Nieber
Hi, I know I'm asking a lot of questions, but this time it's a bit more urgent, because my clients with only the Member role cannot view the home page anymore (maybe because of my upgrade step, see below), and I have no idea where I can set the permissions on the site root in the web interface.

Re: [Product-Developers] (help!) How to set site root permissions in the web interface?

2011-12-07 Per discussione Maarten Nieber
It seems I have restored normality by assigning the Reader role to all the users that are Member. Still, I would be interested to know how I can map roles to permissions for the site root (i.e. the home page) Thanks Maarten ___ Product-Developers

[Product-Developers] Crash while moving folder contents

2011-12-02 Per discussione Maarten Nieber
Hi, I need to replace a document that has content type Section with another document that has content type SectionMarketing. My approach is to simply move the folder contents from the old instance to the new instance, using these lines: ids = [item.id for item in

Re: [Product-Developers] how to enable Global Allow in code?

2011-12-01 Per discussione Maarten Nieber
The following approach works portal_types = portal['portal_types'] typeinfo = portal_types.getTypeInfo('my.product.applicationproduct') typeinfo.global_allow = True import transaction; transaction.commit() portal.invokeFactory( 'Folder',

[Product-Developers] controlling allowed content types inside folderish

2011-11-29 Per discussione Maarten Nieber
Hi, is there a direct way to control what sub-types can be added to a specific instance of my folderish content type (which is called Section). I know that I can create different sub-content-types (SectionWithPagesAndFiles, SectionWithFiles, SectionWithPages, SectionWithPagesFilesAndEvents) but

[Product-Developers] How to disable 'Select a content item as default view'?

2011-11-25 Per discussione Maarten Nieber
Hi, for a certain folderish content type, I would like to disable the 'Select a content item as default view' option in the Display menu (it serves no purpose for this content type, and seeing this option will confuse my users). I looked at the type settings in the profile

[Product-Developers] Controlling cut-and-paste permissions

2011-11-25 Per discussione Maarten Nieber
Hi, I am using plone to create an intranet. I would like to give some of my users cut-and-paste rights in certain parts of the folder-structure. My first question is: where are the permissions for cutting and pasting managed? Do these permissions appear somewhere in the ZMI? Can I install a

Re: [Product-Developers] functional testing: not authorized problem

2011-11-10 Per discussione Maarten Nieber
My previous post used a wrong constant for logging in as the test user. I wrote a small TestUtils helper class (I'm still a Plone beginner, so use this at your own risk.) that appears to log in correctly. from plone.app.testing import TEST_USER_ID, TEST_USER_NAME, TEST_USER_PASSWORD from