[turba] Turba 5.0.0alpha7 and display of address book

Brent impuser at bitrealm.com
Sat Dec 31 02:45:33 UTC 2022


  Quoting Brent <impuser at bitrealm.com>:

> I have Horde/Imp/Turba/Kronolith up and running on php 8.1 using  
> composer. Things "sort" of work, but there are a few problems I'm  
> having.  I don't see much (if any) traffic on this list. This  
> project is pretty nifty and hope it isn't being abandoned.
>
> Here's my first issue. The address book will display in list form  
> without a problem; however, if I choose the Columns I want  
> (Setting>Preferences>Address Book>Column Preferences), choosing  
> options here will result in an error in the address book. If, for  
> example, I choose to add "Email" and save, changes are updated. When  
> I go back to my address book after making that change, I get an error:
>
> Here's the error details:
>
>    
>
>   A FATAL ERROR HAS OCCURRED
>
>   NON-STATIC METHOD HORDE_FORM::GETTYPE() CANNOT BE CALLED STATICALLY
>
>   in /var/www/html/horde/vendor/horde/turba/templates/browse/row.inc:75
>   1. require() /var/www/html/horde/vendor/horde/turba/index.php:24  
> 2. Turba_View_Browse->run()  
> /var/www/html/horde/vendor/horde/turba/browse.php:48 3.  
> Turba_View_List->display()  
> /var/www/html/horde/vendor/horde/turba/lib/View/Browse.php:425 4.  
> Turba_View_List->getAlpha()  
> /var/www/html/horde/vendor/horde/turba/lib/View/List.php:234 5.  
> Turba_View_List->_get()  
> /var/www/html/horde/vendor/horde/turba/lib/View/List.php:294 6.  
> include() /var/www/html/horde/vendor/horde/turba/lib/View/List.php:442
>
>   DETAILS
>
>   The Full Error Message Is Logged In Horde's Log File, And Is Shown  
> Below Only To Administrators. Non-administrative Users Will Not See  
> Error Details.
>
>   Error Object (     [message:protected] => Non-static method  
> Horde_Form::getType() cannot be called statically      
> [string:Error:private] => Error: Non-static method  
> Horde_Form::getType() cannot be called statically in  
> /var/www/html/horde/vendor/horde/turba/templates/browse/row.inc:75  
> Stack trace: #0  
> /var/www/html/horde/vendor/horde/turba/lib/View/List.php(442):  
> include() #1  
> /var/www/html/horde/vendor/horde/turba/lib/View/List.php(294):  
> Turba_View_List->_get() #2  
> /var/www/html/horde/vendor/horde/turba/lib/View/List.php(234):  
> Turba_View_List->getAlpha() #3  
> /var/www/html/horde/vendor/horde/turba/lib/View/Browse.php(425):  
> Turba_View_List->display() #4  
> /var/www/html/horde/vendor/horde/turba/browse.php(48):  
> Turba_View_Browse->run() #5  
> /var/www/html/horde/vendor/horde/turba/index.php(24): require('...')  
> #6 {main}     [code:protected] => 0     [file:protected] =>  
> /var/www/html/horde/vendor/horde/turba/templates/browse/row.inc      
> [line:protected] => 75     [trace:Error:private] => Array         (   
>            [0] => Array                 (                     [file]  
> => /var/www/html/horde/vendor/horde/turba/lib/View/List.php           
>            [line] => 442                     [function] => include    
>               )              [1] => Array                 (           
>            [file] =>  
> /var/www/html/horde/vendor/horde/turba/lib/View/List.php              
>         [line] => 294                     [function] => _get          
>             [class] => Turba_View_List                     [type] =>  
> ->                 )              [2] => Array                 (      
>                 [file] =>  
> /var/www/html/horde/vendor/horde/turba/lib/View/List.php              
>         [line] => 234                     [function] => getAlpha      
>                 [class] => Turba_View_List                      
> [type] => ->                 )              [3] => Array              
>     (                     [file] =>  
> /var/www/html/horde/vendor/horde/turba/lib/View/Browse.php            
>           [line] => 425                     [function] => display     
>                  [class] => Turba_View_List                      
> [type] => ->                 )              [4] => Array              
>     (                     [file] =>  
> /var/www/html/horde/vendor/horde/turba/browse.php                     
>  [line] => 48                     [function] => run                   
>    [class] => Turba_View_Browse                     [type] => ->      
>             )              [5] => Array                 (             
>          [file] => /var/www/html/horde/vendor/horde/turba/index.php   
>                    [line] => 24                     [args] => Array   
>                        (                             [0] =>  
> /var/www/html/horde/vendor/horde/turba/browse.php                     
>      )                      [function] => require                 )   
>         )      [previous:Error:private] =>  )
>
>    

I have found the fix for this. I had to "patch" the  
/var/www/html/horde/vendor/horde/turba/templates/browse/row.inc   
file.  Here's my patch...I am decidedly NOT a programmer, so I've no  
idea if this is the right way to fix this, created a bottleneck, or if  
maybe I've unleashed Zod from his mirror prison.

@@ -72,11 +72,11 @@
         if ($type == 'email') {
             $this->variables[$this->columns[$c - 1]] =
                 new Horde_Form_Variable('', $this->columns[$c - 1],
-                                        Horde_Form::getType('html'), false);
+                                        (new  
Horde_Form(0))->getType('html'), false);
         } else {
             $this->variables[$this->columns[$c - 1]] =
                 new Horde_Form_Variable('', $this->columns[$c - 1],
-                                        Horde_Form::getType($type, $params),
+                                        (new  
Horde_Form(0))->getType($type, $params),
                                         false);
         }
     }


More information about the turba mailing list