Query Drop Down - Single Select displaying Value not Label after update

5 years 4 weeks ago #311440 by cpaschen
We updated all our CB plugins last Friday (related to the #7495 Authorize.net problems)

However, in updating all of our CB plugins it looks like there might be a problem with the CB Query Field (6.0.0+build.2019-03-21-15-18-16).

I've got a field with the following Query:
SELECT 
CONCAT( IF(a.org_name_display<>'',a.org_name_display,a.org_name),' (',a.org_city,', ',b.name,')') as name, 
a.id as id
FROM wukrp_cmd_systems_masterorg as a
LEFT JOIN wukrp_cmd_systems_state as b on a.org_state_id = b.id
WHERE  a.org_state_id = '[cb_parish_state]'
ORDER BY a.org_name

And the following options set:
  • Value Column - id
  • Label Column - name
  • Group Column - -blank-

On the admin-side of CB the query is displaying properly. I see the label in the drop-down.
However, on the front-end of the site, we just see the ID numbers.
This was all displaying properly prior to the last round of updates to CB plugins.

If it matters, the query for the cb_parish_state (which is referenced in this dropdown) is this:
SELECT CONCAT(`name`,' (', `abbrev`,')') AS label, id
FROM wukrp_cmd_systems_state
WHERE `country` = '[cb_parish_country]'
ORDER BY `name`

Value Column: id; Label Column: label; Group Column: blank

And the cb_parish_country is this:
SELECT `name`, id 
FROM wukrp_cmd_systems_country
ORDER BY `ordering`, `name`

Value Column: id; Label Column: name; Group Column: blank


Additionally ... another problem, apparently with field is that there is also one more drop-down in this long chain:
SELECT
CONCAT(t1.org_name,' (',t1.org_city,', ',t2.abbrev,')') as 'generated_orgname', 
t1.id as valueid
FROM wukrp_cmd_systems_organization AS t1
LEFT JOIN wukrp_cmd_systems_state AS t2 ON t1.org_state_id = t2.id
WHERE t1.master_org_id = '[cb_parish_archdiocese]'
ORDER BY t1.org_name

Which is obviously filtered on that initial drop-down select; however, it's not displaying anything in the admin (and obviously not working on the front-end either).

Any ideas what might be going on here?

Please Log in to join the conversation.

5 years 4 weeks ago #311441 by cpaschen
OK ... without making ANY changes at all ... I just went back to test to make sure that I had selected properly and now the front-end is displaying properly, and the admin is down working similar to the front-end; however, when I select one of the options from the 'cb_arch_diocese' field (the one that was originally having problems on the front-end displaying only the IDs) it is now only displaying IDs on the admin-side CB edit, but when I select one of those IDs, the related/filtered following field (cb_parish field) ... it actually is showing the properly filtered fields.

And, as noted above, the front-end is now displaying the proper label and not the id in the drop-down.


I'm confused at how this might change from one test to another, without any changes to the query code (and no other changes to the site that I'm aware of).

We do have Cloudflare enabled on this site. Could that type of service (or other caching mechanisms) have any effect on these query drop-down fields?

Please Log in to join the conversation.

5 years 4 weeks ago #311447 by krileon
The code for outputting the Query options was completely unchanged. The only code for option output that was changed was for the stored options configured under the Global tab to support the grouping and blank value label features added in a core CB release. Your issue sounds like some sort of odd caching problem. I'm seeing no issues here in my tests. Try purging all forms of caching and see if issue persists.


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.

5 years 4 weeks ago #311479 by cpaschen
Thanks.

We did further test by purging the entire cache with Cloudflare and that cleared everything up for a short time, then after a few hours, we had similar problems again. Purged again and same thing happened again.
After disabling Cloudflare completely from the site the problem seems to have gone away.
So we are in the process of uninstalling cloudflare which will hopefully resolve this issue for good.
(We'll then look at re-introducing a different CDN once we have things working stable)
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

5 years 4 weeks ago #311504 by cpaschen
We have completely removed Cloudflare and still having same problems.
However, it is very intermittent.
Sometimes we get the IDs displaying, sometimes the text.
If we clear the cache on the server it usually makes the front-end work for one round, but as soon as we leave and come back to the CB registration form, the fields are once again showing IDs.
Also, changing the initial option (country) does update the second option (state); however, changing the state option usually does NOT force an update in the third field (master_org), it just continues to show the previous record.

We have disabled all caching on the web site and still have the same issue.

Any other ideas where to test next?

Please Log in to join the conversation.

5 years 4 weeks ago #311505 by krileon
Is it only displaying incorrectly on profile view or are the wrong labels displaying in the dropdown it self? Displaying incorrectly in profile view could be a value matching issue in the display code, but if displaying incorrect labels in the dropdown I don't see how that could be happening as that code again was not touch except for the Group usage now properly closes the optgroups which you aren't using.


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.298 seconds

Facebook Twitter LinkedIn