0

I have a problem with Magento 2.3, when I use X-debug on the checkout part, I have the following exception :

Exception has occured.
Magento\framework\Exception\NosuchEntityException: No such entity with customerId =

So far nothing that much surprising, basic so detail exception from Magento so looking for solution and hop a solution : https://magefan.com/blog/no-such-entity-fix-for-magento-2 (or more exactly as solution to see where is the problem)

So ok let add :

 foreach (debug_backtrace() as $_stack) {
        echo ($_stack["file"] ? $_stack["file"] : '') . ':' .
            ($_stack["line"] ? $_stack["line"] : '') . ' - ' .
            ($_stack["function"] ? $_stack["function"] : '');
     }
    exit();

And TaDa :

Exception has occured. Exception: Notice: Undefined index: file in /var/www/mywebsite/magento/framework/Exception/NoSuchEntityException.php on line 37

So of course this come from the file modified according to https://magefan.com/blog/no-such-entity-fix-for-magento-2 and line 37 is

        echo ($_stack["file"] ? $_stack["file"] : '') . ':' .

Appearing that file is not a defined index, but then what should I do instead ? Someone has a solution to solve it ?

PS: in case of minus please let me know why so that I can improve my post

1 Answer 1

0

Why not using this:

 var_dump(debug_backtrace());

debug_backtrace() is a native php function. https://www.php.net/debug_backtrace

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.