Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order searching is not robust #862

bossanova808 opened this issue May 14, 2019 · 0 comments


None yet
1 participant
Copy link

commented May 14, 2019


We're seeing, fairly often, failures in showing our live order lists - particularly when searching (e.g. on a customer name)

One gets two red error alerts ('an unknown error has occurred') and an empty list back. Must re-load page to fix, but problem is reproduce-able with the same search repeated (e.g. for name 'cook'), so it's not some temporary network glitch or whatever.

In the console, as per Discord:

What would cause this - when loading some order views (well, this causes the order views to fail actually) -

{"error":"Return value of craft\\commerce\\elements\\Order::tableAttributeHtml() must be of the type string, null returned"} -

... I have had a poke around, worked out the views would load ok without Billing Business Name in there. The only weird thing I could see was a couple of recent addresses where the Billing Business Name was set to (Null) rather than just being (as is normal, it seems) - simply empty. Any idea how a null could get in there??

I went in to the orders (the order details page loads fine) - and re-saved the addresses with just a space character in the for the business name, and now the views load up ok again. Bit of an odd one - not sure how Null would get in there? But also Commerce should probably be ok with both null and empty strings, or have a constraint on the table to sop nulls getting in there in the first place, if they are not ok.

Note, though, that is not the only reason we seem to get these errors. We see them at other times too, and without removing all the columns and then adding them back one by one, it's impossible to see what the issue actually is - so, if nothing else, the error handling/reporting side of things could be much improved!

Steps to reproduce

  1. As above.

Additional info

Craft 3.1.24
Commerce 2.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.