Skip to Content Skip to Menu

DB error for fields Query Drop Down fields (Single Selection).

  • AchLive
  • AchLive
  • OFFLINE
  • Posts: 253
  • Thanks: 14
  • Karma: 3
7 years 11 months ago - 7 years 11 months ago #288133 by AchLive
Hi, I created some fields (exactly 9) Type "Query Drop Down fields (Single Selection)".
When I compile the fields and try to save the registration form the values are not stored. I tried to do a check on the DB with this job in Tools -> Check for Community Builder Database, and I get the error I am attaching as picture.
You may depend on what? What should I do to solve the problem as suggested in the bottom of the error message?
This can be fixed in SQL with tools like phpMyAdmin.
Joomla version: 3.6.4
CB Version 2.0.15+build.2016.11.17.23.30.51.00b5b220a
CB QueryField plugin version 5.0.4+build.2016.06.07.01.36.22.f15cd6cb1
Attachments:
Last edit: 7 years 11 months ago by AchLive. Reason: Add version Cb, Joomla, Query Field plugin

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

  • AchLive
  • AchLive
  • OFFLINE
  • Posts: 253
  • Thanks: 14
  • Karma: 3
7 years 11 months ago - 7 years 11 months ago #288139 by AchLive
It seems that the error occurs when you compiled the value line - label. If left blank then the error in the DB disappears (Watch image).

The field value and the field label, however, are required to show the empty option or selection

You can also check on your demo site where I added a field in the Contact Info Tab I called Test Query Drop Down Single Select
Attachments:
Last edit: 7 years 11 months ago by AchLive.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 11 months ago #288151 by krileon
It's a database check to see if values in _comprofiler_field_values belong to a select fieldtype. It's safe to ignore. Have added a bug ticket to fix the check to be able to handle queryselect, codeselect, etc.. fieldtypes.

forge.joomlapolis.com/issues/6308

What do you mean the field values don't save? If you supply a value and label pair under Global it won't save those or it won't save any value? The values supplied under Global are saving perfectly fine for me in my tests. Please ensure CB Query Field and CB are both up to date.


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.

  • ernienet
  • ernienet
  • OFFLINE
  • Posts: 132
  • Thanks: 10
  • Karma: 1
7 years 4 weeks ago #298399 by ernienet
I have a single checkbox field that is returning a similar database error:

Warning: 2 entries in Community Builder comprofiler_field_values link back to fields of wrong fieldtype.
fieldvalueid=126 fieldtype=checkbox
fieldvalueid=127 fieldtype=checkbox
This one can be fixed in SQL using a tool like phpMyAdmin.

It's a checkbox I use for excluding people (like myself as the web developer, and those who don't want their profile visible) from user lists on the website. I use a filter in the Lists based on this field.

It's set to Checkbox (Single), but when I change it to Checkbox (Multiple) or Radio Buttons, I can see two options. But since I only want the one option - to check the box if I want to exclude the user from lists.

As I was writing this, I tested setting the field to Checkbox (Multiple) and only having the one option: "TRUE", "Do not list". This fixed the database check, but seems a little odd, since I really don't want "multiple" because it's a logical - either true (checked) or false (unchecked).

Seems I solved my own problem but was curious if this is still an unresolved issue in the database check process.

Thank you,
Ernie

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 4 weeks ago - 7 years 4 weeks ago #298400 by krileon
There are field options stored in the database for a field that doesn't have field options. That's all that check is telling you. It's entirely safe to ignore if you're aware of this issue and continue to leave the fieldtype as checkbox. It is caused by changing a fields type. For example if the field was a multicheckbox, select, multiselect, or radio fieldtype where options where supplied under the Global tab and you changed it to a checkbox, text, integer, etc.. fieldtype you'll get that database check error. There is no clean up process for orphaned field options at this time as that could be an accidental data loss so we just inform you of the issue.

As for how to exclude users who have the checkbox checked from a userlist simply add a basic filter against the field and condition against 1. Checkbox stores its values as 1 (Yes) and 0 or NULL (No).


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.
Last edit: 7 years 4 weeks ago by krileon.

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

Moderators: beatnantkrileon
Powered by Kunena Forum