xoops forums

AngeloRocha

Just can't stay away
Posted on: 2015/7/4 1:26
AngeloRocha
AngeloRocha (Show more)
Just can't stay away
Posts: 603
Since: 2010/6/8 1
#1

[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.

Mamba

Moderator
Posted on: 2015/7/4 4:31
Mamba
Mamba (Show more)
Moderator
Posts: 10818
Since: 2004/4/23
#2

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

Which module?
What PHP version?

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

AngeloRocha

Just can't stay away
Posted on: 2015/7/4 12:12
AngeloRocha
AngeloRocha (Show more)
Just can't stay away
Posts: 603
Since: 2010/6/8 1
#3

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

Mamba

Moderator
Posted on: 2015/7/4 13:22
Mamba
Mamba (Show more)
Moderator
Posts: 10818
Since: 2004/4/23
#4

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

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.10 | Docs | Modules | Bugs

zyspec

Module Developer
Posted on: 2015/7/4 20:32
zyspec
zyspec (Show more)
Module Developer
Posts: 1055
Since: 2004/9/21
#5

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

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.

AngeloRocha

Just can't stay away
Posted on: 2015/7/5 17:36
AngeloRocha
AngeloRocha (Show more)
Just can't stay away
Posts: 603
Since: 2010/6/8 1
#6

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');
}

Mamba

Moderator
Posted on: 2015/7/5 19:57
Mamba
Mamba (Show more)
Moderator
Posts: 10818
Since: 2004/4/23
#7

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

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.10 | Docs | Modules | Bugs

AngeloRocha

Just can't stay away
Posted on: 2015/7/5 21:20
AngeloRocha
AngeloRocha (Show more)
Just can't stay away
Posts: 603
Since: 2010/6/8 1
#8

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?

Mamba

Moderator
Posted on: 2015/7/5 21:41
Mamba
Mamba (Show more)
Moderator
Posts: 10818
Since: 2004/4/23
#9

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

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.10 | Docs | Modules | Bugs

zyspec

Module Developer
Posted on: 2015/7/6 16:30
zyspec
zyspec (Show more)
Module Developer
Posts: 1055
Since: 2004/9/21
#10

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

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...