Categories > OpenTBS with ODT >

Error after upgrade OpenTBS 1.1 -> 1.4.1

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: zenlord
Date: 2011-01-07
Time: 21:07

Error after upgrade OpenTBS 1.1 -> 1.4.1

Hi,

Since I got an error of which I thought it might be a bug, I decided on upgrading my TBS and openTBS-classes.
TBS: 3.3.0 -> 3.6.1
openTBS: 1.1 -> 1.4.1

Everything still works for TBS itself, but creating a document with openTBS fails at:
"Warning: Missing argument 2 for clsOpenTBS::OnCommand() in /var/www/proius/tbs/plugins/tbs_plugin_opentbs.php on line 225"

I have looked through the file, the manual and the changelog, but could not find something relevant.

The code to get this (fatal) warning:
        $dosNr = $_GET['w1'];
        $dosName = $_GET['w2'];
        $dosLoc = getDosLoc($dosNr);
        $fileYear = substr($dosNr, 0, 2);
        $datetime = date("Ymd_His", $now);
        $date = trim(strftime ("%e %B %Y", $now));
        $file = "/share/Dossiers/20".$fileYear."/".$dosNr." - ".$dosName."/".$datetime."-bC.odt";
        $TBS = new clsTinyButStrong;
        $TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);
            $TBS->LoadTemplate("/share/Kantoor/briefhoofd/StandaardBrief.odt#");
            $TBS->Show(OPENTBS_FILE, $file);
        $TBS->Plugin(OPENTBS_PLUGIN, OPENTBS_RESET);
            chmod($file, 0660);
            chgrp($file, "users");
            header("location: ".$_SERVER['HTTP_REFERER']);
(I know the code is a mess - that's why I'm rewriting it ;))

THX!
By: Skrol29
Date: 2011-01-07
Time: 23:40

Re: Error after upgrade OpenTBS 1.1 -> 1.4.1

Hi Zenlord,

Thanks for reporting this problem, you've pointed on a bug.

To avoid the warning message, delete the line:
$TBS->Plugin(OPENTBS_PLUGIN, OPENTBS_RESET);
I think you don't need it. Otherwise, replace it with:
$TBS->Plugin(OPENTBS_PLUGIN, OPENTBS_RESET, false);

This bug will be fixed in the next OpenTBS version.
Regards,
By: zenlord
Date: 2011-01-08
Time: 11:40

Re: Error after upgrade OpenTBS 1.1 -> 1.4.1

Thx for your swift replies!

After deleting that line the errormessage has disappeared. Iirc, I did not exactly need it, but it seemed like the correct way to do.