1
oswaldo
I have an error in the profile module when I close session and user registration
  • 2021/7/14 21:50

  • oswaldo

  • Quite a regular

  • Posts: 215

  • Since: 2008/8/22


XOOPS 2.5.11-Beta2
PHP 8.0.3
mySQL 5.5.5-10.4.18-MariaDB
Profiles 1.91

Error : Error: Call to undefined function xoops_setcookie()

2
Mamba
Re: I have an error in the profile module when I close session and user registration
  • 2021/7/15 11:49

  • Mamba

  • Moderator

  • Posts: 11413

  • Since: 2004/4/23


You need to provide more details.

For example, are you registering a new user?

When you say: "When I close session", do you mean that you logout?

What are the steps that we should follow in order to reproduce the issue?
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
oswaldo
Re: I have an error in the profile module when I close session and user registration
  • 2021/7/15 19:45

  • oswaldo

  • Quite a regular

  • Posts: 215

  • Since: 2008/8/22


Quote:
When you say: "When I close session", do you mean that you logout?

Yes, when I logout Ihave the error page

A problem has occurred on our server!
Page is currently unavailable
We are working on a fix
Please come back soon ...

Error : Error: Call to undefined function xoops_setcookie()

Quote:
For example, are you registering a new user?

Yes, the register page have error:

A problem has occurred on our server!
Page is currently unavailable
We are working on a fix
Please come back soon ...

Error : Error: Undefined constant "_US_DESCRIPTIONMIN"

Edit: Solved the registry error was lack of translation, but I still have the error in logout

Please help me, I do not know if it is a translation error or not, although I have completely revised it

4
goffy
Re: I have an error in the profile module when I close session and user registration
  • 2021/7/16 14:51

  • goffy

  • Just can't stay away

  • Posts: 544

  • Since: 2010/12/27


Hi

are you trying with english or another language, maybe for testing you should use english

which template are you using?

can you test whether it comes from module 'profiles':
goto modules/profiles/user.php line 88 and 89 and put a // at the beginning of the line then it should look like
// xoops_setcookie($GLOBALS['xoopsConfig']['usercookie'], null, time() - 3600, '/', XOOPS_COOKIE_DOMAIN, 0);
// xoops_setcookie($GLOBALS['xoopsConfig']['usercookie'], null, time() - 3600, '/');

5
oswaldo
Re: I have an error in the profile module when I close session and user registration
  • 2021/7/16 17:12

  • oswaldo

  • Quite a regular

  • Posts: 215

  • Since: 2008/8/22


Thanks goffy

Quote:
are you trying with english or another language, maybe for testing you should use english

I am trying with spanish language.

Quote:
which template are you using?

I'm not sure if that's what you're asking, I'm using the .tpl templates

Quote:
can you test whether it comes from module 'profiles':
goto modules/profiles/user.php line 88 and 89 and put a // at the beginning of the line then it should look like


this works fine

thanks

6
oswaldo
Re: I have an error in the profile module when I close session and user registration
  • 2021/7/17 1:36

  • oswaldo

  • Quite a regular

  • Posts: 215

  • Since: 2008/8/22


Sorry I am using the module templates

7
goffy
Re: I have an error in the profile module when I close session and user registration
  • 2021/7/17 7:40

  • goffy

  • Just can't stay away

  • Posts: 544

  • Since: 2010/12/27


hi oswaldo

theme: i meant whether you are using xbootstap, xswatch or what else.

because if it is the same with another theme we would know whether the problem is located in the theme files or not ;)

as I also cant reproduce your error I think that there is a problem with your XOOPS installation, maybe is one of the necessary files or folders broken or not readable. maybe you should overwrite your XOOPS with the actual version from https://github.com/XOOPS/XoopsCore25

8
oswaldo
Re: I have an error in the profile module when I close session and user registration
  • 2021/7/17 15:14

  • oswaldo

  • Quite a regular

  • Posts: 215

  • Since: 2008/8/22


Thanks i will do IT
I'm using te bootstrap 3 theme

9
oswaldo
Re: I have an error in the profile module when I close session and user registration
  • 2021/7/18 15:33

  • oswaldo

  • Quite a regular

  • Posts: 215

  • Since: 2008/8/22


A question to the masters

I have been looking for the xoops_setcookie function in the entire htdocs folder, using Replace Studio and I only found it in the user.php file in the profiles module and in main.php in system module preferences, in the files checklogin.php, common.php, functions.php, session.php, smarty.class.php, cookie.php, user.php and others from the core, only setcookie appears, I deleted xoops_ from the word xoops_setcookies from lines 88 and 89 of the user.php file of the profiles module, leaving only setcookies and the error disappeared.

Is it okay to leave it like that or not?

I'm using
XOOPS 2.5.11-Beta2
PHP 8.0.3
mySQL 5.5.5-10.4.18-MariaDB
Profiles 1.91

10
geekwright
Re: I have an error in the profile module when I close session and user registration

No, it isn't really OK.

To use XoopsCore25 2.5.11-Beta2 you need to take the complete latest master branch from https://github.com/XOOPS/XoopsCore25

You have a newer version of htdocs/modules/profile while the rest of htdocs is older. You should find xoops_setcookie() used nearly everywhere, as setcookie() is avoided in core except in very limited cases and in the implementation of xoops_setcookie() in htdocs/include/xoopssetcookie.php included by htdocs/include/common.php

This is a very important change for compatibility with newer PHP versions and evolving web standards.

See: https://github.com/XOOPS/XoopsCore25/pull/1026 for details on this new function and the reasons for it

Login

Who's Online

128 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 128


more...

Donat-O-Meter

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

Latest GitHub Commits