1
go4group
Bug:Smarty/xoops_plugin while two modules have same template name - XOOPS 2.3.3
  • 2009/5/27 14:50

  • go4group

  • Just popping in

  • Posts: 2

  • Since: 2008/11/10


I have created two different modules both have few common files templates like "header.html", "footer.html"
In tplfile and tplsurce table the the data is perfect.

Now coming to the problem.

suppose i have module names M1 & M2
i install them and i see that in M2 system is displaying template of M1. I can not understand this. when i uninstall M1 again M2 is working fine. but on installing M1, M1 takes wrong templates. In sort the module which installed first is over riding the templates with same name in other modules installed after wards.

I tried to debug this problem and i observe that

XoopsTplfileHandler->find


fetches the correct templates.

so i tried to modify the template in the First install module(Whose templates are apprring in other modules), and surprisingly
XoopsTplfileHandler->find

fetching correct result and then in display the html from the file in the first installed directory.

I can change my template name in each module to avoid this problem but i think this is major bug in XOOPS 2.3.3 i didn't tested this with earlier versions.

2
mboyden
Re: Bug:Smarty/xoops_plugin while two modules have same template name - XOOPS 2.3.3
  • 2009/5/27 15:08

  • mboyden

  • Moderator

  • Posts: 484

  • Since: 2005/3/9 1


module templates should be named separately and per module -- something like:

modname_templatename.html

This keeps from having modules use each other's templates. I'd agree that with the info in the tables, they are unique, but if you want to include an additional particular template within your smarty templates, you can only call it by the filename, not with the extra module info, etc. So, best to have unique template file names (especially when you start using GIJoe's templates management tools in the AltSys module -- a must have module)
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

Login

Who's Online

305 user(s) are online (197 user(s) are browsing Support Forums)


Members: 0


Guests: 305


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