1
AngeloRocha
[Search Results] Problem after upgrade 2.4.4 to 2.5.7

When i search and click in "Show all results" in search results i give a blank page. In debug show no erros, only deprecated messages:

'/class/xoopsobject.php' is deprecated since XOOPS 2.5.4please use 'kernel/object.php' instead.
'Database::getInstance();' is deprecated since XOOPS 2.5.4please use 'XoopsDatabaseFactory::getDatabaseConnection();' instead.
'/class/mimetypes.inc.php' is deprecated, use '/include/mimetypes.inc.php' directly.
'Database::getInstance();' is deprecated since XOOPS 2.5.4please use 'XoopsDatabaseFactory::getDatabaseConnection();' instead.
'Database::getInstance();' is deprecated since XOOPS 2.5.4please use 'XoopsDatabaseFactory::getDatabaseConnection();' instead.
'Database::getInstance();' is deprecated since XOOPS 2.5.4please use 'XoopsDatabaseFactory::getDatabaseConnection();' instead.
'Database::getInstance();' is deprecated since XOOPS 2.5.4please use 'XoopsDatabaseFactory::getDatabaseConnection();' instead.
'Database::getInstance();' is deprecated since XOOPS 2.5.4please use 'XoopsDatabaseFactory::getDatabaseConnection();' instead.

2
Mamba
Re: [Search Results] Problem after upgrade 2.4.4 to 2.5.7
  • 2015/7/4 4:31

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Which module?
What PHP version?

Did you run the /upgrade ?
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
AngeloRocha
Re: [Search Results] Problem after upgrade 2.4.4 to 2.5.7

Hi Michal, now show the following error:
Fatal errorCall to a member function search() on a non-object in /home/folhagospel/public_html/search.php on line 214


The error appears in any module.
Modules:
Contact 1.71
Profile 1.86
Mastop Publish 1.1
Mastop Go2 1
Liaise 1.27
Extcal 2.24
Catads 1.4
Soapbox 1.6
XoopsPolls 1.2
Forum 2.01
News 1.67
rw-banner 1.6
Sections 1

PHP version: 5.4.42
MySql version: 5.0.51a
XOOPS: 2.5.7

4
Mamba
Re: [Search Results] Problem after upgrade 2.4.4 to 2.5.7
  • 2015/7/4 13:22

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
The error appears in any module.

What I normally do is to deactivate the modules one by one to see which one is causing the problem.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

5
zyspec
Re: [Search Results] Problem after upgrade 2.4.4 to 2.5.7
  • 2015/7/4 20:32

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Angelo,

Xoopspoll 1.2 will definitely give you the errors above. The module's class objects try to instantiate the database using Database::getInstance() and most of them also include the XOOPS_ROOT_PATH."/class/xoopsobject.php" file. There are newer versions of Xoopspoll you can install that are compatible with 2.5.7 that should eliminate these problems.

Not sure about the other modules you have installed so it may be some of those are also causing issues.

Hope this helps.

6
AngeloRocha
Re: [Search Results] Problem after upgrade 2.4.4 to 2.5.7

Thanks zyspec and mamba.

The problem is the rw-banner module when i insert the hack in the header.php of xoops core.

$mod XoopsModule::getByDirname("rw_banner");
if (
$mod){
    include_once (
XOOPS_ROOT_PATH.'/modules/rw_banner/include/maketags.php');
}

7
Mamba
Re: [Search Results] Problem after upgrade 2.4.4 to 2.5.7
  • 2015/7/5 19:57

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:

AngeloRocha wrote:

The problem is the rw-banner module when i insert the hack in the header.php of xoops core.

$mod XoopsModule::getByDirname("rw_banner");
if (
$mod){
    include_once (
XOOPS_ROOT_PATH.'/modules/rw_banner/include/maketags.php');
}

You said, you have "rw-banner 1.6"

Where did you get it? Do you have a link? I am aware only of 1.51, and Zyspec made some changes and it will become then 1.52.

One more thing:

You need to be careful where you insert the hack in the header.php, otherwise you'll get a "Fatal Error" and a blank screen, because when XOOPS gets to maketags.php, and goes to this line:

$xoopsTpl->assign($lista_tags[$i]->getName(), $rwbanner->showBanner($lista_tags[$i]->getCateg(), $lista_tags[$i]->getQtde(), $lista_tags[$i]->getCols()));


and because the $xoopsTpl is not defined yet, it will generate something like this because the $xoopsTpl is not yet available:

Quote:
Fatal error: Call to a member function assign() on null in \modules\rwbanner\include\maketags.php on line 53


So the best way is to insert your hack lines after these lines in header.php:

$xoTheme  =& $xoopsThemeFactory->createInstance(array('contentTemplate' => @$xoopsOption['template_main']));
    
$xoopsTpl =& $xoTheme->template;
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

8
AngeloRocha
Re: [Search Results] Problem after upgrade 2.4.4 to 2.5.7

Hi Michael, i do not remember where i downloaded.
The hack still pemanece same?

9
Mamba
Re: [Search Results] Problem after upgrade 2.4.4 to 2.5.7
  • 2015/7/5 21:41

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
The hack still pemanece same?

After looking closer into it, you don't need it anymore, because it is already included in /preloads/core.php
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

10
zyspec
Re: [Search Results] Problem after upgrade 2.4.4 to 2.5.7
  • 2015/7/6 16:30

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Angelo,

Do you think you could zip up a copy and send it to me? I'd like to compare what you have to the version I was working on. I'll PM you my email address...

Login

Who's Online

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


Members: 0


Guests: 197


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