Post by Corobori » Thu May 06, 2021 10:29 pm

Versión 3.0.3.7

When in Sales > Orders I am selecting an order and try adding an information in the history I am getting a "Warning: You do not have permission to access the API!"

I found around this forum and stackoverflow several people with the same issue but couldn't fix it.

What I tried is the following

In System > User > API I tried generating the API again, add my IP address and save
Then in System > Settings > Edit > Option I made sure the default API user was selected and save

I also tried to create a new API user but none of what I did seems to have any effect.

Newbie

Posts

Joined
Fri May 15, 2020 10:08 am

Post by straightlight » Thu May 06, 2021 10:35 pm

Admin > Systems > Settings > edit settings > Option Tab.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by CódigoNET » Tue Aug 03, 2021 12:20 pm

Try

UPDATE `oc_setting` SET `value` = 'UTC' WHERE `key` = 'config_timezone';

Newbie

Posts

Joined
Tue Aug 03, 2021 12:15 pm

Post by mikedang72 » Mon Feb 07, 2022 9:51 am

CódigoNET wrote:
Tue Aug 03, 2021 12:20 pm
Try

UPDATE `oc_setting` SET `value` = 'UTC' WHERE `key` = 'config_timezone';
Thanks but where I'm I modifying/adding this code?

Newbie

Posts

Joined
Sat Nov 06, 2021 10:17 am

Post by aj.cox131991 » Fri May 20, 2022 1:24 pm

CódigoNET wrote:
Tue Aug 03, 2021 12:20 pm
Try

UPDATE `oc_setting` SET `value` = 'UTC' WHERE `key` = 'config_timezone';
Bit of a necropost, but THANK YOU! This fixed this very issue for me.

Newbie

Posts

Joined
Thu Apr 07, 2022 12:20 pm

Post by straightlight » Fri May 20, 2022 6:30 pm

aj.cox131991 wrote:
Fri May 20, 2022 1:24 pm
CódigoNET wrote:
Tue Aug 03, 2021 12:20 pm
Try

UPDATE `oc_setting` SET `value` = 'UTC' WHERE `key` = 'config_timezone';
Bit of a necropost, but THANK YOU! This fixed this very issue for me.
Good to know that this issue also affects the APIs ...

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ADD Creative » Mon May 23, 2022 6:09 pm

straightlight wrote:
Fri May 20, 2022 6:30 pm
aj.cox131991 wrote:
Fri May 20, 2022 1:24 pm
CódigoNET wrote:
Tue Aug 03, 2021 12:20 pm
Try

UPDATE `oc_setting` SET `value` = 'UTC' WHERE `key` = 'config_timezone';
Bit of a necropost, but THANK YOU! This fixed this very issue for me.
Good to know that this issue also affects the APIs ...
The GitHub issue for the timezone affecting the API is here, if anyone is interested. https://github.com/opencart/opencart/issues/9492

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Live_Life » Sat Aug 19, 2023 1:10 am

CódigoNET wrote:
Tue Aug 03, 2021 12:20 pm
Try

UPDATE `oc_setting` SET `value` = 'UTC' WHERE `key` = 'config_timezone';
This worked for me after trying all sorts of other solutions so Thank You CódigoNET.

Just a slight addition for other people: UPDATE `ocxx_setting` SET `value` = 'UTC' WHERE `key` = 'config_timezone';
where xx in ocxx_setting will vary depending on your database.

Newbie

Posts

Joined
Sat Apr 22, 2023 3:10 am

Post by mediatechnology2 » Mon Sep 25, 2023 2:03 am

Having similar issues in OC 3.0.3.8 maintenance release where I do not have permission to modify orders.
PHP 8.0.X.
Trying to work through the final issues going from 3.0.3.8 to maintenance release.

As posted elsewhere I've had to edit the db to make them compatible now including oc_api which had field names (first, last) and extra value columns the 3.0.3.8 maintenance release will not accept.

If I set UPDATE `oc_setting` SET `value` = 'UTC' WHERE `key` = 'config_timezone';

I receive this error: date_default_timezone_set(): Timezone ID 'UTC WHERE' is invalid in <b>/var/www/clients/client14/web50/web/shop/admin/controller/startup/startup.php

I have checked that editing orders is permitted (all are) have a working store .

If I set the timezone in oc_settings to anything other than UTC I cannot login as admin.

New member

Posts

Joined
Wed Oct 26, 2022 11:24 pm

Post by ADD Creative » Mon Sep 25, 2023 5:06 pm

mediatechnology2 wrote:
Mon Sep 25, 2023 2:03 am
Having similar issues in OC 3.0.3.8 maintenance release where I do not have permission to modify orders.
PHP 8.0.X.
Trying to work through the final issues going from 3.0.3.8 to maintenance release.

As posted elsewhere I've had to edit the db to make them compatible now including oc_api which had field names (first, last) and extra value columns the 3.0.3.8 maintenance release will not accept.

If I set UPDATE `oc_setting` SET `value` = 'UTC' WHERE `key` = 'config_timezone';

I receive this error: date_default_timezone_set(): Timezone ID 'UTC WHERE' is invalid in <b>/var/www/clients/client14/web50/web/shop/admin/controller/startup/startup.php

I have checked that editing orders is permitted (all are) have a working store .

If I set the timezone in oc_settings to anything other than UTC I cannot login as admin.
Check the value of config_timezone directly in the oc_setting table in your database, it looks like it might be an invalid value.

If you do want to change the time zone you need to change it in the settings and also in system/config/default.php. See https://github.com/opencart/opencart/is ... -814312649.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by mediatechnology2 » Mon Sep 25, 2023 9:10 pm

straightlight wrote:
Thu May 06, 2021 10:35 pm
Admin > Systems > Settings > edit settings > Option Tab.
Expanding further: Admin > Systems > Settings > edit settings > Option Tab>Enable api User

I didn't pay attention to this post and when I re-read it and realized this was the final solution to a problem. A corrupt db import had disabled api users. Though I had fixed oc_api in the db (it contained extra field columns) the fact that it had been corrupted prevented api Users from being enabled in settings.

Thank you.

New member

Posts

Joined
Wed Oct 26, 2022 11:24 pm

Post by minoo7 » Sat Jun 15, 2024 8:04 pm

What fixed this for me was to enable `activity_customer_login` in Admin->Extensions->Events

Newbie

Posts

Joined
Mon Apr 08, 2024 6:54 pm
Who is online

Users browsing this forum: Majestic-12 [Bot] and 18 guests