CMS MADE SIMPLE FORGE

Orders

 

[#12301] Cannot view Orders

avatar
Created By: TimdeBuurman (timdebuurman)
Date Submitted: Thu Apr 30 08:54:17 -0400 2020

Assigned To: Robert Campbell (calguy1000)
Version: 1.23.7
CMSMS Version: 2.2.14
Severity: Critical
Resolution: None
State: Open
Summary:
Cannot view Orders
Detailed Description:
Hi,

Checking an Order gives a blank screen.

The server error log gives this about it:

PHP message: PHP Fatal error: Uncaught InvalidArgumentException: Invalid uid
passed to __METHOD_ in
/home/<user>/domains/<website.com>/public_html/modules/FrontEndUsers/lib/class.FrontEndUsersManipulator.php:1361

At first, it seems that this was caused by a missing _ after __METHOD_ , so I
added it to test.

Now the (fatal) error changed to:

PHP message: PHP Fatal error: Uncaught InvalidArgumentException: Invalid uid
passed to FrontEndUsers\\FrontEndUsersManipulator::GetUserName in
/home/<user>/domains/<website.com>/public_html/modules/FrontEndUsers/lib/class.FrontEndUsersManipulator.php:1361

Found out that New FEU has a safety check before calling up a username, then the
user id must be greater than 0.

Ultimately, the Orders module template (admin_manageorder.tpl) is calling the
function:

{capture
assign='username'}{$Orders->GetUsername($order->get_feu_user())}{/capture}

Previously it was not found, then name empty. but it is now broken. I made the
following of that:


    {$userid = $order->get_feu_user()}
    {if $userid|intval > 0}
        {$username = $Orders->GetUsername($userid|intval)}
    {else}
        {$username = ''}
    {/if}

See also forum topic:
https://forum.cmsmadesimple.org/viewtopic.php?f=7&t=82167&p=345383#p345383


History