Category Archives: Speaking Graphically

Joomla Warning: Parameter 2 to frontpage()

There must be thousands of webdevs that have at one point installed Joomla 1.0.x on successful sites, where their hosts have upgraded PHP and SQL versions recently (and without notice!)

One of these is, though it would be improbable that they are the only hosts that frequently upgrade their server software surrupticiously.

This is fine, except that if a large number of devs use CMSes where the point is to not dev all the php yourself, a large number of websites can be made completely inoperable if there is a flaw in the php scripts of the CMS, or if server software upgrades are not backwards compatible.

In the case of Joomla 1.0.x, every single page on my company’s site failed to fetch articles from the Database. That’s right, zero content. :)

This was the error message from Joomla:

Warning: Parameter 2 to frontpage() expected to be a reference, value given in C:\xampp\htdocs\mambo\includes\Cache\Lite\Function.php on line 100

And this was the solution posted on Joomla forums: (All credit goes to Kjell Hählen.)

I wrote a fix. My version is Joomla 1.0.13 but I suppose it will not be very different for later versions.

You sould replace two files by the ones in the attachment:

(this solves the “Reference instead of value”-problem)
(to make the contact form work again)

If you rather add the changes by hand:
The changes to vcard.class.php are minor, look for:

In Function.php I added a this line twice:
$arguments = $this->fixCalls($arguments);

The new function (fixCalls) is added at the end of the file.

Get the mirrored fix file >> HERE <<

It turned out to be a simple fix, just changing a couple lines in two PHP scripts, in my case I used the fix zipfile. I’m blogging about it since files have a tendency to stop being hosted and forum posts get archived.

I can’t guarantee the fix will work for your site. But it saved a tricky upgrade path for me, and so I wanted to make sure the solution doesn’t get lost, folded, spindled or mutilated. :) (Kjell, if you don’t like this, let me know and I’ll take it down.)


Life Wisdom #1: Never be Ahead of Your Time

Good old Jeff! I mean evil old Jeff. ;)
Just found out (!) via watching the Disney TR2N screening footage that the original movie Tron (Walt Disney Pictures, 1982) was never nominated for best special effects. It’s mind-boggling. Academy said they cheated because they used computers instead of… I dunno, film processing machines?

And after this, somehow, all movie companies turned cheaters.

I sort of always assumed that naturally, it won all special FX movie awards there were. Not so among the fuzzy-logic uninformed rabble.

Please call it an “Academy” when the members have received some sort of “standard, SUB-standard” training :)

Call me MELman!

Today saw a foray into uncharted terrain – wonderful MEL-land. Well, wonderful and taxing. I tried to bend my brain around a problem that other MEL tools didn’t seem to have solved – a proper backface culling toggle, regardless of what you’re doing.

MEL is the scripting language of Maya which allows you to customize it and create extra functions useful for 3D work. I was too impatient to get started to ask in forums, and Maya Help didn’t answer my specific questions. But by experimenting and finding a very few sources of info on the net I got an inkling on how to proceed.

I spent a good two hours on said problem until I broke it down into three special cases and “ignoring component mode”, since Maya can go into vertex or whichever mode without ever going into component mode. I finally cracked it, and added some (for me, and perhaps others) useful functions.

It certainly will help me modeling. I’ll have a think again tomorrow. If I can make it really good I will upload it to highend3d or someplace. It was a big relief when it finally worked flawlessly, and a very satisfying session of ‘coding’. Maybe I can have some fun with this.