Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Only initial SUPERUSER can login to admin

    Quote Originally Posted by RixStix View Post
    Yep, finding what I consider quite a few undocumented changes in functionality. Given the complexity of things, I understand that happens. You can't test every possible combination of keystrokes a user will make but it still leads to frustration.

    It won't take long for customers to see the math not adding correctly in the 'Confirm Order' screen if they have a coupon which utilizes 'free shipping' and abandon orders due to the presented numbers even though the total is correct.
    Agreed, I hadn't noticed that free-shipping coupon 'funny' (not) until you mentioned it.

  2. #12
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Only initial SUPERUSER can login to admin

    Quote Originally Posted by RixStix View Post
    Primary "Daily Admin" user ID gets the not recognized name or password error
    Test 'Daily Admin' that has been idle for quite some time. Just changed the password. LogIn & get a partial white screen with adm-DEBUG file. Change this "Daily Admin" to "SuperUser" and all seems fine.

    So that is 2 non SUPERUSER users that are identical in Admin profile but get different results when attempting to login.

    Not sure the debug file will help with the primary daily admin login issue.
    Maybe I am the only person who actually assigns admin profiles that are not super user.
    You are not.
    Last edited by lat9; 1 Apr 2020 at 04:13 PM.

  3. #13
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Only initial SUPERUSER can login to admin

    This is when using the "Test" Daily Admin user profile. Same User_ID changed to SuperUser logs in without generating files.

    Admin Username is 4 characters

    One of 2 adm-DEBUG
    Code:
    [01-Apr-2020 08:10:54 America/Los_Angeles] Request URI: /MYADMINFOLDER/users.php, IP address: 98.146.164.107#1  zen_update_user() called at [/home/chainwea/public_html/MYADMINFOLDER/users.php:73]
    --> PHP Warning: Use of undefined constant ADMIN_NAME_MINIMUM_LENGTH - assumed 'ADMIN_NAME_MINIMUM_LENGTH' (this will throw an Error in a future version of PHP) in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php on line 192.
    
    2nd of 2

    Code:
    [01-Apr-2020 08:11:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/index.php, IP address: 98.146.164.107#1  constant() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php:837]
    #2  zen_get_admin_menu_for_user() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php:27]
    #3  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php) called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header.php:218]
    #4  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php:221]
    #5  require(/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index.php:26]
    --> PHP Warning: constant(): Couldn't find constant BOX_REPORTS_INVENTORY_REPORT in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php on line 837.
    
    
    [01-Apr-2020 08:11:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/index.php, IP address: 98.146.164.107
    #1  constant() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php:838]
    #2  zen_get_admin_menu_for_user() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php:27]
    #3  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php) called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header.php:218]
    #4  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php:221]
    #5  require(/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index.php:26]
    --> PHP Warning: constant(): Couldn't find constant FILENAME_STATS_INVENTORY_REPORT in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php on line 838.
    
    
    [01-Apr-2020 08:11:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/index.php, IP address: 98.146.164.107
    #1  constant() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php:837]
    #2  zen_get_admin_menu_for_user() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php:27]
    #3  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php) called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header.php:218]
    #4  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php:221]
    #5  require(/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index.php:26]
    --> PHP Warning: constant(): Couldn't find constant BOX_STATS_SALES_TOTALS in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php on line 837.
    
    
    [01-Apr-2020 08:11:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/index.php, IP address: 98.146.164.107
    #1  constant() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php:838]
    #2  zen_get_admin_menu_for_user() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php:27]
    #3  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php) called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header.php:218]
    #4  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php:221]
    #5  require(/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index.php:26]
    --> PHP Warning: constant(): Couldn't find constant FILENAME_STATS_MONTHLY_SALES in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php on line 838.
    
    
    [01-Apr-2020 08:11:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/index.php, IP address: 98.146.164.107
    #1  constant() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php:837]
    #2  zen_get_admin_menu_for_user() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php:27]
    #3  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php) called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header.php:218]
    #4  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php:221]
    #5  require(/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index.php:26]
    --> PHP Warning: constant(): Couldn't find constant BOX_TOOLS_EMAIL_EXPORT in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php on line 837.
    
    
    [01-Apr-2020 08:11:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/index.php, IP address: 98.146.164.107
    #1  constant() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php:838]
    #2  zen_get_admin_menu_for_user() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php:27]
    #3  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php) called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header.php:218]
    #4  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php:221]
    #5  require(/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index.php:26]
    --> PHP Warning: constant(): Couldn't find constant FILENAME_EMAIL_EXPORT in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php on line 838.
    
    
    [01-Apr-2020 08:11:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/index.php, IP address: 98.146.164.107
    #1  constant() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php:837]
    #2  zen_get_admin_menu_for_user() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php:27]
    #3  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php) called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header.php:218]
    #4  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php:221]
    #5  require(/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index.php:26]
    --> PHP Warning: constant(): Couldn't find constant BOX_TOOLS_SNAPSHOT in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php on line 837.
    
    
    [01-Apr-2020 08:11:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/index.php, IP address: 98.146.164.107
    #1  constant() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php:838]
    #2  zen_get_admin_menu_for_user() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php:27]
    #3  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php) called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header.php:218]
    #4  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php:221]
    #5  require(/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index.php:26]
    --> PHP Warning: constant(): Couldn't find constant FILENAME_SNAPSHOT in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php on line 838.
    
    
    [01-Apr-2020 08:11:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/index.php, IP address: 98.146.164.107
    #1  constant() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php:837]
    #2  zen_get_admin_menu_for_user() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php:27]
    #3  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php) called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header.php:218]
    #4  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php:221]
    #5  require(/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index.php:26]
    --> PHP Warning: constant(): Couldn't find constant BOX_TOOLS_ORDERSEXPORT in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php on line 837.
    
    
    [01-Apr-2020 08:11:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/index.php, IP address: 98.146.164.107
    #1  constant() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php:838]
    #2  zen_get_admin_menu_for_user() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php:27]
    #3  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php) called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header.php:218]
    #4  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php:221]
    #5  require(/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index.php:26]
    --> PHP Warning: constant(): Couldn't find constant FILENAME_ORDERSEXPORT in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php on line 838.
    
    
    [01-Apr-2020 08:11:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/index.php, IP address: 98.146.164.107
    #1  constant() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php:837]
    #2  zen_get_admin_menu_for_user() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php:27]
    #3  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php) called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header.php:218]
    #4  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php:221]
    #5  require(/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index.php:26]
    --> PHP Warning: constant(): Couldn't find constant BOX_TOOLS_IP_BLOCKER in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php on line 837.
    
    
    [01-Apr-2020 08:11:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/index.php, IP address: 98.146.164.107
    #1  constant() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php:838]
    #2  zen_get_admin_menu_for_user() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php:27]
    #3  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php) called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header.php:218]
    #4  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php:221]
    #5  require(/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index.php:26]
    --> PHP Warning: constant(): Couldn't find constant FILENAME_IP_BLOCKER in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/admin_access.php on line 838.
    
    
    [01-Apr-2020 08:11:17 America/Los_Angeles] Request URI: /MYADMINFOLDER/index.php, IP address: 98.146.164.107
    #1  trigger_error() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/functions/html_output.php:16]
    #2  zen_href_link() called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php:32]
    #3  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header_navigation.php) called at [/home/chainwea/public_html/MYADMINFOLDER/includes/header.php:218]
    #4  require(/home/chainwea/public_html/MYADMINFOLDER/includes/header.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php:221]
    #5  require(/home/chainwea/public_html/MYADMINFOLDER/index_dashboard.php) called at [/home/chainwea/public_html/MYADMINFOLDER/index.php:26]
    --> PHP Fatal error: zen_href_link(, , SSL), unable to determine the page link. in /home/chainwea/public_html/MYADMINFOLDER/includes/functions/html_output.php on line 16.
    Last edited by RixStix; 1 Apr 2020 at 04:24 PM. Reason: additional info
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  4. #14
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Only initial SUPERUSER can login to admin

    Rick, it looks like there are a couple of plugins that were present in your zc154 installation that haven't been carried over. Since they're present in the 'allowed' pages for those non-superuser admins in the database, that's where the fatal error's coming from.

    Here's an update for the zen_get_admin_menu_for_user function, present in /admin/includes/functions/admin_access.php that should correct that issue. I'll be submitting a PR for the next release of Zen Cart so that others don't get 'hit' by this:

    Code:
    function zen_get_admin_menu_for_user()
    {
      global $db;
      if (zen_is_superuser())
      {
        // get all registered admin pages that should appear in the menu
        $retVal = zen_get_admin_pages(TRUE);
      } else
      {
        // get only those registered pages allowed by the current user's profile
        $retVal = array();
        $sql = "SELECT ap.menu_key, ap.page_key, ap.main_page, ap.page_params, ap.language_key as pageName
                FROM " . TABLE_ADMIN . " a
                LEFT JOIN " . TABLE_ADMIN_PAGES_TO_PROFILES . " ap2p ON ap2p.profile_id = a.admin_profile
                LEFT JOIN " . TABLE_ADMIN_PAGES . " ap ON ap.page_key = ap2p.page_key
                LEFT JOIN " . TABLE_ADMIN_MENUS . " am ON am.menu_key = ap.menu_key
                WHERE a.admin_id = :user:
                AND   ap.display_on_menu = 'Y'
                ORDER BY am.sort_order, ap.sort_order";
        $sql = $db->bindVars($sql, ':user:', $_SESSION['admin_id'], 'integer');
        $result = $db->Execute($sql);
        while (!$result->EOF)
        {
          if (defined($result->fields['pageName']) && defined($result->fields['main_page']) {
              $retVal[$result->fields['menu_key']][$result->fields['page_key']] = array('name' => constant($result->fields['pageName']),
                                                                                        'file' => constant($result->fields['main_page']),
                                                                                        'params' => $result->fields['page_params']);
          }
          $result->MoveNext();
        }
      }
      return $retVal;
    }
    Update: No PR required; someone already determined that this is an issue and has corrected for zc157. Code updated above to match.
    Update (again): Sheesh, that was me that created that PR.
    Last edited by lat9; 1 Apr 2020 at 05:29 PM. Reason: Already present in zc157

  5. #15
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Only initial SUPERUSER can login to admin

    It doesn't like that.... I think I can probably find it but for the sake of future visitors to this thread, it probably needs to be corrected

    I think I mucked the insertion. Going to find the original file to start over.
    Last edited by RixStix; 1 Apr 2020 at 06:12 PM.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  6. #16
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Only initial SUPERUSER can login to admin

    Quote Originally Posted by RixStix View Post
    It doesn't like that.... I think I can probably find it but for the sake of future visitors to this thread, it probably needs to be corrected

    I think I mucked the insertion. Going to find the original file to start over.
    Nope, I foobar'd the update:

    Code:
            function zen_get_admin_menu_for_user()
            {
              global $db;
              if (zen_is_superuser())
              {
                // get all registered admin pages that should appear in the menu
                $retVal = zen_get_admin_pages(TRUE);
              } else
              {
                // get only those registered pages allowed by the current user's profile
                $retVal = array();
                $sql = "SELECT ap.menu_key, ap.page_key, ap.main_page, ap.page_params, ap.language_key as pageName
                        FROM " . TABLE_ADMIN . " a
                        LEFT JOIN " . TABLE_ADMIN_PAGES_TO_PROFILES . " ap2p ON ap2p.profile_id = a.admin_profile
                        LEFT JOIN " . TABLE_ADMIN_PAGES . " ap ON ap.page_key = ap2p.page_key
                        LEFT JOIN " . TABLE_ADMIN_MENUS . " am ON am.menu_key = ap.menu_key
                        WHERE a.admin_id = :user:
                        AND   ap.display_on_menu = 'Y'
                        ORDER BY am.sort_order, ap.sort_order";
                $sql = $db->bindVars($sql, ':user:', $_SESSION['admin_id'], 'integer');
                $result = $db->Execute($sql);
                while (!$result->EOF)
                {
                  if (defined($result->fields['pageName']) && defined($result->fields['main_page'])) {
                      $retVal[$result->fields['menu_key']][$result->fields['page_key']] = array('name' => constant($result->fields['pageName']),
                                                                                                'file' => constant($result->fields['main_page']),
                                                                                                'params' => $result->fields['page_params']);
                  }
                  $result->MoveNext();
                }
              }
              return $retVal;
            }

  7. #17
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Only initial SUPERUSER can login to admin

    TNX Cindy,

    All Admins are now HAPPY.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  8. #18
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Only initial SUPERUSER can login to admin

    Quote Originally Posted by RixStix View Post
    TNX Cindy,

    All Admins are now HAPPY.
    Happy Admins === Happy Stores!

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v151 Can i hide admin menu to superuser?
    By sungmo in forum Customization from the Admin
    Replies: 8
    Last Post: 31 May 2016, 11:31 PM
  2. v151 Cannot login using Superuser accounts
    By alexky in forum Basic Configuration
    Replies: 3
    Last Post: 23 May 2015, 02:11 PM
  3. v151 Have not been able to login to admin panel from initial install!?!
    By cignet in forum Basic Configuration
    Replies: 6
    Last Post: 25 Dec 2012, 03:42 PM
  4. Trouble with admin login on initial install
    By CobraPlant in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 5 Nov 2007, 04:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR