') ') Fork me on GitHub

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $10.00
Net Balance: $9.41
Left to go: $90.59

Donations
Dante7237  ($10)Dec-3

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 3.0 4 6 2013 Abuse Android AntiHarvesting AntiMalUser AntiSpam API Apple Battlefield Blocks Bootstrap By Captcha cell cent chronolabs CHUNG Clicks content CĂN demo docek download Dresses evden eve facebook Fat Food for free Gateway giải Google Guide herre Honeypot Human HỘ IP iPhone jQuery Law Legal List Loss mobile module modules Monster new newbb news NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher RESIDENCE responsive review Rights rmcommon security Sentry Signatures Signed site Smartphone Smoking Solution Spam Studio tags tdmcreate The Theme themes tháp web weight Wishcraft xoops Xortify XPayment

New Users

Registering user

# 137911

mydarkglobe

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  |  Register To Post

(1) 2 3 4 »


#1 Posted on: 2011/11/27 5:40 Deprecated since Xoops 2.5.4: how can I solve this
I upgraded from 2.5.3 to 2.5.4 using the upgrade package. My test system generates quite a lot of "deprecated" classes or functions:

'/class/xoopstory.php' is deprecated since XOOPS 2.5.4please create your own class instead.
'/class/xoopstopic.php' is deprecated since XOOPS 2.5.4please create your own class instead.
'/class/user.php' is deprecated since XOOPS 2.5.4please use 'kernel/user.php' instead.


Furthermore, I have 65 identical messages:

'Database::getInstance();' is deprecated since XOOPS 2.5.4please use 'XoopsDatabaseFactory::getDatabaseConnection();' instead.


How can I solve these messages ? What module could be the culprit ?

SME Drieben

Top

SMEDrieben
Joined:
2009/6/17 2:10
Group:
Registered Users
Posts: 113
(Show More) (Show Less)


#2 Posted on: 2011/11/27 5:52 Re: Deprecated since Xoops 2.5.4: how can solve this
Quote:
How can I solve these messages ? What module could be the culprit ?

Hopefully the module authors will update soon their modules. Several of the developers are now working together on the "Basic Module Pack", and those modules should have those issues solved.

If you want to solve it yourself, it all depends on the deprecated function, but many of them will be solved by simple Search & Replace in the /modules folder (using something like InfoRapid Search & Replace). For example:

Database::getInstance(); ==> XoopsDatabaseFactory::getDatabaseConnection();
/class/xoopsuser.php ==> /kernel/user.php
/class/xoopsobject.php ==> /kernel/object.php
/class/xoopsmodule.php ==> /kernel/module.php

/class/xoopstory.php and /class/xoopstopic.php will require more work. I think, it's only in News, and ZySpec is looking into it.

For the time being, you can ignore those messages. But the authors have to fix the modules before we go to XOOPS 2.6.0, otherwise they won't work there.

Top


Please support XOOPS & DONATE
Use 2.5.7 | Debugging | Requests | Bugs
Mamba
Joined:
2004/4/23 13:58
From Ohio, USA
Group:
Webmaster
Registered Users
Designer Group
Posts: 8157
(Show More) (Show Less)


#3 Posted on: 2011/11/27 6:42 Re: Deprecated since Xoops 2.5.4: how can I solve this
Thanks for your quick response !

What is your favourite Find/Search and Replace program or tool ? I still use "AF9 Replace some bytes". The disadvantage of this tool is that files in subfolders must be added manually. Are you aware of a tool that searches a module map (e.g. news) and all files in subfolders ?

Thanks !

Drieben

Top

SMEDrieben
Joined:
2009/6/17 2:10
Group:
Registered Users
Posts: 113
(Show More) (Show Less)


#4 Posted on: 2011/11/27 10:08 Re: Deprecated since Xoops 2.5.4: how can I solve this
Quote:

SMEDrieben wrote:

Are you aware of a tool that searches a module map (e.g. news) and all files in subfolders ?


As Mamba suggested, InfoRapid is pretty good, I used it lot of times:
http://www.inforapid.de/html/searchreplace.htm

Top


Xoops User Utilities | Xoops Search Engine | vil3/trabisdementia
trabis
Joined:
2006/9/1 13:10
From Portugal
Group:
Webmaster
Registered Users
Posts: 2198
(Show More) (Show Less)


#5 Posted on: 2011/11/27 13:40 Re: Deprecated since Xoops 2.5.4: how can I solve this
Best tool is Notepad++

Top


