Skip to Content Skip to Menu

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

  • cpaschen
  • cpaschen
  • OFFLINE
  • Posts: 328
  • Thanks: 42
  • Karma: 9
5 years 7 months ago #311508 by cpaschen
The problem is only happening on the drop-down, and not always - and I really can't determine what if any pattern is reflected in when or when it is displaying ids instead of labels. However, when clearing the site's cache then it 'usually' has the labels show again for a while, but after a few times testing (and refreshing the front-end registration form) the id numbers start appearing again.

I did see that the 3rd query's table fields somehow started saving the label (looks like the query got changed at some point). I changed the query to make sure it was storing the id. Then went through the entire table where those records were stored with labels in the fields and replaced them with the appropriate IDs; however, that didn't seem to make any different.

Also, the 4th query is still showing nothing at all - except the manually entered item (value:9999;label:My Location Not listed).
In fact, I don't even get a 'spinning wheel' upon changing the 3rd query's selection which this 4th is dependent upon.

I thought that this might be a javascript problem - but I'm not seeing any errors in the console when debugging.

Any other ideas come to mind what might be causing this?

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

  • cpaschen
  • cpaschen
  • OFFLINE
  • Posts: 328
  • Thanks: 42
  • Karma: 9
5 years 7 months ago #311509 by cpaschen
Two additional things I just noticed:

1. the last query had `#__ for the query's table prefix - instead of the actual prefix. When I changed that the last query started to work (at least it will occasionally display values there, although still having problems with the 3rd query sometimes showing IDs - which causes the last query to not function.

2. The RAM on the server is being maxed out due to cache useage (even though all caching is disabled).
I'm guessing that running out of resources (esp RAM) could easily be a cause of the problems where so I'm working with our hosting techs to try to identify that issue.

I'll repost here after the ram/cache issues are resolved.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
5 years 7 months ago #311513 by krileon

Also, the 4th query is still showing nothing at all - except the manually entered item (value:9999;label:My Location Not listed).
In fact, I don't even get a 'spinning wheel' upon changing the 3rd query's selection which this 4th is dependent upon.

Was able to confirm that as a bug in CB Core Fields Ajax and its Update On chaining functionality. Have fixed for a new build available now.

forge.joomlapolis.com/issues/7508

1. the last query had `#__ for the query's table prefix - instead of the actual prefix. When I changed that the last query started to work (at least it will occasionally display values there, although still having problems with the 3rd query sometimes showing IDs - which causes the last query to not function.

It's best to always use #__ as it'll replace the table prefix automatically as defined in Joomla. Be sure to be using quotes appropriately to escape tables, strings, etc.. as well for a clean SQL.



I'm still unable to reproduce your id/label switching issue. Maybe it's a problem with the query not being clear enough? I'm using the below in my tests successfully without issues.

Field: cb_billingcountry
Query
Code:
SELECT `country_name`, `country_region` FROM `#__comprofiler_countries` ORDER BY `country_region`, `country_name`
Value Column: country_name
Label Column: country_name
Group Column: country_region

Field: cb_billingstate
Query:
Code:
SELECT p.`province_iso_code`, p.`province_name` FROM `#__comprofiler_provinces` AS p LEFT JOIN `#__comprofiler_countries` AS c ON c.`country_iso_code2` = p.`country_iso_code2` WHERE c.`country_name` = '[cb_billingcountry]' ORDER BY p.`province_latin_name` asc
Value Column: province_iso_code
Label Column: province_name
Update On: cb_billingcountry

I've yet to find any issues in CB Query Field it self when building the select options.


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.

  • cpaschen
  • cpaschen
  • OFFLINE
  • Posts: 328
  • Thanks: 42
  • Karma: 9
5 years 7 months ago #311524 by cpaschen
OK ... that update seeded to fix the 4th query field. Thanks!

However, now we've got another (new) problem.

I've got a Text Field (cb_parishnamenew) that is set-up to be conditionally displayed when the user selects a specific entry in the 4th field - specifically with a value of 9999 (i.e. 'My parish is not listed').

The Text field has the following settings in the Integrations tab:

CB Conditional:

Display: Field conditional show
Conditions:
Field: cb_parishid
Operator: Equal To
Value: 9999
Translate Value: No

CB Core Fields Ajax:

Template: Same as Global
Profile View: Disabled
Userlists View: Disabled
Placeholder: blank
Update On: cb_parishid

However, this field is never showing up.

NOTE: I've also got a similar field associated with the 2nd drop-down field (9999-'My state is not listed') and the the 3rd drop-down field (9999-My diocese is not listed). They are all behaving the same - not showing. I THINK that they were showing prior to this last update (although everything was a bit 'off' so I'm not sure they always displayed).

Thanks for the work on this ... we're getting closer! :-)

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
5 years 7 months ago #311532 by krileon

I've got a Text Field (cb_parishnamenew) that is set-up to be conditionally displayed when the user selects a specific entry in the 4th field - specifically with a value of 9999 (i.e. 'My parish is not listed').

Ok, that should be fixed now as well in the latest CB Core Fields Ajax build. I've a Country > State > City query select setup that is fully functional. State conditions and updates on Country and City conditions and updates on State. There should be no further chaining issues. I still don't know what is causing your ID/LABEL switch issue though in CB Query Field it self.


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.

  • cpaschen
  • cpaschen
  • OFFLINE
  • Posts: 328
  • Thanks: 42
  • Karma: 9
5 years 7 months ago #311534 by cpaschen
Just to clarify - the ID/LABEL issue appears to be resolved - either with the latest patch or because we threw some additional resources at the server and it's no longer hitting RAM limits.

However, the last problem noted - the conditional text field is not resolved with the latest patch.

The drop-downs are all displaying properly, but none of these other conditional text fields (that are all only displaying when a specific option is selected in a drop-down) are displaying at all.

We've updated all CB Plugins as well just to be sure and all are up-to-date.

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

Moderators: beatnantkrileon
Powered by Kunena Forum