"Edit Your Profile" Page ignoring Hika req. fields

  • Posts: 56
  • Thank you received: 4
8 years 7 months ago #234785

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.5.0

I have several custom "user" fields setup in hikashop that are used in registration. The first field has two options A and B, and with this extension , is used to select which user group is appropriate for the person registering. Option B, has several additional required custom fields that appear when selected and must be filled out before a successful registration. This all works perfectly. The problem is when a registered user goes to edit his profile. When selecting option B the custom fields appear as they should, however if the user hits save WITHOUT filling out those additional required fields, the user's group is successfully changed to the Option B level despite having not filled out the required fields associated with option B. The page does show "you must fill out the required fields" errors, but it is still saving data from the fields that have been populated. This makes the requirement useless. I realize that the "Edit profile page" is a Joomla page, how can i get it to recognize the "field requirement" from a hikashop custom field?



Thanks


Matt

Thanks


Matt

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 7 months ago #234926

Hi,

That plugin hasn't made to support the modification of the custom fields through the Joomla user profile.
I would recommend to edit the HikaShop user synchronization plugin via the Joomla plugins manager and turn off the "Display custom user fields on user profile edition page" setting. That way, it will prevent the user's group to be changed inadvertedly by the user.

Please Log in or Create an account to join the conversation.

  • Posts: 56
  • Thank you received: 4
8 years 7 months ago #234928

Thanks for the recommendation Nicolas, I did that already and unfortunately when that setting is off, the edit profile page cannot be saved.. you get an ACL error. This is directly related to the plugin below, as when i disable it, the user profile can be saved as normal.

It sounds like the only clean was to use this plugin is to disable access to the "edit user profile" section of the control panel, which is unfortunate. If that is my last resort can you assist me is accomplishing that?


Thank you!


Matt

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 7 months ago #234949

Hi,

What ACL error did you get ? Could you provide the exact error message ?

Please Log in or Create an account to join the conversation.

  • Posts: 56
  • Thank you received: 4
8 years 7 months ago #235013

"Profile could not be saved: Access Usergroup Invalid"

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 7 months ago #235024

Hi,

Try to change the line:
$oldUser = $userClass->get($hikaUser->user_id);

to:
$display = $this->params->get('fields_on_user_profile');
if(is_null($display))
$display = 1;
if(empty($display) || $display=='0')
return;

$oldUser = null;

in the file plugins/system/hikashopuser/hikashopuser.php and try both with the option activated and turned off.
Let us know how it goes. If that doesn't help, please provide some screenshots of how you configured your custom fields and the FTW plugin.

Please Log in or Create an account to join the conversation.

  • Posts: 56
  • Thank you received: 4
8 years 7 months ago #235358

Thank you Nicolas, unfortunately that code change did not have any effect with the plugin turned on or off.

Find attached screen shots of my custom field configurations and my FTW plugin configuration.


Thanks!

Matt









Please Log in or Create an account to join the conversation.

  • Posts: 56
  • Thank you received: 4
8 years 7 months ago #236241

Hello, Any chance there has been some progress made on this issue?

Thank you


Matt

Please Log in or Create an account to join the conversation.

  • Posts: 56
  • Thank you received: 4
8 years 6 months ago #238409

Hello, I guess it is safe to assume that there is no solution for this problem? - could you please assist me in disabling access to the "edit user profile" button as mentioned above?


Thank you

Matt

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 6 months ago #239285

Hi,

The HikaShop User plugin do not block the user saving.
The error message you mentioned is not a message from HikaShop.
Joomla is providing the "edit user profile" feature ; that's not related to HikaShop.
After that, like Nicolas wrote, there is a setting in the plugin (via the Joomla plugin manager) in order to not display the HikaShop custom user fields in the Joomla profile.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 56
  • Thank you received: 4
8 years 6 months ago #239728

Hello Jerome, Thank you for your response. I understand that the Hikashop User plugin is not blocking the user saving, the "FTW User Group Plugin" in conjunction with the "not display user fields" setting you suggest is what creates the error. And with the setting left on, the required fields simply dont work in edit profile.

Well I just saw that the FTW extension was removed due to "UR3-Vulnerable Extension"! Guess there is no point in trying to continue to trouble shoot.. Thanks for the help anyway!


Matt

The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum