1
mboyden
XOOPSinfo Conflict When Using ThAdmin and Other Modules
  • 2008/12/14 22:08

  • mboyden

  • Moderator

  • Posts: 484

  • Since: 2005/3/9 1


I was having problems in 2.3.x with a few modules (news, iStats, eXtgallery) in the admin menu with XoopsInfo installed and ThAdmin in operation (disabling ThAdmin, but left installed worked fine). After searching I found several postings related to the same problem (here, here, and here) in XOOPS 2.0.x and 2.3.x with similar symptoms.

The error I got when visiting any of the affected modules was
cannot redeclare adminmenu() (previously declared in ...) in .../xoopsinfo/include/functions.php

So, I fixed it with this hack. In the xoopsinfo/include/functions.php file, enclose/wrap the function adminmenu declare like this:
if (!function_exists('adminmenu')) {
     
// insert original function adminmenu() {} code here
}

This prevents the function from being declared here in XOOPSinfo when other modules are in operation. Hey, it works, and hopefully it will get fixed. Not sure if it's a problem with ThAdmin, but I expect more likely something in XOOPSinfo.
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

2
trabis
Re: XOOPSinfo Conflict When Using ThAdmin and Other Modules
  • 2008/12/14 22:43

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


All modules should prefix their functions that's why.
Guess the problem is in both modules.

3
mboyden
Re: XOOPSinfo Conflict When Using ThAdmin and Other Modules
  • 2008/12/14 23:26

  • mboyden

  • Moderator

  • Posts: 484

  • Since: 2005/3/9 1


Quote:
trabis wrote:
All modules should prefix their functions that's why.
Guess the problem is in both modules.

Absolutely, agree on the function nomenclature. However, it's also interesting that the problem only exists when ThAdmin is installed (or XOOPSInfo). It works fine with just one or the other is installed, but not when both are. Anyhoos, FWIW....
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

4
Mamba
Re: XOOPSinfo Conflict When Using ThAdmin and Other Modules
  • 2008/12/14 23:49

  • Mamba

  • Moderator

  • Posts: 11256

  • Since: 2004/4/23


Quote:
All modules should prefix their functions that's why.

Marco has developed a "Quality Checklist" for module developers. If it's not already there, it should be probably added.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

5
zoullou
Re: XOOPSinfo Conflict When Using ThAdmin and Other Modules
  • 2008/12/15 22:11

  • zoullou

  • Quite a regular

  • Posts: 250

  • Since: 2004/3/2 0


Hi,

Will be fixed in eXtGallery 1.0.5

Yours

Login

Who's Online

81 user(s) are online (46 user(s) are browsing Support Forums)


Members: 0


Guests: 81


more...

Donat-O-Meter

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

Latest GitHub Commits