cancel
Showing results for 
Search instead for 
Did you mean: 

no such entity with order id =

no such entity with order id =

Hi everyone,

I'm stuck at one problem. I've spent a couple of hours finding a solution but I can't find one.

When I want to place an order on our live web shop everything goes well as long as I'm not signed in with an account that has been made earlier. I assume the problem is related to customer groups, when I'm an 'guest' everything goes well, when i'am signed in I get the message 'No such entity with orderid ='. In Dutch 'Geen dergelijk entiteit met orderId ='.

I hope someone can help me out of this annoying problem.

All help is highly appreciated.Schermafbeelding 2019-05-04 om 13.57.14.png

7 REPLIES 7

Re: no such entity with order id =

Hi @kai_ahnendorp 

 

Can you please confirm, if you are using this extension in your website? 

 

In case if you are using you need to upgrade this extension. It was an default issue in this extension and fixed now in latest version.

 

I hope it will help you.

 

Thanks
--
If my answer is useful, please Accept as Solution & give Kudos

Re: no such entity with order id =

Hi PankajS_Magento,

 

Thanks for your support for so far.

 

I can confirm that the extension you are calling isn't used, for transportation we are using/partner of SendCloud and we are using their extension. I've checked if SendCloud has an newer extension, but the extension we use from SendCloud is the newest release.

 

I hope you or other people can help me out :-).

Re: no such entity with order id =

Hi,

 

Do you have further suggestions?

Re: no such entity with order id =

  • Looks like SendCloud uses a Plugin before order placement sends them a screen your Magento plugin doesn't work on Magento 2.1,  2.2, 2.3 send much information. Pro Tip use extensions from the Magento Marketplace.  

best regards,

 

Lars 

 

------ 

Maintainer - Magento Community Engineering

Maintainer - Magento Community Engineering Team
Magento Certified Developer Plus
Zend Certified PHP Engineerr

Re: no such entity with order id =

Hi @lars_roettig ,

 

First of all, thanks for you're reply.

 

I've reported this by the company SendCloud. SendCloud is taking very long to dive in the problem/incident. As part of a couple new modules i want to implement, i've created an development environment. In this environment i've disabled the SendCloud plugin completely, but... It doesn't solve the problem, it's unchanged.

 

Does anyone have suggestions for me? Where do i have to search?

 

Kind regards,

Re: no such entity with order id =

Anyone any suggestions?

Re: no such entity with order id =

Hello kai_ahnendorp,

 

The error usually occurs while loading a non-existing object in Magento 2 during the checkout process and prevents the customers from placing orders on your Magento 2 store.

 

The error 'No such entity with orderid =' generally appears when you have third-party extensions installed on your store. However, performing a debug backtrace can help you to find the causative source behind the 'no such entity with order id =' error.

 

In order to fix the issue, you can follow the steps below,

 

  • Firstly, open the NoSuchEntityException.php file on the below path,

vendor/magento/framework/Exception/ 

  • Now, replace the __construct function with the below code,
public function __construct(Phrase $phrase = null, \Exception $cause = null, $code = 0)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/aaa.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info("=============================");
        $logger->info("__construct");
        $logger->info(print_r($phrase,true));
        $logger->info(print_r($cause,true));
        $logger->info(print_r($code,true));

        foreach (debug_backtrace() as $_stack) {
            $logger->info(print_r($_stack["file"],true));

        }

        if ($phrase === null) {

            $phrase = new Phrase('No such entity.');
        }
        parent::__construct($phrase, $cause, $code);

    }
  • Lastly, save the file and refresh the page.

It will backtrace and generate an aaa.log file at /var/log/ directory, which assists you in finding the source of the 'No such entity with OrderId' issue. Once you have found the source of the issue via log, revert the changes in the NoSuchEntityException.php file and save it.

 

If the error persists, you can use the below method:

 

Check the url_rewrite table in your database, perform this SQL query,

select * from url_rewrite where target_path like '%/category/orderId(in the error)%'

delete from url_rewrite where target_path like '%/category/orderId(in the error)%' ;

 

select * from url_rewrite where entity_type= 'category' and entity_Id=orderID(in your error);

delete from url_rewrite where entity_type= 'category' and entity_Id=orderID(in your error);

 

I hope the above information helps you to fix the "no such entity with order id =" error without facing any issues.

 

--------------------------

Regards,

Rex M

 

If the answer is helpful, please accept it as Solution & give a Kudos

 

VPS Hosting | Magento Hosting