CB Query Field not working in back end unless user is a Super User

6 years 9 months ago #295528 by adiehm
I have set up a Query field called cb_vehicle_01_register its value is set by the query SELECT `register` FROM `#__aaa_jaguar_cars` WHERE `model` = "[cb_vehicle_01_type]" and triggered by Update On cb_vehicle_01_type.

This all works fine in the website front end when a new user is registered or an existing user edits their own profile.
It also works fine in the Joomla Admin provided the user is a Super User.

If the Joomla Admin is an Administrator then the Query is not executed and the field cb_vehicle_01_register is cleared/blank. I need this field to update when an Administrator updates the user details.

Note: The table #__aaa_jaguar_cars has only 2 columns - Register and Model. CB is being used to manage a Car Club and the column Register in this table is like a genre/group of like models.

Please Log in to join the conversation.

6 years 9 months ago #295543 by krileon
The update on functionality is replaced with the update on functionality in CB Core Fields Ajax. Please note the update on currently in CB Query Field will be removed in its next major release. The implementation in CB Core Fields Ajax is more reliable and works with any field and has been tested with backend usage. There are no plans to make any further changes to the update on in CB Query Field or CB Code Field beyond removal in their next major releases.


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 to join the conversation.

6 years 9 months ago #295556 by adiehm
I'm not sure what your telling me there.
Is there an other way i should be doing this today or have a purchased a product that is broken and your not interested in fixing it because your going to drop that functionality soon.

Either way I need a solution to fix this today

Just so there is no confusion i have attached a screen dump of the CB Query Field that's not working
Attachments:

Please Log in to join the conversation.

6 years 9 months ago #295560 by krileon
As I've explained above that functionality has been replaced by CB Core Fields Ajax. It is capable of handling "Update On" for all field types and is tested working for backend and frontend. The functionality currently in CB Code Field and CB Query Field for "Update On" will be removed in their next major releases (e.g. CB Query Field 6.0.0).

With that said I have retested the existing implementation within CB Query Field in backend while logged in as a Super User and Administrator while editing a Super User, Registered, and Administrator user. In all cases it worked fine. This was with a query select using its update on against a text field. What type of field is "cb_vehicle_01_type"? Is it accessible in backend when editing the user as well? Is CB Query Field completely up to date with the latest build? There are some known fixed issues as shown below on our forge.

forge.joomlapolis.com/projects/cb-cbqueryfield/issues


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 to join the conversation.

6 years 9 months ago #295580 by adiehm
the field "cb_vehicle_01_type" is a "Query Drop Down (Single Select)", its parameters/query is "SELECT DISTINCT `model` FROM `#__aaa_jaguar_cars` ORDER BY `model`"
the field "cb_vehicle_01_register" is also a "Query Drop Down (Single Select)", its parameters/query is "SELECT `register` FROM `#__aaa_jaguar_cars` WHERE `model` = "[cb_vehicle_01_type]" and Parameters/query/update On is set to 'cb_vehicle_01_type'

Both fields use the same reference table "#__aaa_jaguar_cars"

I have attached 2 SQL files - The entire contents of "#__aaa_jaguar_cars" and the 2 records for "cb_vehicle_01_type" and "cb_vehicle_01_register" from #__comprofiler_fields my ID's 71 and 85

Log in the back end as an Administrator:
Scenario 1 - If you try to edit your own account in CB where both "cb_vehicle_01_type" and "cb_vehicle_01_register" already have existing values, changing "cb_vehicle_01_type" will trigger the change to "cb_vehicle_01_register" as expected.
Scenario 2 - If you try to edit another users account in CB (Group = Registered) where both "cb_vehicle_01_type" and "cb_vehicle_01_register" already have existing values, changing "cb_vehicle_01_type" will try to trigger the change to "cb_vehicle_01_register" (spinning icon beside field shows) but no values are returned and "cb_vehicle_01_register"
See attached image
Attachments:

Please Log in to join the conversation.

6 years 9 months ago #295588 by krileon
Pretty sure that was a known issue I've already fixed. I've retested this locally with an Administrator user and it worked perfectly fine. Please ensure CB Query Field and CB it self both absolutely have the latest builds installed (install them again if necessary or unsure). If issue persists after ensuring everything installed is up to date please PM backend super administrator login credentials as well as a test administrator account where the issue can be seen and will review.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.239 seconds

Facebook Twitter LinkedIn