WebGUI Blog

News, tips, and tutorials about the WebGUI Content Management System.
Recent Tweets @plainblack

cpanm is a great addition to your perl toolbox.  It makes installing new modules very, very easy.   I’ve known about it for a while, but never really needed it until I tried to install a module that was created with a BSD tar, instead of GNU tar.  cpan would die during the tar extraction stage, but cpanm just ignored the error about unknown inodes and installed the module right away.

If you’d like to use cpanm to install all the modules required when upgrading WebGUI, you can invoke this:

perl testEnvironment.pl —simpleReport | ack ‘Not Install’ | perl -ane ‘print $F[3]. ” “’ | perl -pe ‘s/: / /g’ | cpanm

To update any modules which require newer versions:

perl testEnvironment.pl —simpleReport | ack ‘Outdated’ | perl -ane ‘print $F[3]. ” “’ | perl -pe ‘s/: / /g’ | cpanm

ack is a pure-perl replacement for grep, so if you want to do install and upgrade at the same time all you need to do is change the regexp.

If you are looking for a dead stable, slow moving branch of WebGUI to use for your website, WebGUI 8.0 is not for you.  We will be pouring features into it.  If you need stable, then please use WebGUI 7.10, which will only ever have bug-fixes applied to it.  If you need absolutely stable, then use WebGUI 7.9, which will never have releases again.

As has been for the last several months, all of our work is in getting the hosting infrastructure set up for WebGUI 8, so that Plain Black’s websites can be moved over to it.  The last element of that is the demo server, and we’re debugging it now.

Another part of that hosting infrastructure is Task::WebGUI, a new cpan module that will setup and install all of WebGUI’s perl module dependencies for you.  If you choose a source install, then a simple:

cpanm Task::WebGUI

will install everything for you.  However, the version on CPAN is currently minorly out of date.  If you install it today, then you will not get every module needed for WebGUI 8.  After the demo system is working, then Task::WebGUI will be updated.

We keep inching closer to making the 8.0 beta release.  Today was a major milestone in that we created the webgui-7.10 branch, and merged in all the WebGUI code in the master branch of our git repository.

For those of you with git access, please note that from this point onward, any bugfixing in 7.10 will need to hand ported over to the master branch with WebGUI 8 code.  Pay careful attention to the API changes in docs/migration.txt, and the new upgrade script style.

This stable release of WebGUI 7.10.24 contains fixes for 13 different bugs
in the Asset Manager, Calendar, Asset Report, Login Macros, Passive Analytics, Shop
and the Survey.

Gotchas

  • WebGUI now depends on Business::OnlinePayment::AuthorizeNet.  This version should install automatically via the testEnvironment.pl script, or the perl-standard CPAN module.


Bug Fixes

 - fixed #12318: asset error causes asset manager to fail
 - fixed #12308: error message used scalar as reference
 - fixed #12256: Calendar Search doesn’t show admin controls
 - fixed #12268: Point of sale form missing from cart screen.
 - fixed #12201: AssetReport - no selects.
 - fixed #12269: Login / Loginbox with encryptlogin
 - fixed #12271: Calendar List View does not always show labels
 - fixed Passive Analytics, UI, Progress Bar, server load.
 - fixed #12303: Survey custom multiple choice question types
 - fixed #12304: Surven packages do not include custom question types
 - fixed #12309: Some child assets ignore visitor cache timeouts
 - fixed possible values and default values on EMS submission.
 - fixed #12312: Shop account plugin has unrendered macro
 - fixed #12315: Remove yui tests from git repo.

WRE 8 still uses the wreservice.pl script for starting and stopping web processes.  However, since we have new binaries, you have access to some new switches

Nginx replaces Apache/modproxy so you can use wreservice.pl —option nginx to control it.  modproxy remains and is an alias for nginx for people with strong muscle memory.  In addition to —start, —stop and —restart, there is also —reload, which forces nginx to reread its configuration files with less downtime than —restart.  We may add —reopen as well, which makes nginx close and reopen its logfiles quickly without a full shutdown.

Starman replaces Apache/modperl and you use wreservice.pl —option starman to control it.  Like with nginx/modproxy, modperl is an alias for starman.  There are no fancy options for starman yet, but we may add support for start_server’s —restart switch, which is a little cleaner

web is an alias for “nginx starman”, so wreservice.pl —restart web still does the right thing.

—ping works with all web services.

wreservice.pl no longer has any controls for starting or stopping mysql.  You’ll need to use the init scripts for mysql.

(that’s Yet Another WRE 8 Update.  Sorry, been reading too many YAPC posts.)

New stuff that works:

  • Testing logfile rotation.
  • Testing backups.
  • Testing the wremonitor.
  • nginx handling of static content from /extras.
  • Documentation, lots and lots of documentation about what’s changed and how to use the WRE now.

What’s still to be done (in rough order of decreasing priority):

  • The demo server.
  • nginx handling of public files from /uploads.

The simplest, shortest answer is as follows:

It will require upgrading.

WebGUI 8 has API changes to WebGUI::Session and to WebGUI::Asset, and those changes pretty much require that most custom code will need to be upgraded.  Many simple macros and form plugins may not need changes, but by far and large it is safest to assume that they will.

That was the bad news, this is the good news.

  1. We had to migrate WebGUI itself over to the new API so it can be done.  Between Plain Black support and the WebGUI forums you have resources for help in doing that.
  2. We have a script to help automate some of the Asset work.  It will be released to the Add ons and Plugins section on webgui.org.
  3. The migration document has a full list of the API changes.

There is no easy way to build good nginx configurations by translating your Apache configurations.  I did find a site that offers a translator, but it often generates configs using the If directive, which can have some nasty side effects inside nginx.

The nginx wiki is a good technical reference on what nginx can do and how to set things up.  It also has examples of full configuration files.

Most people add rewrite rules to their modproxy configurations, and nginx does have URL rewriting rules, but they work differently from Apache’s and nginx also provides more efficient ways of handling some situations.  Please read the Common Configuration Pitfalls for examples of that.

A quick bullet point update:

Stuff that works:

  • Setting up a new site with the WRE via wresetup.pl
  • Adding sites.
  • Removing sites.
  • wreservice can start, stop and ping nginx and starman.
  • starman is service up WebGUI.
  • nginx is passing dynamic content.
  • Logs are going to the correct places.

What’s still to be done (in rough order of decreasing priority):

  • Testing logfile rotation.
  • Testing backups.
  • Testing the wremonitor.
  • nginx handling of static content from /extras, and public files from /uploads.
  • Documentation, lots and lots of documentation about what’s changed and how to use the WRE now.
  • The demo server.

Although this has been said in the past, and probably too many, I think we can have a WRE beta done by Friday, which means that releases could start flowing again the following Monday.

Stay tuned for more details.