Problems with CB Query

12 years 9 months ago #168857 by connieherdez
Problems with CB Query was created by connieherdez
Hello! I'm doing the next query to add a resource after user registration in ABPro:

INSERT INTO jos_sv_apptpro2_resources (`id_resources`, `category_id`, `name`, `description`, `cost`, `ordering`, `resource_email`, `prevent_dupe_bookings`, `max_dupes`, `resource_admins`, `rate`, `rate_unit`, `default_calendar_category`, `default_calendar`, `allowSunday`, `allowMonday`, `allowTuesday`, `allowWednesday`, `allowThursday`, `allowFriday`, `allowSaturday`, `checked_out`, `checked_out_time`, `published`, `timeslots`, `disable_dates_before`, `disable_dates_before_days`, `min_lead_time`, `disable_dates_after`, `disable_dates_after_days`, `sms_phone`, `google_user`, `google_password`, `google_default_calendar_name`, `access`, `enable_coupons`, `max_seats`, `non_work_day_message`, `non_work_day_hide`, `paypal_account`) VALUES ('[user_id]', NULL, '[name]', '[cb_norazonsocial]', NULL, NULL, [email], 'Global', '0', '[user_id]', '0.00', 'Flat', 'General', 'Default', 'No', 'Yes', 'Yes', 'Yes', 'Yes', 'Yes', 'No', '0', NULL, '1', 'Global', 'Tomorrow', '0', '1', 'Not Set', '0', '[cb_telmovil1]', NULL, NULL, NULL, 'registered_only', 'No', '1', '', 'Yes', '');

The query run in the Trigger: onAfterUserApproval,onBeforeUserApproval

But after running the new registry isn't saved in the database and don't show any error. Can you tell me where is the error?

Thanks.

Please Log in to join the conversation.

12 years 9 months ago #168935 by krileon
Replied by krileon on topic Re: Problems with CB Query
Please enable debug mode and maximum error reporting within Joomla global configuration. Then approve a user and confirm if there's any on-screen errors (this helps debug your queries). The better trigger to be using is directly after registration and not after approval and certainly not after and before approval at the same time (you're executing it twice in a row). Please also ensure the access is set to "Everybody" (the access is NOT based off the user triggering the trigger, it's based off the access of the user object as a result of the trigger).


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.
The following user(s) said Thank You: connieherdez

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.384 seconds

Facebook Twitter LinkedIn