Comment migrer depuis un vieille version de Plone vers la dernière version


La première chose à faire lors de la migration d’un CMS est de regarder si la documentation contient le nécessaire à connaître pour se lancer. La documentation de Plone est très bien fournie avec des conseils pour chaque version majeure depuis la 1.0 :

http://plone.org/documentation/manual/upgrade-guide

 

Il est indiqué quels sont les produits impactés et quels sont les modifications à apporter dans le code tierce.

Il y a deux conseils qui manquent souvent pour le développeur qui manque d’habitude :

  1. Il faut passer par toutes les versions majeures
  2. Dans une même version majeure il faut faire la migration depuis la première version mineure vers la dernière version mineure avant de migrer à la prochaine version majeure id est 3.3 vers 3.3.6 avant de faire 3.3.6 vers 4.0

En suivant ces deux règles supplémentaires il est possible de passer de Plone 2.1 à Plone 4.3 et bientôt

English: The logo of Plone, and Open Source Co...

English: The logo of Plone, and Open Source Content Management System (Photo credit: Wikipedia)

Plone 5 sans avoir trop de surprises.

 

 

 

 

Publicités

How to setup your Plone core sprint


I promised to published this article last year but… well, no excuse. The topic is still hot as we work on in Arnhem in November 2013, 11 to 15 to finish it for Plone 5.

Here in Arnhem – Ploneconf 2012 Sprints – we are making a lot of sprint about a lot of different topics. As a newcomer in  sprint lead I did some mistakes.

  1. If you are working in the Plone core you must should a plip before the beginning of the sprint. It will be easier for other people  to follow your work some months later.
  2. For commiters, the main point is to check if you already give your contributor agreement back to the Plone Fundation. If you’re not there should be someone with blank agreements in your sprint to make things go easy.
  3. Once you know how many sprinters you have on your topic you must organize the area to be comfortable for all.
  4. Fing a way to show everybody the tasks that are on going and who is working on. My way is a whiteboard with post-its
  5. Prepare the technical parts before to start coding:
    • Identify all the packages you’re working on and create a remote branch for your plip. We were working at first on Products.CMFPlone, plone.app.content, plone.app.users, and after we also include plone.app.controlpanel in the list.
    • Don’t make a branch in buildout.coredev create a plips configuration file in the ‘plips‘ folder.Then run your buildout using this configuration file as master: bin/buildout -c plips/plip13260-cpy-removal.cfg
  6. Check if everybody have commit rights.
  7. If there’s a change in the plip configuration file notice it to everyone fast.
  8. Make regular internal reports to know who needs help or work 🙂
  9. Write down what’s you’re doing on

For commiters, the main point is to check if you already give your contributor agreement back to the Plone Fundation.  If you’re not there should be someone with blank agreements in your sprint to make things go easy.
Commiters should also follow a process to make the pull going right:

  1. Have  fun
  2. After each plip configuration file update check if all plip eggs are well checkouted and if they are in the good branch
  3. When you start a task  create a local branch to avoiding conflicts before your merge
  4. Commit early, often
  5. Fetch and pull others commits before to merge
  6. Run tests without ‘-t
  7. Merge your work in the plip branch, not the master
  8. Test again before the push
  9. If you need help asks (I know, git is overcomplicated 😉 )
  10. Have fun! Did I say it before?
  11. Have  a follow up plan and stay in touch

Thanks to Eric Steele for the first setup, Liz as the proposer of the sprint topic, Maurits as the technical leader and for all people around there that were working on that sprint.

How to use curl to test a REST API with a beautiful JSON indentation


How to get indented JSON with curl output

You need to install simplejson Python module in your environment, or python-simplejson.

curl [options] url | python -msimplejson.tool

An example with github APIv3

curl -s -H "Content-Type: application/json" -X GET \
     "https://api.github.com/repos/collective/collective.ckeditor" \
     | python -msimplejson.tool

How to display response headers and API errors with the JSON indentation

This command line have two problems :

  1. You cannot display response HTTP headers because it breaks simplejson parsing
  2. If you have an error with a request and you don’t know how to debug it.

You need to add two more options to push header response and error message in stderr: -S and -D /dev/stderr. Now you can test your API with all informations in one command:

curl -s -S -D /dev/stderr -u user:password \
     -H "Content-Type: application/json" -X GET \
     "http://myapi/v1/test/"

From curl manual:

  • -s no progress bar; stats report or errors are dislayed
  • -S display errors if -s is enable
  • -D dump the header in a file; here stderr to make them not interfer with json indentation
  • -u user and password for Basic HTTP Authentication
  • -H add header in the outgoing request
  • -X HTTP Command to launch. If you’re using Basic HTTP Authentication you must use -X GET

If someone have tip to add pygment coloration in json and headers I will be glad to share the ownership of this article.

Feedbacks on Diazo after the PloneConf training


There were 9 trainees in this PloneConf Diazo session.  Half of them were brand new on Diazo and the second half already used it for at  least one theme.

  • Every find Diazo 1.0 cool with its new styles editor.
  • If you want to be comfortable with all the editor’s features you should use a 30-inch display (especially with the introsception panel).
  • To be able to import a Zip file from any free CSS templates site is awesome with a bemol: the Zip file must have a directory at first level with all content inside if you don’t have a weird error message displayed.
  • Shortcuts in the editor are working everywhere but are not documented; may we need a side panel with general documentation.
  • In the inspector panel, it’s not easy to find the XPath expression and   less to create a generic one without a live example.
  • There is no ‘move‘ command. It’s available since deliverance 0.3 and Diazo forked at 0.2.

During the DIY part of the training some were asking how to make a theme with Bootstrap.js and Diazo.  Deco’s toolbar theme is build with Bootstrap.js but it seems not to be doable from scratch only with the Diazo editor. Everyone finish his own theme in 2 hours for beginners and in 30 minutes  for others.

At least, there was one trainee that fell to complicated to write the rules.xml file with all those XSLT tranforms.

I let the trainees add their feeling about it if I forgot something.

Enhanced by Zemanta

Participate to a Diazo training in Arnhem the October 9


The day before the conferences I will provide a training on Diazo.

You can come with your own HTML design and in one day we will see how to create a zip file ready to be inserted in your plone site.

You don’t need to know anything about Plone, just HTML and CSS. A bit of XML understanding would be useful but not required.

Enhanced by Zemanta