Resized Image
XooFoo.org
kris_fr
Joined:
2005/12/30 18:15
From Bretagne
Group:
Registered Users
Posts: 801
(Show More) (Show Less)


#6 Posted on: 2011/11/27 14:03 Re: Deprecated since Xoops 2.5.4: how can I solve this
Quote:
Best tool is Notepad++

While Notepad is very good for editing, and I am using it quite often, InfoRapid Search & Replace seems to be much faster in the search/replace.

Actually, very often I am using both of them - while I am working on code in Notepad++, I don't want to have the extra search window, as it takes too much space. So having a separate search application is very handy

The only thing that I am missing is the capability to search UTF-8 characters, like the Asian/Arabic alphabets. Here Notepad++ works better, but for regular code, InfoRapid Search & Replace is excellent.

Top


Please support XOOPS & DONATE
Use 2.5.7 | Debugging | Requests | Bugs
Mamba
Joined:
2004/4/23 13:58
From Ohio, USA
Group:
Webmaster
Registered Users
Designer Group
Posts: 8157
(Show More) (Show Less)


#7 Posted on: 2011/11/27 14:41 Re: Deprecated since Xoops 2.5.4: how can I solve this
Thanks ! Notepad++ is already one of my favourites. InfoRapid Search & Replace is exactly the tool I was looking for !

It works ! Most deprecation messages have disappeared.

SMEDrieben

Top

SMEDrieben
Joined:
2009/6/17 2:10
Group:
Registered Users
Posts: 113
(Show More) (Show Less)


#8 Posted on: 2011/11/27 15:05 Re: Deprecated since Xoops 2.5.4: how can I solve this
There are some other deprecations. E.g.:

Function xoops_getLinkedUnameFromId() is deprecated, use XoopsUserUtility::getUnameFromId() instead


Simple replacement of this function generated a fatal error in wfdownloads:

Fatal error: Class 'XoopsUserUtility' not found in C:xampplitehtdocspublic_htmlmoduleswfdownloadsclassdownload.php on line 240


What should be done with:

Class 'XoopsTree' is deprecatedcheck 'XoopsObjectTree' in tree.php


Thanks !

SMEDrieben

Top

SMEDrieben
Joined:
2009/6/17 2:10
Group:
Registered Users
Posts: 113
(Show More) (Show Less)


#9 Posted on: 2011/11/27 16:16 Re: Deprecated since Xoops 2.5.4: how can I solve this
Quote:

SMEDrieben wrote:

Function xoops_getLinkedUnameFromId() is deprecated, use XoopsUserUtility::getUnameFromId() instead


Simple replacement of this function generated a fatal error in wfdownloads:

Fatal error: Class 'XoopsUserUtility' not found in C:xampplitehtdocspublic_htmlmoduleswfdownloadsclassdownload.php on line 240



On 2.5.x you need to load the class before you use it.
Please use xoops_load('XoopsUserUtility'); before making any call to it.
On 2.6.x there will be no need to load core classes, they are autoloaded.

Quote:

What should be done with:

Class 'XoopsTree' is deprecatedcheck 'XoopsObjectTree' in tree.php



It depends on the module and your developer skills. My guess is that modules using XoopsTree do not have classes extending XoopsObject. You would have to change module classes and make them 'blue' (as in blue move).

The easier way (and dirty) to remove that messages and to have your modules running, is the following:
- Copy class/xoopstree.php into your module/class folder and replace all file includes to use that new path.
- Open the file and rename 'class XoopsTree' into class 'ModulenameTree'
- Remove the xoopsLogger->addDeprecated line from the file.
- Rename XoopsTree calls into 'ModulenameTree'

Top


Xoops User Utilities | Xoops Search Engine | vil3/trabisdementia
trabis
Joined:
2006/9/1 13:10
From Portugal
Group:
Webmaster
Registered Users
Posts: 2198
(Show More) (Show Less)


#10 Posted on: 2011/11/27 16:32 Re: Deprecated since Xoops 2.5.4: how can I solve this
Quote:
/class/xoopstory.php and /class/xoopstopic.php will require more work. I think, it's only in News, and ZySpec is looking into it.


To resolve momentarily the problem i include the file xoopstory.php and xoopstopic.php in the module...
In this mode there are the problems with new xoops version?

Some modules are not supported, i do not know how as upgrade these.

Top

Roby73
Joined:
2011/6/15 16:31
From Torino
Group:
Registered Users
Posts: 229
(Show More) (Show Less)




(1) 2 3 4 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create pdf.
You cannot get print page.

[Advanced Search]