Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.1

Bug #11294 Fatal error: Call to undefined method Pager_Sliding::build()
Submitted: 2007-06-12 13:53 UTC
From: betrazivis Assigned: quipo
Status: Closed Package: Pager
PHP Version: 5.2.1 OS: SuSE 9.3 x86_64 GNU/Linux
Roadmaps: (Not assigned)    
Subscription  


 [2007-06-12 13:53 UTC] betrazivis (Tobias Lorsbach)
Description: ------------ Fatal error: Call to undefined method Pager_Sliding::build() in /usr/lib/php/Structures/DataGrid/Renderer/Pager.php on line 307 if I uncomment the line 307 function buildBody() { //$this->_pager->build(); } it works!!!! I don`t want to overwrite a protected method, so I think there is a bug somewhere. ################################ pear list Archive_Tar 1.3.2 stable Archive_Zip 0.1.1 beta Auth 1.5.1 stable Auth_HTTP 2.1.6 stable Benchmark 1.2.6 stable Cache 1.5.4 stable Cache_Lite 1.7.2 stable Calendar 0.5.3 beta Console_Color 1.0.2 stable Console_Getargs 1.3.4 stable Console_Getopt 1.2.2 stable Console_Table 1.0.6 stable Contact_Vcard_Build 1.1.1 stable DB 1.7.11 stable DB_DataObject 1.8.5 stable DB_DataObject_FormBuilder 1.0.0RC7 beta DB_NestedSet 1.2.4 stable DB_Pager 0.7 stable DB_QueryTool 1.1.0 stable DB_Table 1.4.0 stable Date 1.4.7 stable File 1.2.2 stable File_Find 1.3.0 stable HTML_AJAX 0.5.0 beta HTML_Common 1.2.4 stable HTML_Crypt 1.3.2 stable HTML_Javascript 1.1.1 stable HTML_QuickForm 3.2.7 stable HTML_QuickForm_ElementGrid 0.1.1 alpha HTML_QuickForm_Renderer_Tableless 0.5.0 beta HTML_Table 1.8.0 stable HTML_Template_Flexy 1.2.5 stable HTML_Template_IT 1.2.1 stable HTML_TreeMenu 1.2.0 stable HTTP 1.4.0 stable HTTP_Download 1.1.1 stable HTTP_Header 1.2.0 stable HTTP_Request 1.4.0 stable HTTP_Upload 0.9.1 stable Image_Color 1.0.2 stable Image_Text 0.6.0beta beta Image_Tools 0.4.2 beta Image_Transform 0.9.1 alpha Log 1.9.10 stable MDB 1.3.0 stable MDB2 2.4.1 stable MDB2_Driver_mysql 1.4.1 stable MDB_QueryTool 1.2.0 stable MIME_Type 1.0.0 stable Net_Socket 1.0.7 stable Net_URL 1.0.14 stable Numbers_Words 0.15.0 beta OLE 0.5 beta PEAR 1.5.4 stable PHPDoc 0.1.0 beta PHP_Compat 1.5.0 stable Pager 2.4.3 stable Pager_Sliding 1.6 stable Spreadsheet_Excel_Writer 0.9.1 beta Structures_DataGrid 0.8.3 beta Structures_DataGrid_DataSource_Array 0.1.2 beta Structures_DataGrid_DataSource_CSV 0.1.4 beta Structures_DataGrid_DataSource_DB 0.1.1 beta Structures_DataGrid_DataSource_DBQuery 0.1.9 beta Structures_DataGrid_DataSource_DBTable 0.1.5 beta Structures_DataGrid_DataSource_DataObject 0.1.1 beta Structures_DataGrid_DataSource_MDB2 0.1.9 beta Structures_DataGrid_DataSource_RSS 0.1.1 beta Structures_DataGrid_DataSource_XML 0.1.2 beta Structures_DataGrid_Renderer_CSV 0.1.4 beta Structures_DataGrid_Renderer_Console 0.1.1 beta Structures_DataGrid_Renderer_HTMLSortForm 0.1.2 beta Structures_DataGrid_Renderer_HTMLTable 0.1.3 beta Structures_DataGrid_Renderer_Pager 0.1.2 beta Structures_DataGrid_Renderer_Smarty 0.1.3 beta Structures_DataGrid_Renderer_XLS 0.1.2 beta Structures_DataGrid_Renderer_XML 0.1.3 beta Structures_DataGrid_Renderer_XUL 0.1.2 beta Structures_Graph 1.0.2 stable System_Command 1.0.6 stable Text_CAPTCHA 0.2.1 alpha Text_CAPTCHA_Numeral 1.2.0 stable Text_Figlet 1.0.0 stable Text_Password 1.1.0 stable Validate 0.7.0 beta XML_Parser 1.2.8 stable XML_RSS 0.9.2 stable XML_Serializer 0.18.0 beta XML_Tree 1.1 stable XML_Util 1.1.4 stable XML_XPath 1.2.3 stable Test script: --------------- require_once 'Structures/DataGrid.php'; $datagrid =& new Structures_DataGrid(20); $test = $datagrid->bind('SELECT * FROM user',array('dsn' =>'mysql://admin:********@localhost/rp24_devel')); if (PEAR::isError($test)) { echo $test->getMessage(); } // Display paging links $test = $datagrid->render(DATAGRID_RENDER_PAGER); if (PEAR::isError($test)) { echo $test->getMessage(); } Expected result: ---------------- the pager ;) Actual result: -------------- Fatal error: Call to undefined method Pager_Sliding::build() in /usr/lib/php/Structures/DataGrid/Renderer/Pager.php on line 307

Comments

 [2007-06-12 14:07 UTC] olivierg (Olivier Guilyardi)
It looks like you have a broken pear installation, the Pager and Pager_Sliding package both provide the Pager/Sliding.php file. Please try removing the obsolete Pager_Sliding package, and possibly reinstall the Pager package.
 [2007-06-12 14:36 UTC] betrazivis (Tobias Lorsbach)
Yes, Oliver, thx. That was exactly the problem. Pager_Sliding is not necessary. I`m not shure what interface/class has asked for this, but it was has been asked!? There must be a bug somewhere around the installation of these packages. Maybe in the order of...
 [2007-06-12 15:40 UTC] olivierg (Olivier Guilyardi)
Good The question now is: how can two packages provide exactly the same file?? This looks like a _huge_ bug to me. If Pager_Sliding must remain available, then it shouldn't install any file by its own but become a wrapper that simply depends on Pager. I'm forwarding this bug to the Pager package, since Pager_Sliding isn't maintained anymore, and this issue breaks the Pager package.
 [2007-06-12 15:51 UTC] quipo (Lorenzo Alberton)
Please consider Pager_Sliding dead and buried. Pager v.2 is meant as a MERGE of the old Pager v.1 and Pager_Sliding, thus providing both paging modes. The file overwrite is intentional, since Pager v.2 completely replaces Pager_Sliding (before you ask, no, the API didn't change).
 [2007-06-13 10:01 UTC] olivierg (Olivier Guilyardi)
Please check Tobias report again. In his case, Pager_Sliding seems to have overwritten Pager, not the opposite which you expect. And the build() method does not exist in Pager_Sliding, which forbade Structures_DataGrid to do its job. Why don't you make Pager_Sliding a simple wrapper around Pager, to avoid such conflict ? Pager_Sliding wouldn't actually install any php file, it would simply depend on Pager.
 [2007-08-02 18:57 UTC] quipo (Lorenzo Alberton)
I quote an email from Greg on this issue: ==================================================== Chances are, Pager_Sliding was in fact installed using an old and buggy PEAR installer, as evidenced by this little experiment: >pear install pager_sliding WARNING: "pear/Pager_Sliding" is deprecated in favor of "pear/Pager" downloading Pager_Sliding-1.6.tgz ... Starting to download Pager_Sliding-1.6.tgz (10,419 bytes) .....done: 10,419 bytes ERROR: pear.php.net/Pager_Sliding: conflicting files found: Pager\Sliding.php (pear.php.net/pager) Tell the user he needs to re-install his PEAR installation, as the registry may not be built properly. By this I mean he will need to pear install --force --nodeps <packagename>-<version> for each installed package in that looooong list. I don't envy him :) ====================================================