Author Topic: Undefined function xnl2br()  (Read 418 times)

Offline richwingerter

  • Posts: 60
Undefined function xnl2br()
« on: October 22, 2019, 08:35:42 AM »
I have WebsiteBaker 2.12.1 and I tried signing up a test user. When I put in the information for them, I get this message:

Quote
There was an uncatched exception
Call to undefined function xnl2br()
in line (78) of (/account/signup_form.php):

I checked and it looks like xnl2br is properly defined in frontend.functions. php:

Code: [Select]
    if (!function_exists('xnl2br')){
        function xnl2br ($sText)
        {
        $sRetval = '';
// build array width searches
        if (!\is_array($sText)){
            $aResult = preg_split('/\R/', $sText, -1, PREG_SPLIT_DELIM_CAPTURE);
        }
        $pattern = '/[<^\/\w]+[>]|[<^\/\w]+[>].*<[\/\w>]+/is';
        foreach($aResult as $sResult) {
            $sResult .= "\n";
            if (preg_match($pattern,$sResult)){
              $sRetval .= $sResult.PHP_EOL;
              continue;
            }
            $sRetval .= preg_replace('/[\n\r]/u', '',nl2br($sResult, !defined('XHTML'))).PHP_EOL;
        }
        return $sRetval;
        }
    }

The user is actually signed up and I get the e-mail message with their password. I can log in with that username and password.

Does anyone have advice how to find and resolve this problem? I don't see anyone else having a problem with this.

I get this error message in Chrome and Firefox on the Mac and Firefox on Windows.

Thanks for your help!





Offline hgs

  • Betatester
  • **
  • Posts: 1279
    • EFG MG
Re: Undefined function xnl2br()
« Reply #1 on: October 22, 2019, 03:25:52 PM »
I would try the current version (2.12.2).
As far as I know, there are no problems there
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Offline richwingerter

  • Posts: 60
Re: Undefined function xnl2br()
« Reply #2 on: October 22, 2019, 08:00:56 PM »
I'm willing to do that, but is there a tar.gz copy somewhere? I don't see it for this version.

Also, if no one commented on this issue in 2.12.1, why would it be fixed in 2.12.2?

I think this is a configuration problem, of some kind, but I don't know which configuration parameter would affect this. It also doesn't seem like any of the other frontend functions are affected.

Thanks for your help!

Offline richwingerter

  • Posts: 60
Re: Undefined function xnl2br()
« Reply #3 on: October 22, 2019, 08:20:15 PM »
Also, I don't see any clear instructions on how to upgrade from 2.12.1 to 2.12.2.  Should I follow the instructions under 2.12.1 and use unzip.php.zip?

Is there anywhere I can find general installation instructions that would work for 2.12.2?

I looked at the signup_form.php files for these versions, and there are changes to the file. So, perhaps this problem has just been solved in the upgrade. I'll know if I can ever get it installed!

Offline dbs

  • Betatester
  • **
  • Posts: 8402
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Undefined function xnl2br()
« Reply #4 on: October 22, 2019, 09:33:00 PM »
Hi, if something is unclear in this link, ask again.
https://forum.WebsiteBaker.org/index.php/topic,31528.msg220618.html#msg220618

Offline richwingerter

  • Posts: 60
Re: Undefined function xnl2br()
« Reply #5 on: October 23, 2019, 01:02:27 AM »
dbs, thank you for the reference!