Usted está aquí: Inicio CS-Workshop CS-Workshop Blog 2008 Noviembre

Noviembre

Sub-archivos

I can't reorder elements in a Plone folder!

by Mikel Larreategi — última modificación 11/11/2008 17:25
Etiquetas:

Recently I had a problem in a website we are currently developing to reorder some custom content-types in Plone folder.

We are currently building a website that has many customized content-types. In the main folder of the structure we are building, the client wants to reorder elements freely, like in a normal Plone folder. Well, the main folder of the structure is currently a Plone folder, so "no problem" I said, just go to Contents tabs and reorder the elements. But... aghh !!! I couldn't reorder the items !!

I started investigating what was going on, putting a pdb here and there, and found a curious thing: the items stored in the folder were some archetypes based custom objects with a portal type with a space in its name. This portal type was "Product Line". The reordering code compared the items inside it and checked whether the item was actually in it looking at its _objects attribute, nothing special til here. But the check was not safe enough.

The code looked at the Metatype of the FTIs in the portal_types tool to check whether the element which was being reordered was currently a CMF object. But the Metatype of the FTI wasn't the same as the meta type of the object, because the Metatype of the FTI was the actual portal type of the object.

Moreover, the _objects attribute wasn't modified when the meta type of the object was changed, so it wasn't enough the change just the meta_type. I had to write a migration script to change the _objects attribute of the folder to change "ProductLine" with "Product Line". That change made my custom objects orderable.

 

World Plone Day in the Basque Country

by Luistxo Fernandez — última modificación 07/11/2008 10:20

Our company office space hosts today the World Plone Day.

World Plone Day is happening today in over 30 cities around the world. We organised a local meeting in the Basque Country, and talks and mini-workshops are happening around me just as I write these lines.


Argazkiak.org | World Plone Day 2008 © cc-by-sa: codesyntax

Some 30 people gathered here today, and we are happy to see webmasters that edit some of the Plone websites that CodeSyntax developed.


Argazkiak.org | Oier, Joxe, Iban © cc-by-sa: codesyntax

Above, editors of community website Dantzan.com, Oier Araolaza; from Mondragon University, Joxe Aranzabal; and from local newssite Goiena.net, Iban Arantzabal.

One of our customers also volunteered to talk. Jabier Santamaria is the engineer behind a Plonegov / Udalplone (our local brand for this Plone project to create websites for the public administration) website, the one for the town council of Amorebieta-Etxano.


Argazkiak.org | Jabier Santamaria © cc-by-sa: codesyntax

We've been happy to welcome as well other Plone creators in the Basque Country, not only sites developed by us. Jesus Romo, of the virtual campus of the University of the Basque Country, has explained how they use Plone in their eKasi elearning project.


Argazkiak.org | Jesus Romo, EHU © cc-by-sa: codesyntax

More pictures from this day in Flickr. And the slides from the presentations made by CodeSyntax coworkers today.