Skip to Content Skip to Menu

CB 1.9.1 CB Privacy -> Bug

  • KatoKalin
  • KatoKalin
  • OFFLINE
  • Posts: 265
  • Thanks: 11
  • Karma: -5
  • Add-ons
10 years 4 months ago - 10 years 4 months ago #245814 by KatoKalin
CB 1.9.1 CB Privacy -> Bug was created by KatoKalin
I am having some weird issue with a CB 1.9.1 install which I need to sort out.
To get a clue what is going on I need to have some more information about the CB Privacy plugin:

I have set it to private by default and to show up on registration.
1. First weird thing is that the privacy options do not show on registration. Howsever they do show on profile edit.
2. When I monitor the privacy plugins database table, I cannot find the latest registered users in it. At what point do they get stored into the privacy database table and how to determine programmatically a users privacy settings if a user is not present in there?
3. Is it correct that userlist does not respect CB privacy settings? Either way I have to find a way to display only public users in a public user list and all users (public an private)

Edit: Additionally to what I wrote above I can now confirm that my issue is realted to CB Privacy. When a user sets his profile to private the userlist shows ", 1" as avatar and the users username, nothing else.
So additionally to my post above I need to know:
1. What do I have to do or what should I look for to remove this error to get a consistent display of the userlist again? (This fix mentioned here does not help, as my issues persists regardless of the setting "Show empty fields/tabs" www.joomlapolis.com/forum/154-advanced-members-support/223359-solved-cb-privacy-plugin-not-showing-quserq-option?start=24#237108 )

2nd edit: When I unpublish CB Privacy, the userlist displays normally.
Last edit: 10 years 4 months ago by KatoKalin.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 4 months ago #245862 by krileon
Replied by krileon on topic CB 1.9.1 CB Privacy -> Bug

1. First weird thing is that the privacy options do not show on registration. Howsever they do show on profile edit.

It should display fine on registration. Ensure your field is available on registration and it has privacy controls enabled. The source code checks for edit and registry modes to determine if it should show privacy controls or not.

2. When I monitor the privacy plugins database table, I cannot find the latest registered users in it. At what point do they get stored into the privacy database table and how to determine programmatically a users privacy settings if a user is not present in there?

When profile edit and registration is saved is when the privacy settings will save. You can't determine a users privacy if they don't have a privacy settings unless you've set default privacy values for your fields. In which case the default will take affect if they've no privacy row.

3. Is it correct that userlist does not respect CB privacy settings? Either way I have to find a way to display only public users in a public user list and all users (public an private)

Yes, but it's due to a bug. Turn off hiding of empty fields or review the fixes shown in the below topic.

www.joomlapolis.com/forum/154-advanced-members-support/223359-solved-cb-privacy-plugin-not-showing-quserq-option?start=24#237108


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • KatoKalin
  • KatoKalin
  • OFFLINE
  • Posts: 265
  • Thanks: 11
  • Karma: -5
  • Add-ons
10 years 4 months ago - 10 years 4 months ago #245875 by KatoKalin
Replied by KatoKalin on topic CB 1.9.1 CB Privacy -> Bug

krileon wrote: It should display fine on registration. Ensure your field is available on registration and it has privacy controls enabled. The source code checks for edit and registry modes to determine if it should show privacy controls or not.

It seems that it is showing now. I have no idea why. It might be some caching issue. I have just moved it to another tab and will check later if this has worked as well.

krileon wrote: When profile edit and registration is saved is when the privacy settings will save. You can't determine a users privacy if they don't have a privacy settings unless you've set default privacy values for your fields. In which case the default will take affect if they've no privacy row.

So this means if privacy is set to be required on registration every user registering after that should have an entry in the privacy table. Right? For some reason this did not work. The privacy table does not reflect values for some users although it was set to be mandatory. I guess this happened due to the privacy field not showing up on registration.

krileon wrote: Yes, but it's due to a bug. Turn off hiding of empty fields or review the fixes shown in the below topic.

www.joomlapolis.com/forum/154-advanced-members-support/223359-solved-cb-privacy-plugin-not-showing-quserq-option?start=24#237108

The issue still persists after applying the patch and regardless what I set "hiding of empty fields" to.
Last edit: 10 years 4 months ago by KatoKalin.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 4 months ago #245879 by krileon
Replied by krileon on topic CB 1.9.1 CB Privacy -> Bug

So this means if privacy is set to be required on registration every user registering after that should have an entry in the privacy table. Right? For some reason this did not work. The privacy table does not reflect values for some users although it was set to be mandatory. I guess this happened due to the privacy field not showing up on registration.

It has to exist in the POST for it to do anything with it. So, yeah that could be a result of it not showing up. It doesn't matter though if you have a default privacy set as the default will always take affect if there's no privacy row.

The issue still persists after applying the patch and regardless what I set "hiding of empty fields" to.

Are you having issues with the privacy not working at all on userlists or the ", 1" issue with image fields? That won't fix the image field issue, but it should fix the issue of privacy not working on userlists. The image field issue will be fixed in next release; I don't have a quickfix for that at this time.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • KatoKalin
  • KatoKalin
  • OFFLINE
  • Posts: 265
  • Thanks: 11
  • Karma: -5
  • Add-ons
10 years 4 months ago - 10 years 4 months ago #245894 by KatoKalin
Replied by KatoKalin on topic CB 1.9.1 CB Privacy -> Bug
CB Privacy seems to work on the userlist. But it looks like any user that should be removed from the list by CB Privacy will show up with this ",1" issue instead of not showing up.
I am trying to get rid of them by advanced filtering but this does not seem to work either.

When can we expect a fix for this as this is keeping my website on hold in offline mode.

Edit: When I use following code as filter
Code:
( ( SELECT COUNT(*) FROM `#__comprofiler_plugin_privacy` AS p WHERE p.`type` = 'profile' AND p.`user_id` = u.`id` AND `rule` = '0' ))

then 2 weird things happen:

1. The userlist returns 0 users when I leave all search input fields empty. When I fill up a search input field or use an asterisk, then the search returns an appropriate userlist.
2. The second weird part is that for the returned user list the search form (search criteria) remains visible all the time and does not get hidden anymore.
Last edit: 10 years 4 months ago by KatoKalin.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 4 months ago #245942 by krileon
Replied by krileon on topic CB 1.9.1 CB Privacy -> Bug

CB Privacy seems to work on the userlist. But it looks like any user that should be removed from the list by CB Privacy will show up with this ",1" issue instead of not showing up.

It can't remove the user from initial display. It only removes them from the results when a search is made on a field they have protected for example (this bubbles up to tab privacy then profile private, etc..).

When can we expect a fix for this as this is keeping my website on hold in offline mode.

After CB 2.0 goes stable CB Auto Actions, CB Conditional, and CB Privacy will receive their upgrades first. Until then all projects are on hold as right now CB 2.0 has priority. That isn't actually a bug though, it's just not possible to do in CB 1.x. You're seeing the ", 1" for image fields, because it's not doing very well at grabbing an image field with no value; that'll be fixed for next release though.

Edit: When I use following code as filter

That filter isn't valid. It should be as follows.

Code:
( ( SELECT COUNT(*) FROM `#__comprofiler_plugin_privacy` AS p WHERE p.`type` = 'profile' AND p.`user_id` = u.`id` AND `rule` = 0 ) > 0 )

Without the "> 0" it's not a valid AND statement, which is added to the WHERE. All filters add directly to the queries WHERE statement.

That filter also only shows users with profile privacy set to Public and only if they've a privacy row. So if they don't have a privacy row then they won't be in the list. To show all users with profile access set to something other than private you'd use "!= 99" when checking against the rule.

If you want to show every user with a profile privacy that isn't set to private and also show those without a privacy row at all then you could use the below.

Code:
( ( SELECT COUNT(*) FROM `#__comprofiler_plugin_privacy` AS p WHERE p.`type` = 'profile' AND p.`user_id` = u.`id` AND `rule` = 99 ) = 0 )

1. The userlist returns 0 users when I leave all search input fields empty. When I fill up a search input field or use an asterisk, then the search returns an appropriate userlist.
2. The second weird part is that for the returned user list the search form (search criteria) remains visible all the time and does not get hidden anymore.

Your query becoming invalid is likely what's causing odd behavior.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

Moderators: beatnantkrileon
Powered by Kunena Forum