*

Vlad7

  • ****
  • 244 posts
Error deleting user, please help
« on: February 03, 2022, 05:25:12 PM »
An error occurred while deleting a user


[03-Feb-2022 18:22:38 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[03-Feb-2022 18:22:47 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[03-Feb-2022 18:22:53 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[03-Feb-2022 18:23:18 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[03-Feb-2022 18:23:35 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[03-Feb-2022 18:23:41 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614


The error goes on and on and on!

*

MB Themes

Re: Error deleting user, please help
« Reply #1 on: February 03, 2022, 06:58:46 PM »
Is listing removed at the end?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Vlad7

  • ****
  • 244 posts
Re: Error deleting user, please help
« Reply #2 on: February 04, 2022, 07:33:28 AM »
Is listing removed at the end?

Removed without problems

*

Vlad7

  • ****
  • 244 posts
Re: Error deleting user, please help
« Reply #3 on: February 04, 2022, 07:35:36 AM »
Is listing removed at the end?

The error went away as soon as I disabled the permission for users to delete their account

*

Vlad7

  • ****
  • 244 posts
Re: Error deleting user, please help
« Reply #4 on: February 04, 2022, 07:40:30 AM »
Is listing removed at the end?

Right now I have set permission for users to delete their account and I get an error when deleting a user

[04-Feb-2022 08:21:35 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[04-Feb-2022 08:21:36 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[04-Feb-2022 08:22:28 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[04-Feb-2022 08:22:47 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[04-Feb-2022 08:24:20 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[04-Feb-2022 08:25:51 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614

*

Vlad7

  • ****
  • 244 posts
Re: Error deleting user, please help
« Reply #5 on: February 04, 2022, 07:53:47 AM »
Is listing removed at the end?

Perhaps this is somehow related. There were more mistakes

[03-Feb-2022 17:42:58 Europe/Kiev] PHP Fatal error:  Uncaught Error: Call to undefined method ModelBPR::updateSellerField() in /home2/ukagroco/public_html/oc-content/plugins/business_profile/functions.php:480
Stack trace:
#0 /home2/ukagroco/public_html/oc-content/plugins/business_profile/functions.php(269): bpr_remove_user_image()
#1 /home2/ukagroco/public_html/oc-includes/osclass/classes/Plugins.php(42): bpr_removed_user()
#2 /home2/ukagroco/public_html/oc-includes/osclass/helpers/hPlugins.php(34): Plugins::runHook()
#3 /home2/ukagroco/public_html/oc-includes/osclass/model/User.php(332): osc_run_hook()
#4 /home2/ukagroco/public_html/oc-includes/osclass/controller/user.php(281): User->deleteUser()
#5 /home2/ukagroco/public_html/index.php(95): CWebUser->doModel()
#6 {main}

  thrown in /home2/ukagroco/public_html/oc-content/plugins/business_profile/functions.php on line 480
[03-Feb-2022 17:36:05 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[03-Feb-2022 17:36:06 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[03-Feb-2022 17:36:11 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[03-Feb-2022 17:36:14 Europe/Kiev] PHP Fatal error:  Uncaught Error: Call to undefined method ModelBPR::updateSellerField() in /home2/ukagroco/public_html/oc-content/plugins/business_profile/functions.php:496
Stack trace:

I updated the business profile to the latest version and now this error has disappeared.

now I am still getting the error
[03-Feb-2022 21:53:57 Europe/Kiev] PHP Warning:  Undefined array key "pk_i_id" in /home2/ukagroco/public_html/oc-content/plugins/blog/form/publish.php on line 13
[04-Feb-2022 08:11:24 Europe/Kiev] PHP Warning:  Undefined array key "pk_i_id" in /home2/ukagroco/public_html/oc-content/plugins/blog/form/publish.php on line 13
an error occurs when the user clicks Write a new article



*

Vlad7

  • ****
  • 244 posts
Re: Error deleting user, please help
« Reply #6 on: February 04, 2022, 09:03:44 AM »
Is listing removed at the end?

I found that when deleting a user, the logo and background image uploaded by the user are not deleted from the business_profile plugin in the cover and icon folders. Also, in the profile_picture plugin, user profile images are not deleted in the images folder

*

MB Themes

Re: Error deleting user, please help
« Reply #7 on: February 04, 2022, 10:25:53 AM »
@Vlad7
Notice you reference to is related to user account removal link, not to listing.
Could be simply fixed by modifying this:
Code: [Select]
      echo '<li class="opt_del_user"><a href="' . osc_base_url(true) . '?page=user&action=delete&id='.$user_id.'&secret='.$user['s_secret'] . '" onclick="return confirm(\''  . osc_esc_js(__('Are you sure you want to delete your account? \nNote that all your listings will be deleted too! \n\nWould you like to continue', 'backoffice_manager')) . '?\')">' . __('Delete account', 'backoffice_manager') . '</a></li>';

Into:
Code: [Select]
    if($user_id > 0 && isset($user['s_secret']) {
      //echo '<li class="opt_del_user"><a href="' . osc_base_url() . 'oc-content/plugins/backoffice_manager/delete_user.php?user_id=' . $user_id . '&secret=' . $user['s_secret'] . '" onclick="return confirm(\''  . osc_esc_js(__('Are you sure you want to delete your account? \nNote that all your listings will be deleted too! \n\nWould you like to continue', 'backoffice_manager')) . '?\')">' . __('Delete account', 'backoffice_manager') . '</a></li>';
      echo '<li class="opt_del_user"><a href="' . osc_base_url(true) . '?page=user&action=delete&id='.$user_id.'&secret='.$user['s_secret'] . '" onclick="return confirm(\''  . osc_esc_js(__('Are you sure you want to delete your account? \nNote that all your listings will be deleted too! \n\nWould you like to continue', 'backoffice_manager')) . '?\')">' . __('Delete account', 'backoffice_manager') . '</a></li>';
    }

in index.php of plugin.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Vlad7

  • ****
  • 244 posts
Re: Error deleting user, please help
« Reply #8 on: February 04, 2022, 02:54:31 PM »
@Vlad7
Notice you reference to is related to user account removal link, not to listing.
Could be simply fixed by modifying this:
Code: [Select]
      echo '<li class="opt_del_user"><a href="' . osc_base_url(true) . '?page=user&action=delete&id='.$user_id.'&secret='.$user['s_secret'] . '" onclick="return confirm(\''  . osc_esc_js(__('Are you sure you want to delete your account? \nNote that all your listings will be deleted too! \n\nWould you like to continue', 'backoffice_manager')) . '?\')">' . __('Delete account', 'backoffice_manager') . '</a></li>';

Into:
Code: [Select]
    if($user_id > 0 && isset($user['s_secret']) {
      //echo '<li class="opt_del_user"><a href="' . osc_base_url() . 'oc-content/plugins/backoffice_manager/delete_user.php?user_id=' . $user_id . '&secret=' . $user['s_secret'] . '" onclick="return confirm(\''  . osc_esc_js(__('Are you sure you want to delete your account? \nNote that all your listings will be deleted too! \n\nWould you like to continue', 'backoffice_manager')) . '?\')">' . __('Delete account', 'backoffice_manager') . '</a></li>';
      echo '<li class="opt_del_user"><a href="' . osc_base_url(true) . '?page=user&action=delete&id='.$user_id.'&secret='.$user['s_secret'] . '" onclick="return confirm(\''  . osc_esc_js(__('Are you sure you want to delete your account? \nNote that all your listings will be deleted too! \n\nWould you like to continue', 'backoffice_manager')) . '?\')">' . __('Delete account', 'backoffice_manager') . '</a></li>';
    }

in index.php of plugin.

Right. I'm not deleting an ad, but a user profile.


*

Vlad7

  • ****
  • 244 posts
Re: Error deleting user, please help
« Reply #9 on: February 04, 2022, 03:01:13 PM »
Listen. standard situation: The user has - 1. profile image.
2. logo and background image in the business profile.
3. several published ads.
At this moment, the user suddenly decides to delete his account along with everything listed by simply clicking delete profile!
As a result, the account is deleted but its photos and images are not deleted and we will get an error!

*

Vlad7

  • ****
  • 244 posts
Re: Error deleting user, please help
« Reply #10 on: February 04, 2022, 03:06:47 PM »
At the moment, as soon as I click the "Allow users to delete their account" button, there is a constant cyclic error immediately

[04-Feb-2022 15:47:59 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[04-Feb-2022 15:48:07 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[04-Feb-2022 15:48:12 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[04-Feb-2022 15:48:16 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[04-Feb-2022 15:48:21 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614


Turning it off stops the error flow.

*

MB Themes

Re: Error deleting user, please help
« Reply #11 on: February 04, 2022, 03:16:53 PM »
@Vlad7
Notice you reference to is related to user account removal link, not to listing.
Could be simply fixed by modifying this:
Code: [Select]
      echo '<li class="opt_del_user"><a href="' . osc_base_url(true) . '?page=user&action=delete&id='.$user_id.'&secret='.$user['s_secret'] . '" onclick="return confirm(\''  . osc_esc_js(__('Are you sure you want to delete your account? \nNote that all your listings will be deleted too! \n\nWould you like to continue', 'backoffice_manager')) . '?\')">' . __('Delete account', 'backoffice_manager') . '</a></li>';

Into:
Code: [Select]
    if($user_id > 0 && isset($user['s_secret']) {
      //echo '<li class="opt_del_user"><a href="' . osc_base_url() . 'oc-content/plugins/backoffice_manager/delete_user.php?user_id=' . $user_id . '&secret=' . $user['s_secret'] . '" onclick="return confirm(\''  . osc_esc_js(__('Are you sure you want to delete your account? \nNote that all your listings will be deleted too! \n\nWould you like to continue', 'backoffice_manager')) . '?\')">' . __('Delete account', 'backoffice_manager') . '</a></li>';
      echo '<li class="opt_del_user"><a href="' . osc_base_url(true) . '?page=user&action=delete&id='.$user_id.'&secret='.$user['s_secret'] . '" onclick="return confirm(\''  . osc_esc_js(__('Are you sure you want to delete your account? \nNote that all your listings will be deleted too! \n\nWould you like to continue', 'backoffice_manager')) . '?\')">' . __('Delete account', 'backoffice_manager') . '</a></li>';
    }

in index.php of plugin.

Answer is here  ::) ???
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Vlad7

  • ****
  • 244 posts
Re: Error deleting user, please help
« Reply #12 on: February 04, 2022, 03:58:46 PM »
I edited what you showed. Now I am getting a permanent error
[04-Feb-2022 16:54:23 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[04-Feb-2022 16:54:23 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614
[04-Feb-2022 16:54:28 Europe/Kiev] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/public_html/oc-content/plugins/backoffice_manager/index.php on line 614

*

Vlad7

  • ****
  • 244 posts
Re: Error deleting user, please help
« Reply #13 on: February 04, 2022, 05:41:58 PM »
Well, let's say I won't use the backoffice_manager plugin. It is disabled and there are no more problems. on the user profile editing page in the Gamma theme there is a "delete account" button. When a user has deleted his account, his images remain in business_profile and in profile_picture of his image! How can I fix this so that they are deleted along with the user's accounts?

*

Vlad7

  • ****
  • 244 posts
Re: Error deleting user, please help
« Reply #14 on: February 04, 2022, 07:53:29 PM »
I made a new installation of osclass 8.0.1 on a new hosting and a new domain and made sure that all the above errors were formed. Of the installed plugins The Gamma theme is installed, and the plugins are in the screenshot.
error in error_log file

[04-Feb-2022 19:31:31 Europe/Madrid] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/billboard.in.ua/oc-content/plugins/backoffice_manager/index.php on line 614
[04-Feb-2022 19:32:35 Europe/Madrid] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/billboard.in.ua/oc-content/plugins/backoffice_manager/index.php on line 614
[04-Feb-2022 19:36:44 Europe/Madrid] PHP Warning:  Undefined array key "s_secret" in /home2/ukagroco/billboard.in.ua/oc-content/plugins/backoffice_manager/index.php on line 614

User profile pictures and business profile pictures are not deleted when a user is deleted.

If you are interested, I can provide you with configuration information