- Posts: 22
- Thank you received: 0
Edit Profile Issues with Custom Fields
-- Joomla version -- : 3.4.2
-- PHP version -- : 5.6.3
-- Browser(s) name and version -- : Chrome 44.0.2403.155
-- Error-message(debug-mod must be tuned on) -- : Warning: array_values() expects parameter 1 to be array, null given in /Applications/AMPPS/www/plugins/user/profileGroup/profileGroup.php on line 208
Hi, please help on these issues regarding the custom fields for users.
On registration, it works perfectly fine. But not in the Edit Profile.
I have set conditional custom fields as follows:
if Occupation = others
- [none]
if Occupation = student
- school
- coursefacultystudent
- studentid
- studentpass
if Occupation = teacher
- school2
- coursefacultyteacher
- staffid
- staffpass
In the Edit Profile, the conditional are not in place and all fields are shown at the same time.
When I try to fill out only 1 set of fields, and submit, I get the error message shown.
Appreciate your help. Thanks!
Please Log in or Create an account to join the conversation.
The warning comes from the "profileGroup" user plugin you're using. That's not a HikaShop plugin.
Regarding the fact that you see fields regardless of their "display limited to" setting, add the code:
Please Log in or Create an account to join the conversation.
There are however 2 locations of the code in hikashopuser.php
I have tried adding to both locations and I get this error when I tried to Edit the Profile Page
Fatal error: Call to a member function checkFieldsForJS() on null in /Applications/AMPPS/www/plugins/system/hikashopuser/hikashopuser.php on line 341
Line 341 after adding the code is referring to
Once I removed the code from the 2nd place, the Edit Profile page is ok, but the fields are again not adhering to the 'display limited to' setting.
Appreciate your help.
Thanks!
Please Log in or Create an account to join the conversation.
Ah yes, use that code instead:
You can add it to both locations.
Please Log in or Create an account to join the conversation.
/index.php/your-profile/profile?layout=edit
Am I the only one who encounter this issue?
Please Log in or Create an account to join the conversation.
Ok, also change the line:
Everyone has the issue but you're the first one noticing it as most people don't need fields limited by other fields for the user profile.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
We don't have the problem anymore on our end.
Please provide a link to the page, a test account and a FTP access so that we can analyze the issue on your website.
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
I was able to log on your website, but I couldn't access the Display>Custom fields area on your backend and you didn't provide a FTP access so I'm not able to debug the issue.
Could you also provide that please ?
Please Log in or Create an account to join the conversation.
Also, you can use Components > extplorer to access the files.
Thanks!
Please Log in or Create an account to join the conversation.
Sorry for the delay.
I'm now able to access the custom fields, but I'm not able to access extplorer.
When I click on the link in the components menu, I'm getting redirected back to the dashboard of the backend.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I've checked and I could see that you were missing some other patch we had before. I've added them all for you and it's now working.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
That's an issue with the chozen library. I don't know why it does that.
Try to add that CSS on your website:
#hikashop_user_school .chzn-container-single-nosearch{ width: auto !important; }
If that doesn't help, you can also turn off the "use chozen library" setting of the HikaShop configuration and that should circumvent the problem.
Regarding the patch, you can simply copy the file plugins/system/hikashopuser/hikashopuser.php to your other website in order to fix the issue.
Please Log in or Create an account to join the conversation.
But I managed to get it working with
#school2_chzn { width:219px !important;}
Apparently something forces a width:0 on this div.
Thanks for your help in this. Really appreciated.
Cheers!
Please Log in or Create an account to join the conversation.