Fixing EGroupware

Recently I wanted to migrate an old and rather hacked installation of EGroupware 1.4.002 running on a home server to the bright and shiny version 1.6.001 on a webhosting server. If you are familiar with such stuff you possibly would have wished me good luck…

Anyhow, I ran into quite a few problems, for some of which I had to edit the source – and in case you’re also facing one or another of these, here are the solutions.

Mass category assignments in the calendar

One of the new features I really like – but which doesn’t work out-of-the-box. It came out that its a small typo bug, in egroupware/addressbook/inc/, rewrite line 1976 to:

  } else if (selbox.value == "cat_add") {

I don’t know why this made it in the release version, but as it was the bug which was easiest to fix, I don’t care.

Email notifications

I think you got this one only under following circumstances:

  1. You don’t use felamimail, but maybe you’ve tried – in my case it didn’t work because of some missing php-pear stuff.
  2. Saving a item (an infolog entry in my case) which should trigger a notification works, but there is an unexpected halt while saving. That means you won’t get a confirmation, the window won’t close and will show an completely empty page.
  3. No e-mail is sent ;)

The solution is not so obvious and it took me about 5 hours of echo-debugging of quite some source files. The failure is, EGroupware checks for preferences of felamimail, and if it got them there is no fallback to your smpt configuration in your headers. But unfortunately EGroupware can obtain a preference-object of felamimail, but cannot obtain preferences out of it… That’s weird, uhm? So here is a solution.

Rewrite line 58  of file egroupware/phpgwapi/inc/ to:

    if (false) {
//  if ($bopreferences) {

This makes the fallback default and is a modification which will still use the fallback with enabled felamimail. Now you should be sure, that your SMTP settings in are correct and it should work. At least in my case it did. In case you get felamimail working don’t forget to undo this modification, since sending mail via one user’s smtp account feels a lot better.

MyDMS enhancement

This is not a bug, but an enhancement I already did to the old installation – so I had to re-enhance the new version (I worry that this won’t be the last feature I have to re-introduce). So MyDMS was used in favor of the file manager because of usability and revision management. Very handy came the possibility to link MyDMS documents from the wiki – but you had to decide for a specific version number. With this tiny enhancement, this is past. Just omit the version number within the download link and you will get the latest version. To get things going expand line 35 of file egroupware/mydms/op/op.Download.php to look like:

if ($version == NULL) {
  $content = $document->getLatestContent();
} else {
  $content = $document->getContentByVersion($version);

And that’s it.

I hope you gained some insights, do not hesitate to ask questions but keep in mind that I do not offer general EGroupware support, which Stylite would be happy to be paid for.

~~~ Cheers!