Posts tagged 'plone' – Page 3

Good Morning World Plone Day!

Good morning from the land down under and welcome to World Plone Day 2010! It’s right on the hour (well, just after now) and 28 April 2010 — and yes, that’s World Plone Day to the uninitiated. To celebrate and to mark the occasion, I’ll be holding a bit of a discussion today about what Plone is, why it’s so useful, and what we, as users, are hanging out for in Plone 4 and above. But, what fun is that without sweets to eat?  And what’s potentially tastier than Plone?  Plone cupcakes!

Thanks to some great …

Plone and Dexterity: Working with computed fields

Today, we’re looking at how to utilise computed fields within a Dexterity-based content type. The specific use-case is that of having two separate fields (first name and surname, for a Person type, for example) generate the complete object title. The first part of this — having the title of the content displayed correctly — is pretty straight forward once you know what documentation to read and understand how things happen. The second part — having the ID of the content correctly generated to be first name/surname is slightly more complicated.

Title computation and display

Let’s look at the first part …

Plone/Zope: Utilising zope.testrecorder for unit testing

Writing unit tests (especial doctests) for your Plone product is reasonably time consuming. For us developers, having tested code is absolutely essential. This is especially true when clients are beating down your door looking for a fully functional product and you need to know what you’ve written works and isn’t going to fall over (just yet, anyway). Web apps are able to be tested using a multitude of frameworks, and whilst not the most fully featured (eg lacking Javascript support), Zope’s doctest machinery is right there within your Plone product. In order to write these, enter zope …

GenericSetup and “mismatched” tags in ZCML

Ever the issue-magnet, I’ve spent the better part of my morning trying to debug a mistmatched tag error from within some ZCML (aka XML for the non-initiated).  Essentially, the issue boiled down to the system telling me that it was certain that I had a mistmatched tag within my configuration, and presented me with the problematic XML tag (complete with line numbers).  However, life’s not always that simple.

The traceback looked like this:

Traceback (most recent call last):
zope.configuration.config.ConfigurationExecutionError: xml.parsers.expat.ExpatError: mismatched tag: line 6, column 70
in:
File "/home/david/buildout/src …

Wget a Plone site (and make it actually work)

There’s a lot of different resources and posts on the web about how to export a Plone site to static html content, but no methodology would actually solve all of my problems. Now, Plone is inherently a complicated beast, given just how much it does, and that’s definitely putting it lightly. But here goes at my attempt to provide an actual, workable solution.  Word for the wise though, this is for more than just your front-end administrator to handle.  Also, instructions are designed for Ubuntu 9.10.  Mileage may/will vary on other distros or OSes.

Requirements

  • Needs …

CSS: Internet Explorer and Self-Imposed Limitations (+ Plone)

Microsoft and IE are insane.  Yes, we all knew this, but here’s the proof:

IE won't accept more than 30 style sheets to be loaded via <style> tags within a single page.

Insanity?  Yes.  It’s made even worse by the fact they openly admit this lunacy!  See the relevant support article from MS as proof.

Good gosh.  I can just imagine the staff (managers, probably) from Microsoft thinking “30 style sheets?  Who needs more than 30 style sheets?  Just kill off anything after that and those sites that use that many can BURN.”

I mean, really, who does …

(Lack of) Kupu CSS Styles, Plone and Deliverance

Note: see this post for up-to-date details.

Essentially, the issue is that Deliverance doesn’t theme (and rightly so) the Kupu editor within Plone and hence any styles applied to normal pages by Deliverance don’t show up.  My workaround, as detailed on that post, is to customise the “emptypageresources” page template and include a suitable link to the CSS file, like so:

<link href="site.css" type="text/css" rel="StyleSheet" tal:attributes="href string:${context/@@plone_portal_state/navigation_root_url}/static/theme/site.css;" />

(changing the tal:attributes section accordingly).  This should introduce perfectly correct styles for your editor from your …

Logged out users can’t bring up the Plone popup calendar

It’s another one of those ‘strange’ problems that has cropped up, but by default in Plone, users who aren’t authenticated aren’t actually able to bring up a pop-up calendar on a date field.

It’s amazing that I haven’t run into this issue before with something like PloneFormGen, where you’d think that a simple Date input field would be pretty common.  Although, I guess it’s the case that even though I’ve used these given forms, I’ve probably never taken much notice of the popup calendar icon and just selected a random date …

David tries Plone 4.0a2 (Part 2)

Rightio!  So we’ve got Plone 4.0a2 installed and up and running.  Boy, she looks sweet:

  • The new Plone site setup is flawlessly simple.  No more ZMI for those of us that don’t want to use it.  It’ll always still be useful, but having Plone throw up a simple, no no-nonsense front-end installer is just what it needed.  Other PHP based CMSes always had it too easy ;-)
  • Editing view:  clearer tabs at the top (no idea how many clients miss those, me included to start!) and resizable editing fields.  Great. TinyMCE as the editor — just what the …

David tries Plone 4.0a2 (Part 1)

Plone 4 is approaching!  Excellent!  Lots of new features to play around with and plenty more things to have to fix with the upgrade.  I’ve been keeping tabs on the change log of updates and it’s looking really good. Lots of little, but significant, changes are afoot.  Now, how about actually installing the Alpha 2 version of Plone 4 to see it for real? Let’s do it!

My steps are not going to work on your computer.  I don’t think you’ll be able to follow my words/commands exactly, but here goes anyway about my …