- Posts: 330
- Thank you received: 5
Bug in J! / EB Field Mapping returns name from _users table not _eb_categories
- OTWD
-
Topic Author
- Offline
- Platinum Member
-
Less
More
1 year 9 months ago - 1 year 9 months ago #159287
by OTWD
Success consists of going from failure to failure without loss of enthusiasm.
Bug in J! / EB Field Mapping returns name from _users table not _eb_categories was created by OTWD
Using J!4.3.3. and EB4.5.0
I created a Joomla Custom Registration field
name = name
Query = SELECT name AS value, name AS text FROM #__eb_categories WHERE parent != 0
This returns all the names of the child categories and works well when testing in phpMyAdmin
e.g Kildare, Laois, Offaly
I then map this J!Reg field to EB custom fields using the userprofile plugin.
However as there is a name field in the #__users table the query returns the users concat name e.g "John Smith" rather than the name "Kildare" from the #__eb_categories table!
How can i return the name of the category?
I created a Joomla Custom Registration field
name = name
Query = SELECT name AS value, name AS text FROM #__eb_categories WHERE parent != 0
This returns all the names of the child categories and works well when testing in phpMyAdmin
e.g Kildare, Laois, Offaly
I then map this J!Reg field to EB custom fields using the userprofile plugin.
However as there is a name field in the #__users table the query returns the users concat name e.g "John Smith" rather than the name "Kildare" from the #__eb_categories table!
How can i return the name of the category?
Success consists of going from failure to failure without loss of enthusiasm.
Last edit: 1 year 9 months ago by OTWD.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
1 year 9 months ago #159291
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Bug in J! / EB Field Mapping returns name from _users table not _eb_categories
I don't understand your question. If you setup the custom fields in Users, then not sure how it is related to Events Booking here. Could you please explain more details because I still don't really understand what's the actual issue here
Regards,
Tuan
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- OTWD
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 330
- Thank you received: 5
1 year 9 months ago #159309
by OTWD
Success consists of going from failure to failure without loss of enthusiasm.
Replied by OTWD on topic Bug in J! / EB Field Mapping returns name from _users table not _eb_categories
Thanks Tuan
Instructions to replicate the issue:
Can you replicate this?
Instructions to replicate the issue:
- In EB Setup Category and Sub Category e.g Kildare (Parent), Orchard House (Child of Kildare)
- Go to Joomla > Users > Fields > New field (Type: sql, Name: name, Label: Category Name, Query: SELECT name AS value, name AS text FROM #__eb_categories WHERE parent != 0
- Test that the J! user field loads your Sub Category (i.e "Orchard House")
- Assign the "Category Name" value to a registered user in Joomla (e.g John Smith) > Click Save.
- Go to plugins and activate Events Booking - Userprofile
- Go to EB Custom fields > New > Text field > Field Mapping > Select Field "Category Name" > Show custom field in All
- Setup event with registration access = "Registered"
- Login to book the event with the registered user (John Smith) - you will see that the Custom field will load the name field fom the #__users (John Smith) table NOT #__eb_categories (Orchard House)
Can you replicate this?
Success consists of going from failure to failure without loss of enthusiasm.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
1 year 9 months ago #159311
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Bug in J! / EB Field Mapping returns name from _users table not _eb_categories
I have no clue why it is working like that. For this, I think you can submit a support ticket sending us:
1. Super admin account of the site
2. A user account which can be used to login, perform registration and see this error
3. Link to registration form
I will check to see why the issue happens and get it sorted
Regards,
Tuan
1. Super admin account of the site
2. A user account which can be used to login, perform registration and see this error
3. Link to registration form
I will check to see why the issue happens and get it sorted
Regards,
Tuan
The following user(s) said Thank You: OTWD
Please Log in or Create an account to join the conversation.
- OTWD
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 330
- Thank you received: 5
1 year 9 months ago #159323
by OTWD
Success consists of going from failure to failure without loss of enthusiasm.
Replied by OTWD on topic Bug in J! / EB Field Mapping returns name from _users table not _eb_categories
SOLVED
I was following instructions here docs.joomla.org/SQL_form_field_type
" name (mandatory) is the unique name of the field. This must match the name of the query results column that contains the values that will be shown to the user in the drop-down list, unless a different name is specified in the value_field attribute. "
So dont use name = "name" in J! User Custom fields, otherwise they get confused in EB - change to e.g name = "category-name" then it works. thanks @tuan
I was following instructions here docs.joomla.org/SQL_form_field_type
" name (mandatory) is the unique name of the field. This must match the name of the query results column that contains the values that will be shown to the user in the drop-down list, unless a different name is specified in the value_field attribute. "
So dont use name = "name" in J! User Custom fields, otherwise they get confused in EB - change to e.g name = "category-name" then it works. thanks @tuan
Success consists of going from failure to failure without loss of enthusiasm.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
1 year 9 months ago #159329
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Bug in J! / EB Field Mapping returns name from _users table not _eb_categories
Yes. There are some reserved names use by Events Booking to get data from Joomla user account, so please don't use these reserved names:
- name
- username
- email
Except the above names, you can use any name for name of the user custom fields
Regards,
Tuan
- name
- username
Except the above names, you can use any name for name of the user custom fields
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.