Showing posts with label upgrade. Show all posts
Showing posts with label upgrade. Show all posts

Friday, June 7, 2013

Plone Upgrading Tip – Be careful with that Jquery UI add-on

Just  a quick note. On a Plone 4.3 upgrade I had pinned an old version of collective.js.jqueryui. This caused a few issues including a broken editing interface. The solution was to pin collective.js.jqueryui to the latest version (more importantly, the version that was compatible with Plone 4.3) which meant adding the following to the [versions] section of my buildout.

collective.js.jqueryui = 1.10.3

This little change fixed a whole lot of issues with my Plone 4.3 editing interface on a recently upgraded site.

Sunday, June 2, 2013

Fixing a broken view on a Dexterity based product after upgrading to Plone 4.3

TL;DR: I totally missed that the new Dexterity now ships with less dependencies. For me this meant that one of my products that depends on five.grok stopped working after the upgrade. The solution to the lack of the five.grok dependency in Dexterity was documented but not obviously enough for me so I'll repeat it here (skip to the last section of this post for details).

Troubleshooting

In order to identify what was broken I turned to the 'error_log' utility of the Zope Management Interface.



My little "trick" for enabling exceptions which are normally ignored by Plone is by adding a 'z' to the end of the exception name so that it gets logged and not skipped.



The 'error_log' was able to report that the view (even though it was working up to Plone 4.2) was now raising a "Not Found" exception on my Plone 4.3 based site. The view in this case called '@@sermons' was somehow no longer properly registered.

Diagnosing the source

My view was registered using a package called 'five.grok' which uses convention over configuration to associate views with a package. Here's a snippet of code that registers a simple view (5 to 7 lines of code):
from five import grok
from Products.ATContentTypes.interface import IATFolder
grok.templatedir('.')
class Sermons(grok.View):
    """A BrowserView to display a Sermon listing on a Folder."""
    grok.context(IATFolder)  # type of object on which this View is available
    grok.require('zope2.View')  # what permission is needed for access

By convention because the class is called 'Sermons' it would be accessible via the name '@@sermons' or simply 'sermons' and would depend on a template called 'sermons.pt' in the same directory (not shown here). The bottom line is that this all used to work.

The solution

Reintroduce the dependency in my buildout configuration and rerun buildout. This meant explicitly declaring the grok dependency. I also declared an additional dependency on a package called 'relations' just in case I had other code that needed that, then I reran buildout. The actual line that changed in order to do this explicit declaration involved adding a line like the one below in the appropriate eggs section of my buildout configuration:

eggs =
    plone.app.dexterity [grok, relations]

Phew! my view worked after that.

Thursday, September 2, 2010

Plone 4 makes upgrades fast and easy

You probably know that Plone 4 is really fast. Here's a screencast of us upgrading our site from Plone 4.0rc1 to Plone 4.0.












As you see, not only is it very responsive, it's also pretty easy. I have done a few, less trivial upgrades from Plone 3 to Plone 4, hopefully I'll remember to do a screencast about that in the future.

Saturday, May 23, 2009

Ubuntu in Windows

I couldn't take it anymore, been using this windows XP laptop for almost 48 hours. I finally cracked and decided to get Ubuntu on this thing. Since I'll need to return this machine unaltered (read, with Windows still on it). This is my recipe:

1. Download the Desktop ISO of Ubuntu from ubuntu.com

2. Install winxpvirtualcdcontrolpanel this makes it possible to mount the iso as if it were a virtual cd drive, this was the hardest step, it involves moving a special file into the system32/drivers directory and adding a new virtual drive (budget 5 minutes for reading the readme and figuring out stuff)

3. Mount the ISO to a drive in windows, using the winxpvirtualcdcontrolpanel tool. I used the Z drive for my name

4. Launch the "virtual cd" and select "install in windows"


That's it. You'll be asked for an admin username and password and then after a few minutes you'll be prompted to reboot.

That's it. I'm now up and running and so far the important stuff just works, wifi, internet, wifi, internet......

Sign up for my upcoming Plone 5 Book & Video tutorials

plone 5 for newbies book and videos