11
kris_fr
Re: admin blank page for News module 1.64
  • 2009/11/23 9:21

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31



12
voltan
Re: admin blank page for News module 1.64
  • 2009/11/26 12:12

  • voltan

  • Theme Designer

  • Posts: 724

  • Since: 2006/12/5


some of XOOPS module like tag , article and extgallery have this line in admin/menu.php

global $adminmenu;


whit this line all admin areas have problem ( in all XOOPS version and icms ) . if you look good you can see problem in default theme and thadmin too !

news don't have problem


13
trabis
Re: admin blank page for News module 1.64
  • 2009/11/26 13:54

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Here is my comment on oxygen first beta release:
Quote:

I had that problem with the publisher module. It happens that I was using global $adminmenu.

My solution was not to use the global $adminmenu but create my own global $publisher_adminmenu. Then in admin/menu.php, just after defining my menu, I used $publisher_adminmenu = $adminmenu (which contain my menu).

What happens is that core 'module' class uses include_once to include your menu. So if you are using a global variable and she gets overwrited by other modules you will not be able to use the class method to include your file again and overwrite that global with the correct value.

The correct solution is to fix this in module has I did, but you can also hack OXIGEN. Just edit system/guy/oxigen/oxigen.php

Search by this

if (is_object($xoopsModule) || !empty($_GET['xoopsorgnews'])) {
return;
}


And add an extra line like this:

if (is_object($xoopsModule) || !empty($_GET['xoopsorgnews'])) {
@include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/'.$xoopsModule->getInfo('adminmenu');
return;
}


This will force the menu to be included again and populate the global with the correct values.

Sorry if I cannot explain me better.

14
ghia
Re: admin blank page for News module 1.64
  • 2009/11/26 14:16

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I prefer the last solution (altough it should worked out a little bit more to get rid of the @).

It is the (1) core that should stay functional with the (many) modules and not the reverse.

15
voltan
Re: admin blank page for News module 1.64
  • 2009/11/26 17:40

  • voltan

  • Theme Designer

  • Posts: 724

  • Since: 2006/12/5


I fixed oxygen.php . I hop the problem solved ! thanks

16
kris_fr
Re: admin blank page for News module 1.64
  • 2009/11/26 18:52

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31


This is not resolved, install the XoopsInfo and see what happens with the news module, exgallery, sitemap, ...
the problematic code is this:
$rtn['url'] = XOOPS_URL '/modules/'$mod->getVar('dirname''n') . '/'
$modOptions $mod->getAdminMenu(); 
$rtn['options'] = $modOptions;


for horizontal menu (and sub) in xo_menu.html

and not xo_toolbar.html

Login

Who's Online

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


Members: 0


Guests: 325


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