Jump to content
Michal

[Solved] Prestashop 1.7 Access denied as Admin in BO

Recommended Posts

Hi,

I have just made an upgrade of development copy of my store via 1-Click upgrade from 1.6.1.20 (to 1.7.4.2).

Currently I'm getting "Access denied" error when I try to open:

  • Orders > Orders
  • Discounts > Catalog Price Rules
  • Customers > Customers
  • Stats
  • Shipping > Preferences
  • International > Localization > Localization
  • Shop Parameters > Order Settings > Order Settings
  • Shop Parameters > Customer Settings > Titles
  • Shop Parameters > Contact > Stores

 

What coud be the problem? How to fix it?

01.png

Edited by Michal (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

My server is following the requirements (I've changed PHP 7.0 to 7.2 - error is still comming).

 

02.png

 

Edit: I would also like to add, that new clean installation of Presta is working ok - I'm able to reach BO corners that are unavailable in dev store installation.

Edited by Michal (see edit history)

Share this post


Link to post
Share on other sites

Server requirements are ok. If clean install works, than it must be an old module or theme you was using and this is still in effect.

Share this post


Link to post
Share on other sites

Can you try to clear your browser cache and cookies ? You can also test using "incognito" private browsing mode. If it works with "incognito" mode it is related to your cookies & cache

Share this post


Link to post
Share on other sites

I've checked the "incognito" mode, I've also cleaned cahe and cookies in my browser - still access denied.

I've made some kind of an experiment. I've kept my dev stores filesystem on server, but I've cleared DB and restore it with the one from clean Presta. Now I can get to Order and see first example orders from John Doe... I believe this means that the issue reason is in DB. Have you got any idea where to look for it?



EDIT:

Problem Solved! :D

I've restored 'my' DB, removed 'ps_access' table, and restored 'ps_access' from 'clean' DB. Now it all works fine :)

 

Thank you guys for help!

In attachement there is 'ps_access' table from clean DB - in the case if someone would need it in the future

ps_access.sql.gz

Edited by Michal (see edit history)
  • Like 5
  • Thanks 2

Share this post


Link to post
Share on other sites
On 8/3/2018 at 9:39 AM, Michal said:

I've checked the "incognito" mode, I've also cleaned cahe and cookies in my browser - still access denied.

I've made some kind of an experiment. I've kept my dev stores filesystem on server, but I've cleared DB and restore it with the one from clean Presta. Now I can get to Order and see first example orders from John Doe... I believe this means that the issue reason is in DB. Have you got any idea where to look for it?



EDIT:

Problem Solved! :D

I've restored 'my' DB, removed 'ps_access' table, and restored 'ps_access' from 'clean' DB. Now it all works fine :)

 

Thank you guys for help!

In attachement there is 'ps_access' table from clean DB - in the case if someone would need it in the future

ps_access.sql.gz

 

This fix worked for a client 1.5.0 to 1.7.4.2 upgrade.  Thank you!

Share this post


Link to post
Share on other sites

Solved.

but need a small sql asj to use "link widgets":

INSERT INTO `ps_access` (`id_profile`, `id_authorization_role`) VALUES (1,1037);

INSERT INTO `ps_access` (`id_profile`, `id_authorization_role`) VALUES (1,1038);

INSERT INTO `ps_access` (`id_profile`, `id_authorization_role`) VALUES (1,1039);

INSERT INTO `ps_access` (`id_profile`, `id_authorization_role`) VALUES (1,1040);

 

Edited by rnervi (see edit history)

Share this post


Link to post
Share on other sites
On 8/11/2018 at 3:50 PM, El Patron said:

 

This fix worked for a client 1.5.0 to 1.7.4.2 upgrade.  Thank you!

 

we also found later issues and for those we reset the module, so of import does not solve all then try reset module.

Share this post


Link to post
Share on other sites

Hello, thanks to you guy for providing this solution. I am having similar issue and I hope that the answers provided here will solve it. first of all I need to figure out where to carry out this 

On 03/08/2018 at 4:39 PM, Michal said:

I've restored 'my' DB, removed 'ps_access' table, and restored 'ps_access' from 'clean' DB. Now it all works fine :)

 

I will appreciate further help. However, let me try few things first of all.

Share this post


Link to post
Share on other sites
On 03/08/2018 at 4:39 PM, Michal said:

I've checked the "incognito" mode, I've also cleaned cahe and cookies in my browser - still access denied.

I've made some kind of an experiment. I've kept my dev stores filesystem on server, but I've cleared DB and restore it with the one from clean Presta. Now I can get to Order and see first example orders from John Doe... I believe this means that the issue reason is in DB. Have you got any idea where to look for it?



EDIT:

Problem Solved! :D

I've restored 'my' DB, removed 'ps_access' table, and restored 'ps_access' from 'clean' DB. Now it all works fine :)

 

Thank you guys for help!

In attachement there is 'ps_access' table from clean DB - in the case if someone would need it in the future

ps_access.sql.gz

 

Hello Michal,

could you please give a bit more detail how you removed and restored the ps-access from DB.

Was it through the phpMyAdmin?

I would be glad for your help.

Regards

Share this post


Link to post
Share on other sites

Hi,

Yes, the whole operation can be made with the phpMyAdmin.

In mine looks like in the screen - sorry for the polish, but in english it should look quite similar.

Just open your PS DB, and find ps_access table. In column 'actions' (polish 'działanie') there shoud be icon 'delete' (polish 'usuń')

01.png

 

Then click 'Import' on the top menu, then 'choose file' ('wybierz plik'), and then click 'preform' ('wykonaj') 

02.thumb.png.80e71685001590acaa61f1050a7677bb.png

Edited by Michal (see edit history)
  • Thanks 1

Share this post


Link to post
Share on other sites

Hi Michal,

Thank you so much for the detailed fix information. It actually fixed the problem I had with no access to orders and stats menu.

However, I lost access to all my modules. I tried to reset the modules as suggested by "El patron" but it didn't work.

I will appreciate if anyone has a solution to access my modules again.

 

I will be waiting for any suggestion for solution, while I continue to search a solution.

Regards

Share this post


Link to post
Share on other sites
6 minutes ago, sbempire said:

However, I lost access to all my modules.

 

what is message when you access your modules?

Edited by El Patron (see edit history)

Share this post


Link to post
Share on other sites

The information I get when I try to configur a module is " You are not authorized to configure a module". I am logged in as administrator.

access to module rejected.JPG

Edited by sbempire (see edit history)

Share this post


Link to post
Share on other sites

Hi El patron,

the attached images are other information from debug mode from the theme editor.

Please see5b89b8b0b2a0a_Themeeditordebugmodeerroralert_Exception.thumb.JPG.17e586f2bac0f612ada9c2c869e4ec73.JPG

Theme editor debug mode error alert_logs.JPG

Theme editor debug mode error alert_stack trace.JPG

Share this post


Link to post
Share on other sites

Hi El patron,

the attached images are other information from debug mode from the theme editor.

Please see5b89b8b0b2a0a_Themeeditordebugmodeerroralert_Exception.thumb.JPG.17e586f2bac0f612ada9c2c869e4ec73.JPG

Share this post


Link to post
Share on other sites

I am still seeking solution to " you are not authorized to configure a module error". If you have information to this issue please help

Here is further error message on the dashboard with debug-mode on

If you have explanations regarding these errors, please get them across. Thank you

Dashboard debug mode error.JPG

Share this post


Link to post
Share on other sites
On 3/8/2018 at 9:39 AM, Michal said:

I've checked the "incognito" mode, I've also cleaned cahe and cookies in my browser - still access denied.

I've made some kind of an experiment. I've kept my dev stores filesystem on server, but I've cleared DB and restore it with the one from clean Presta. Now I can get to Order and see first example orders from John Doe... I believe this means that the issue reason is in DB. Have you got any idea where to look for it?



EDIT:

Problem Solved! :D

I've restored 'my' DB, removed 'ps_access' table, and restored 'ps_access' from 'clean' DB. Now it all works fine :)

 

Thank you guys for help!

In attachement there is 'ps_access' table from clean DB - in the case if someone would need it in the future

ps_access.sql.gz

 

 

Thanks buddy. It solved the bug. Love you.

  • Like 1

Share this post


Link to post
Share on other sites

 

"You are not authorized to configure a module" Access to all my modules is denied

On 31/08/2018 at 8:49 PM, sbempire said:

The information I get when I try to configur a module is " You are not authorized to configure a module". I am logged in as administrator.

access to module rejected.JPG

 

On 31/08/2018 at 8:49 PM, sbempire said:

access to module rejected.JPG

E

 

Has nobody a possible explanation for this bug - You are not authorized to configure a module.

If you know a possible cause, please help!!!

Thank you in advance for helping.

 

 

Share this post


Link to post
Share on other sites
On 9/3/2018 at 11:14 AM, sbempire said:

 

"You are not authorized to configure a module" Access to all my modules is denied

 

 

Has nobody a possible explanation for this bug - You are not authorized to configure a module.

If you know a possible cause, please help!!!

Thank you in advance for helping.

 

 

 

Same problem.

Did you resolved?

Share this post


Link to post
Share on other sites

Hello! In my case i solved this issue with a simple MySQL query:


INSERT INTO ps_access (id_profile, id_authorization_role) VALUES (1,4),(1,24),(1,34),(1,45),(1,50),(1,57),(1,58);

 

Cheers!

Share this post


Link to post
Share on other sites

Upgrading from 1.6 to 1.7 lead to "Access Denied" problem. The solution with replacing ps_access table as @Michal suggest, work like a charm.

Try to rename (ex. add suffix _bak) table instead of deleting it - always good behaviour.

If you need further assistance, touch me by hello@panther.software

ps_access.sql

  • Like 1

Share this post


Link to post
Share on other sites
On 9/3/2018 at 11:14 AM, sbempire said:

 

"You are not authorized to configure a module" Access to all my modules is denied

 

 

Has nobody a possible explanation for this bug - You are not authorized to configure a module.

If you know a possible cause, please help!!!

Thank you in advance for helping.

 

Same problem here. Do you have any solutions?

Edit:

Importing ps_access table from attachment solved my problem

ps_access.zip

Edited by Szymon88 (see edit history)
  • Thanks 2

Share this post


Link to post
Share on other sites

Hi

 

I deleted old ps_access and imported the one which is attached to this forum. My one issue resolved but another issue happened. Now I cannot have access to modules configuration. How to solve it?

 

Thanks

Share this post


Link to post
Share on other sites
On 8/3/2018 at 4:39 PM, Michal said:

I've checked the "incognito" mode, I've also cleaned cahe and cookies in my browser - still access denied.

... / ......



EDIT:

Problem Solved! :D

I've restored 'my' DB, removed 'ps_access' table, and restored 'ps_access' from 'clean' DB. Now it all works fine :)

Thank you guys for help!

In attachement there is 'ps_access' table from clean DB - in the case if someone would need it in the future

ps_access.sql.gz

 

On 8/27/2018 at 6:07 PM, rnervi said:

Solved.

but need a small sql asj to use "link widgets":


INSERT INTO `ps_access` (`id_profile`, `id_authorization_role`) VALUES (1,1037);

INSERT INTO `ps_access` (`id_profile`, `id_authorization_role`) VALUES (1,1038);

INSERT INTO `ps_access` (`id_profile`, `id_authorization_role`) VALUES (1,1039);

INSERT INTO `ps_access` (`id_profile`, `id_authorization_role`) VALUES (1,1040);

 


Thanks for both.

It solved the problem for Localisation
Just adapt the id-authorization_role /value (1037 ||  1038 ||  1039 ||  1040) to your DB values, for linkwidget
 

They are in 'xx_authorization_role’  Table
To get them quickly:

SELECT * FROM `YourDBname`.`ps_authorization_role` WHERE (CONVERT(`id_authorization_role` USING utf8) LIKE '%linkwidget%' OR CONVERT(`slug` USING utf8) LIKE '%linkwidget%')

So I will test this solution for other numerous authorization lost by upgrade from 1.6 to 1.7.0 (not rectified with 1.7.2).
Similar prob. to erase clients, modify shops and so on...
Maybe it'll run too

Share this post


Link to post
Share on other sites
On 2/14/2019 at 9:02 AM, Szymon88 said:

 

Same problem here. Do you have any solutions?

Edit:

Importing ps_access table from attachment solved my problem

ps_access.zip

Thank you, Szymon88 ... your table inserts saved me a lot of headache

Share this post


Link to post
Share on other sites
On 8/3/2018 at 5:39 PM, Michal said:

I've checked the "incognito" mode, I've also cleaned cahe and cookies in my browser - still access denied.

I've made some kind of an experiment. I've kept my dev stores filesystem on server, but I've cleared DB and restore it with the one from clean Presta. Now I can get to Order and see first example orders from John Doe... I believe this means that the issue reason is in DB. Have you got any idea where to look for it?



EDIT:

Problem Solved! :D

I've restored 'my' DB, removed 'ps_access' table, and restored 'ps_access' from 'clean' DB. Now it all works fine :)

 

Thank you guys for help!

In attachement there is 'ps_access' table from clean DB - in the case if someone would need it in the future

ps_access.sql.gz

It worked for me too, thank you very much

Share this post


Link to post
Share on other sites
On 7/15/2019 at 11:23 PM, Inform-All said:

Just in case people (like me) have this problem in Prestashop 1.7.6 here is the sql dump for PS 1.7.6:

ps_access.sql

mine doesn't work , It helped to see the Dashboard properly ( didn't before , couldn't see orders on dashboard ) , but when click on orders on side bar I get white page saying:

 

Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

 

 

Any ideas?

Cheers!

 

Share this post


Link to post
Share on other sites
On 8/7/2019 at 10:32 AM, Zeryk said:

mine doesn't work , It helped to see the Dashboard properly ( didn't before , couldn't see orders on dashboard ) , but when click on orders on side bar I get white page saying:

 

Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

 

 

Any ideas?

Cheers!

 

Hi,

You get a error message when you turn on Debug mode? 

Share this post


Link to post
Share on other sites
16 hours ago, Inform-All said:

Hi,

You get a error message when you turn on Debug mode? 

I debug mode I've found out there is a conflict with not existing currency ( Ive deleted long time ago ). I installed the currency back and it works for now 😉

cheers!

Share this post


Link to post
Share on other sites

I've fixed the BO problem, but products are giving bunch of errors on front page. Once I fix one , something else occur. It tells me that social sharing something on some line is a problem , so I turned off all soc.sharing modules. Then it gives me different error.

/modules/productscategory/views/templates/hook/productscategory.tpl" on line 47 "<span class="price">{convertPrice price=$categoryProduct.displayed_price}</span>" unknown tag 'convertPrice'

I'm tired of trying / debugging!

Just wondering, anybody here made functional transition from long time operating 1.6 ( I mean that you have a customers and orders for year or so ) to fully functional 1.7 version?

Let me know please. Just want to be sure that I'm not attempting something stupid here.

thanks

Share this post


Link to post
Share on other sites

I managed to upgrade 2 stores from 1.6 to 1.7, but before upgrading I uninstalled all modules and themes that do not come officially. After updating, I received many errors on various modules, so I deleted all modules and imported others from a downloaded Prestashop.
Hope this helps.

Share this post


Link to post
Share on other sites
Posted (edited)
20 hours ago, Dorin_M said:

I managed to upgrade 2 stores from 1.6 to 1.7, but before upgrading I uninstalled all modules and themes that do not come officially. After updating, I received many errors on various modules, so I deleted all modules and imported others from a downloaded Prestashop.
Hope this helps.

thanks.

Ive done exactly the same. But have you tried all functions ? Like create new category for example. That's the default function from PS , Im not sure where should I fix it because getting an error on this one now.  I can imagine that problem is just one despite many lines, just causing a chain reaction in php script of files related to echa other. But I'm not a developer , just have a basic knowledge of php and SQL. Yet I wouldn't dare to claim I have a clue what's going on when unfold any of those lines. Kind of I do understand what  "get" or "array" is, but wouldn't have an idea where needs to be changed what.

So I'm asking my self a question if that's worth the hassle , or am I alone on this one? So far you are only 1 person I read who made a successful transformation.

 

cheers

Notice: Undefined offset: 0 (500 Internal Server Error) 2019-08-10 09-46-15.png

Edited by Zeryk (see edit history)

Share this post


Link to post
Share on other sites
On 8/10/2019 at 2:45 AM, Zeryk said:

cheers

Notice: Undefined offset: 0 (500 Internal Server Error) 2019-08-10 09-46-15.png

 

You problem is probably a module! The override of classes/link.php has a error.

Disable all overrides and see if it works. Then try to disable 1 module at the time to find out which one is bugged.

(or check the apache logs, or search the module that overrides this link.php)

Share this post


Link to post
Share on other sites

thanks, I gave up already 😉

I need to do business , cant spent so many hours / days on debugging and hoping something else will pop out when site is alive.

Might spent more time on 1.7 with next project.

But I appreciate your help, really do. 

cheers!

 

Share this post


Link to post
Share on other sites
On 8/27/2018 at 6:07 PM, rnervi said:

Solved.

but need a small sql asj to use "link widgets":


INSERT INTO `ps_access` (`id_profile`, `id_authorization_role`) VALUES (1,1037);

INSERT INTO `ps_access` (`id_profile`, `id_authorization_role`) VALUES (1,1038);

INSERT INTO `ps_access` (`id_profile`, `id_authorization_role`) VALUES (1,1039);

INSERT INTO `ps_access` (`id_profile`, `id_authorization_role`) VALUES (1,1040);

 

What authorization role are thees bound to in ps_authorization_role? because im experiencing as superadmin, that i cant install or uninstall, activate/deactivate or configure any modules in my installed module list

 

Share this post


Link to post
Share on other sites

Hello to all,

Have same issue with carrier page - no acess for the carriers.

What I have done:

1. Tried "Fresh" 'ps_access' table

2. Tried to add all missing values from 'ps_authorization_role' to 'ps_access' with folowing code:

INSERT INTO ps_access (id_profile, id_authorization_role) SELECT '1', ar.id_authorization_role FROM ps_authorization_role ar 
  LEFT JOIN ps_access a ON ar.id_authorization_role = a.id_authorization_role 
  WHERE a.id_authorization_role IS NULL

3. Inspected 'ps_authorization_role table' - roles for carriers to modify, delete etc have next ids: 617,618,619,620. All this ids I have in my 'ps_access' table.

All this actions are unseccessfull.

Any ideas or solutions?

Solved:

I had missing values and ids in 'ps_authorization_role' table, for example, ids: 33,34,35,36

Edited by Amantha Bill (see edit history)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More