WebsiteBaker Community Forum

WebsiteBaker Support (2.12.x) => General Help & Support => Topic started by: richwingerter on October 22, 2019, 08:35:42 AM

Title: Undefined function xnl2br()
Post by: richwingerter 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!




Title: Re: Undefined function xnl2br()
Post by: hgs 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
Title: Re: Undefined function xnl2br()
Post by: richwingerter 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!
Title: Re: Undefined function xnl2br()
Post by: richwingerter 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!
Title: Re: Undefined function xnl2br()
Post by: dbs 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
 (https://forum.WebsiteBaker.org/index.php/topic,31528.0.html)
Title: Re: Undefined function xnl2br()
Post by: richwingerter on October 23, 2019, 01:02:27 AM
dbs, thank you for the reference!