Posts by 'davidjb' – Page 6

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 …

Apache: Directories and trailing slashes

Apache does something interesting (yes, I still think it’s logical) when you’re accessing a directory that it’s serving: if you access it without a trailing slash, it’ll add one by default. This makes sense if you’re going after some static content or a folder index (or pretty much any sane usage) but it didn’t fit my use case of serving Plone using rewrite rules in a .htaccess file.

The issue that arises for myself with Plone is that my sites need to have their access customised through that .htaccess file and that’s been …

Ubuntu: Crackling audio noises on a Dell M1530 (or HDA cards)

The problem I found (so did everyone else) when updating to Ubuntu 9.10 Karmic was static/popping noises when your sound card is silent (aka goes into power-save mode). It applies to my Dell XPS M1530 laptop’s on-board sound and probably to the same chipset elsewhere.

The fix couldn’t be simpler! Simply edit this file (as root):

/etc/modprobe.d/alsa-base.conf

and comment out the last line. Then, restart ALSA to save you having to do a reboot to check it worked:

sudo /etc/init.d/alsa-utils stop sudo alsa force-reload sudo /etc/init.d/alsa-utils …

(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 …

Start screen after su’ing to another user

Today’s problem is one that requires no introduction (well, maybe it does :-| ) but it’s a problem nonetheless.  The issue is that after using the ‘su‘ command to become another user, there’s trouble running screen sessions.

This page (http://dbadump.blogspot.com/2009/04/start-screen-after-sudo-su-to-another.html) details it simply and perfectly (which, yes, I know in turn came from another page).  Essentially the error is thus:

Cannot open your terminal '/dev/pts/1' - please check.

Which really doesn’t man nor beast with its descriptiveness.  From that page, which came from another page mentioned on that page (?), here …

Deliverance, Plone, and tags

It’s been a little bit of time since my last post, and who can blame me with my site having been down for almost 2 full days over the last week!  I’m not paying that much for the webspace, thankfully, but if I was, I’d be seeing red over it.  Apparently some patch for MySQL broke everything; imagine how it looked to see my site with a ‘500 internal error’ plastered all over it and not being able to access my cPanel. Ugh.

Anyway, everything’s back again, assuming that you can see this.  Okay? Great!

Today …