1
irmtfan
Xoops2.5.6 and xoops26 bug (important): block template file will not updated after update the module
  • 2013/5/8 8:13

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


I had this bug for many years. when i update a module and module block template file name had been changed, It will not updated. Only Altsys by GIJ could update the module block template. Finally today i found the bug in core 256 It is a very old bug unsolved for about 7 years. in xoops256/modules/system/admin/modulesadmin/main.php around line 615 one previous core developer forgot to update the tpl_file so you should add the tpl_file like this:
$tplfile_new->setVar('tpl_source'$contenttrue);
                                    
$tplfile_new->setVar('tpl_desc'$block['description'], true);
                                    
$tplfile_new->setVar('tpl_lastmodified'time());
                                    
$tplfile_new->setVar('tpl_lastimported'0);
                                    
$tplfile_new->setVar('tpl_file'$block['template'], true); // irmtfan bug fix:  block template file will not updated after update the module
                                    
if (!$tplfile_handler->insert($tplfile_new)) {
                                        
$msgs[] = '  '.sprintf(_AM_SYSTEM_MODULES_TEMPLATE_UPDATE_ERROR"".$block['template'].""
).'';
                                    } else {
I should test in Xoops26 but i think 26 has not this bug. please somebody send it to bug tracker. Edit: it is bug in xoops26 too. in modules/system/class/module.php around line 682:
$tplfile_new->setVar('tpl_source'$templatetrue);
                            
$tplfile_new->setVar('tpl_desc'$block['description'], true);
                            
$tplfile_new->setVar('tpl_lastmodified'time());
                            
$tplfile_new->setVar('tpl_lastimported'0);
                            
$tplfile_new->setVar('tpl_file'$block['template'], true); // irmtfan bug fix:  block template file will not updated after update the module

2
Mamba
Re: Xoops2.5.6 bug (important): block template file will not updated after update the module
  • 2013/5/8 8:18

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
please somebody send it to bug tracker

https://sourceforge.net/p/xoops/bugs/1269/
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
irmtfan
Re: Xoops2.5.6 bug (important): block template file will not updated after update the module
  • 2013/5/8 8:44

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


thanks mamba.
the bug is exist in xoops 26.
This bug will prevent module developers to change the templates files for blocks in clone process.
now they add $dirname as a prefix but it is not needed.
eg: templates/blocks/DIRNAME_counts.html
should be changed to
templates/blocks/block_counts.html
and the above will work perfectly in all clones.

I want to update the how to write standard module tutorial ASAP.

4
zyspec
Re: Xoops2.5.6 and xoops26 bug (important): block template file will not updated after update the module
  • 2013/5/8 18:44

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Good find irmtfan! Thanks for following through to not only find the issue but propose a fix...

5
irmtfan
Re: Xoops2.5.6 bug (important): block template file will not updated after update the module
  • 2013/5/9 2:25

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Yes this bug really annoy me for ages. I update a module (especially you surely will face it in updating a cloned module) and see blocks templates are not updated. I did everything but only Altsys could update it.
I think i sent some similar bug reports before but nobody found it.
Im sure this is the solution.

Login

Who's Online

389 user(s) are online (261 user(s) are browsing Support Forums)


Members: 0


Guests: 389


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits