Jump to content

[SOLVED] Cannot login to Back Office after fresh installation(international Domain)1.7.8.0


Recommended Posts

1 hour ago, afsalthai said:

tried few ways from forums, but no luck.

Fresh install PS 1.7.78 out of nothing? Did you use presta before? Did you satisfy all requirements? In What Environment did you install, VPS, Shared hoster, dedicated?

 

Link to comment
Share on other sites

Nobody can help you with such generic issue description, set Debug ON:
Edit (by FTP or File manager in cPanel) this file PS_ROOT/config/defines.inc.php and change 

define('_PS_MODE_DEV_', false)
with 

define('_PS_MODE_DEV_', true)
then post the error message.

Link to comment
Share on other sites

the is is the error i'm getting in console after setting debug ON.
       POST https://elegantkids.co.th/admin876kjmtww/index.php?rand=1636795002716 500 jquery-3.4.1.min.js:2 
send @ jquery-3.4.1.min.js:2
ajax @ jquery-3.4.1.min.js:2
(anonymous) @ login.js?v=1.7.8.0:186
r.complete @ jquery-3.4.1.min.js:2
c @ jquery-3.4.1.min.js:2
fireWith @ jquery-3.4.1.min.js:2
u @ jquery-3.4.1.min.js:2
k.fx.tick @ jquery-3.4.1.min.js:2
lt @ jquery-3.4.1.min.js:2
k.fx.start @ jquery-3.4.1.min.js:2
k.fx.timer @ jquery-3.4.1.min.js:2
dt @ jquery-3.4.1.min.js:2
a @ jquery-3.4.1.min.js:2
dequeue @ jquery-3.4.1.min.js:2
(anonymous) @ jquery-3.4.1.min.js:2
each @ jquery-3.4.1.min.js:2
each @ jquery-3.4.1.min.js:2
queue @ jquery-3.4.1.min.js:2
animate @ jquery-3.4.1.min.js:2
k.fn.<computed> @ jquery-3.4.1.min.js:2
doAjaxLogin @ login.js?v=1.7.8.0:185
submitHandler @ login.js?v=1.7.8.0:14
s @ jquery.validate.js:2
(anonymous) @ jquery.validate.js:2
dispatch @ jquery-3.4.1.min.js:2
v.handle @ jquery-3.4.1.min.js:2

Screen Shot 2021-11-13 at 4.18.26 PM.png

Screen Shot 2021-11-13 at 4.19.02 PM.png

Link to comment
Share on other sites

Getting this error from Networks, 

note: my primary domain(ica.unx.bluehost.me) was changed couple of days before, now i use elegantkids.co.th (Thailand TLD)

--

FatalThrowableError

HTTP 500 Internal Server Error

Type error: idn_to_utf8() expects parameter 3 to be int, string given

Exception

Symfony\Component\Debug\Exception\FatalThrowableError

in src/Core/Util/InternationalizedDomainNameConverter.php (line 47)

        $parts = explode('@', $email);

        if (count($parts) !== 2) {

            return $email;

        }

        return $parts[0] . '@' . idn_to_utf8($parts[1], 0, INTL_IDNA_VARIANT_UTS46);

    }

}

idn_to_utf8('elegantkids.co.th', 0, 'INTL_IDNA_VARIANT_UTS46')in src/Core/Util/InternationalizedDomainNameConverter.php (line 47)

        $parts = explode('@', $email);

        if (count($parts) !== 2) {

            return $email;

        }

        return $parts[0] . '@' . idn_to_utf8($parts[1], 0, INTL_IDNA_VARIANT_UTS46);

    }

}

InternationalizedDomainNameConverter->emailToUtf8('[email protected]')in controllers/admin/AdminLoginController.php (line 205)

    public function processLogin()

    {

        /* Check fields validity */

        $passwd = trim(Tools::getValue('passwd'));

        $email = $this->IDNConverter->emailToUtf8(trim(Tools::getValue('email')));

        Hook::exec(

            'actionAdminLoginControllerLoginBefore',

            [

                'controller' => $this,

                'password' => $passwd,

AdminLoginControllerCore->processLogin()in controllers/admin/AdminLoginController.php (line 191)

                'controller' => $this,

            ]

        );

        if (Tools::isSubmit('submitLogin')) {

            $this->processLogin();

        } elseif (Tools::isSubmit('submitForgot')) {

            $this->processForgot();

        } elseif (Tools::isSubmit('submitReset')) {

            $this->processReset();

        }

AdminLoginControllerCore->postProcess()in classes/controller/Controller.php (line 295)

            if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {

                $this->setMedia();

            }

            // postProcess handles ajaxProcess

            $this->postProcess();

            if (!empty($this->redirect_after)) {

                $this->redirect();

            }

ControllerCore->run()in classes/Dispatcher.php (line 518)

            if (isset($params_hook_action_dispatcher)) {

                Hook::exec('actionDispatcher', $params_hook_action_dispatcher);

            }

            // Running controller

            $controller->run();

            // Execute hook dispatcher after

            if (isset($params_hook_action_dispatcher)) {

                Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);

            }

DispatcherCore->dispatch()in admin876kjmtww/index.php (line 93)

    if (!headers_sent()) {

        header('Content-Type: text/html; charset=utf-8');

    }

    // Prepare and trigger LEGACY admin dispatcher

    Dispatcher::getInstance()->dispatch();

}

Logs 2

LevelChannelMessage

INFO08:51:40phpUser Deprecated: Not specifying the optional ShopConstraint parameter is deprecated since version 1.7.8.0

INFO08:51:40phpUser Deprecated: Not specifying the optional ShopConstraint parameter is deprecated since version 1.7.8.0

INFO08:51:40phpUser Deprecated: Not specifying the optional ShopConstraint parameter is deprecated since version 1.7.8.0

INFO08:51:40phpUser Deprecated: Not specifying the optional ShopConstraint parameter is deprecated since version 1.7.8.0

INFO08:51:40phpUser Deprecated: Not specifying the optional ShopConstraint parameter is deprecated since version 1.7.8.0

INFO08:51:40phpUser Deprecated: Not specifying the optional ShopConstraint parameter is deprecated since version 1.7.8.0

CRITICAL08:51:40phpType error: idn_to_utf8() expects parameter 3 to be int, string given

CRITICAL08:51:41requestUncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Type error: idn_to_utf8() expects parameter 3 to be int, string given" at /home2/icaunxmy/public_html/src/Core/Util/InternationalizedDomainNameConverter.php line 47

Stack Trace

FatalThrowableError

Symfony\Component\Debug\Exception\FatalThrowableError: Type error: idn_to_utf8() expects parameter 3 to be int, string given at src/Core/Util/InternationalizedDomainNameConverter.php:47 at idn_to_utf8('elegantkids.co.th', 0, 'INTL_IDNA_VARIANT_UTS46') (src/Core/Util/InternationalizedDomainNameConverter.php:47) at PrestaShop\PrestaShop\Core\Util\InternationalizedDomainNameConverter->emailToUtf8('[email protected]') (controllers/admin/AdminLoginController.php:205) at AdminLoginControllerCore->processLogin() (controllers/admin/AdminLoginController.php:191) at AdminLoginControllerCore->postProcess() (classes/controller/Controller.php:295) at ControllerCore->run() (classes/Dispatcher.php:518) at DispatcherCore->dispatch() (admin876kjmtww/index.php:93)

Link to comment
Share on other sites

hosting provider updated php 7.3 and icu as per listed below

but hosting says "ICU version is related with prestashop dashboard, prestashop is 3rd party, we recommend contacting prestashop support and update dashboard."

can you recommend how i can solve this.

 

Thank you so much

Link to comment
Share on other sites

It should work but if it doesn't you could try as described below.
Do this change in the file "src/Core/Util/InternationalizedDomainNameConverter.php".
The constant INTL_IDNA_VARIANT_UTS46 needs to be converted to int type explicitelly by intval() on the line 47.
If you have this line:

return $parts[0] . '@' . idn_to_utf8($parts[1], 0, (INTL_IDNA_VARIANT_UTS46));


Change it to this:
 

return $parts[0] . '@' . idn_to_utf8($parts[1], 0, intval(INTL_IDNA_VARIANT_UTS46));

 

  • Like 1
Link to comment
Share on other sites

18 hours ago, Rhobur said:

It should work but if it doesn't you could try as described below.
Do this change in the file "src/Core/Util/InternationalizedDomainNameConverter.php".
The constant INTL_IDNA_VARIANT_UTS46 needs to be converted to int type explicitelly by intval() on the line 47.
If you have this line:

return $parts[0] . '@' . idn_to_utf8($parts[1], 0, (INTL_IDNA_VARIANT_UTS46));


Change it to this:
 

return $parts[0] . '@' . idn_to_utf8($parts[1], 0, intval(INTL_IDNA_VARIANT_UTS46));

 

Solved ! Thank you so much, i was working on it for last 1 week, you saved me.

 

Link to comment
Share on other sites

18 hours ago, Rhobur said:

It should work but if it doesn't you could try as described below.
Do this change in the file "src/Core/Util/InternationalizedDomainNameConverter.php".
The constant INTL_IDNA_VARIANT_UTS46 needs to be converted to int type explicitelly by intval() on the line 47.
If you have this line:

return $parts[0] . '@' . idn_to_utf8($parts[1], 0, (INTL_IDNA_VARIANT_UTS46));


Change it to this:
 

return $parts[0] . '@' . idn_to_utf8($parts[1], 0, intval(INTL_IDNA_VARIANT_UTS46));

 

This worked and now i can log in to my dashboard. 

is it permanently solved? or i have to do something ?

Edited by afsalthai (see edit history)
Link to comment
Share on other sites

It is permanently solved until maybe the next PS upgrade you'll perform; if then the issue persists you might have to repeat this procedure.
Please edit your first post and add [SOLVED] at the beginning of the post'title so other people with the same issue might find the solution.
You're welcome! 🙂

Link to comment
Share on other sites

  • afsalthai changed the title to [SOLVED] Cannot login to Back Office after fresh installation(international Domain)1.7.8.0
  • 5 months later...
On 11/13/2021 at 10:20 AM, afsalthai said:

the is is the error i'm getting in console after setting debug ON.
       POST https://elegantkids.co.th/admin876kjmtww/index.php?rand=1636795002716 500 jquery-3.4.1.min.js:2 
send @ jquery-3.4.1.min.js:2
ajax @ jquery-3.4.1.min.js:2
(anonymous) @ login.js?v=1.7.8.0:186
r.complete @ jquery-3.4.1.min.js:2
c @ jquery-3.4.1.min.js:2
fireWith @ jquery-3.4.1.min.js:2
u @ jquery-3.4.1.min.js:2
k.fx.tick @ jquery-3.4.1.min.js:2
lt @ jquery-3.4.1.min.js:2
k.fx.start @ jquery-3.4.1.min.js:2
k.fx.timer @ jquery-3.4.1.min.js:2
dt @ jquery-3.4.1.min.js:2
a @ jquery-3.4.1.min.js:2
dequeue @ jquery-3.4.1.min.js:2
(anonymous) @ jquery-3.4.1.min.js:2
each @ jquery-3.4.1.min.js:2
each @ jquery-3.4.1.min.js:2
queue @ jquery-3.4.1.min.js:2
animate @ jquery-3.4.1.min.js:2
k.fn.<computed> @ jquery-3.4.1.min.js:2
doAjaxLogin @ login.js?v=1.7.8.0:185
submitHandler @ login.js?v=1.7.8.0:14
s @ jquery.validate.js:2
(anonymous) @ jquery.validate.js:2
dispatch @ jquery-3.4.1.min.js:2
v.handle @ jquery-3.4.1.min.js:2

Screen Shot 2021-11-13 at 4.18.26 PM.png

Screen Shot 2021-11-13 at 4.19.02 PM.png

I didn't all the response, but I hope you modified your admin filder name since you post that image... because it gold for hackers... Always hiding the admin foldername 

  • Thanks 1
Link to comment
Share on other sites

  • 4 months later...
On 11/14/2021 at 10:47 AM, Rhobur said:

It should work but if it doesn't you could try as described below.
Do this change in the file "src/Core/Util/InternationalizedDomainNameConverter.php".
The constant INTL_IDNA_VARIANT_UTS46 needs to be converted to int type explicitelly by intval() on the line 47.
If you have this line:

return $parts[0] . '@' . idn_to_utf8($parts[1], 0, (INTL_IDNA_VARIANT_UTS46));


Change it to this:
 

return $parts[0] . '@' . idn_to_utf8($parts[1], 0, intval(INTL_IDNA_VARIANT_UTS46));

 

Hi!!, with this proposal I can enter in the backoffice... however, I have problems with sending emails due to the same file.

I propose the next solution (now I can enter to the backoffice and send emails):

Change the line:

return $parts[0] . '@' . idn_to_utf8($parts[1], 0, INTL_IDNA_VARIANT_UTS46);

 

With the following:

if (defined('INTL_IDNA_VARIANT_UTS46')) {
    return $parts[0] . '@' . idn_to_utf8($parts[1], 0, INTL_IDNA_VARIANT_UTS46);
}
        
if (defined('INTL_IDNA_VARIANT_2003')) {
    return $parts[0] . '@' . idn_to_utf8($parts[1], 0, INTL_IDNA_VARIANT_2003);
}

 

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...