You are not authorized to view this page. Please contact your system administrator

Hi Chris

Database: mysqlnd 8.2.12
PHP/8.2.12 or PHP/8.1.0
Installation: self-install (apache 2.4 /xamp or mamp windows)
SuiteCrm version: 8.5.0

Use Case:

  1. custom module called “cstm_Customer_Payments”.
  2. There is a Many to Many relationship from cstm_Customer_Payments to Invoices module
  3. On cstm_Customer_Payments RecordView, there is a subpanel “Invoices” (cstm_customer_payments_aos_invoices)
  4. When clicking on Edit icon of “Invoices” subpanel record, it throws error message as below:

image

Error:
“You are not authorized to view this page. Please contact your system administrator”
image

if i dig a little under the error above
in public\legacy\include\portability\Services\ACL\UserACLService.php

change

if (!$isActionAvailable) {
return [
‘status’ => false,
‘message’ => ‘ERR_UNAUTHORIZED_PAGE_ACCESS’
];
}

by

if (!$isActionAvailable) {
return [
‘status’ => true,
‘message’ => ‘’
];
}
and now i have this error
Error:
“Error occurred while fetching metadata”
image

I have also added a file in public\legacy\custom\Extension\application\Ext\ModuleNameMap\cstm_Customer_Payments.php

  • repair and rebuild

with
$module_name_map[‘cstm_Customer_Payments’] = [
‘frontend’ => ‘Customer_Payments’,
‘core’ => ‘cstm_Customer_Payments’
];

I dont have specific error in suitecrm.log or php.log

This post refers to the module name map, and capitalization of your module name.

Let us know if this solved your issue!

Hi ! thanks you for your reply , I have tried but same issue.

I have similar issues in Contacts Module Subpanels when i click on edit button on subpanel:

Subpanel History, Activities Error:
image

Subpanel Contracts, Events, Invoices, Quotes
image

Subpanel Opportunities, Cases, Leads, Documents Edit button works well

I am also getting the ‘You are not authorized to view this page…’ error on every user login.

The difference is we have no external modules at all.

SuiteCRM 8.5 (recently upgraded from 8.2.4)
MySQL v 8.0.32
PHP v 8.1.25

Permissions are all ok as far as I can see.

It doesn’t matter if they are an admin user or a regular user, the message still comes up but allows you to click through it and everything operates as normal. Logout is fine.

I have spent most of today tracking the code to try and understand why this is happening but just can’t see anything that is causing it, although I am not an out-and-out coder by any means.

If anyone has any ideas, happy to listen as this is stopping us migrating to 8.5 on the main system as the support desk would not be happy.

Any help gratefully received.

Update your MySQL:

OK Thanks. I am planning to do this tomorrow as I had to apply a temp patch to fix the sub-panel issues that came up. Didn’t expect the login to be the same cause.

Thank you for your fast response. Hopefully that will dispappear tomorrow once the upgrade has been done.

Many thanks again.