[#4982] 1062 error CBSubs

9 years 4 months ago - 9 years 4 months ago #256173 by Vajaro
[#4982] 1062 error CBSubs was created by Vajaro
Hi,

I receive an 1062 error when I want to copy a promotion. To be complete I copy the whole error message. Also the promotion on my website is disapeared.

I use Joomla 3.3.6, CBSubs 4.0.0 and CB 2.0.4. What could went wrong en how can I fix this? Thanks in advance for your help! Regards, Vajaro

The error:
Duplicate entry 'Korting 20 euro' for key 'name' SQL=INSERT INTO `o6i_cbsubs_promotions` (`name`,`promotion_type`,`coupon_code`,`coupon_code_cbfield`,`coupon_description`,`discount_type`,`rate`,`currency`,`amount`,`rate_cbfield`,`currency_cbfield`,`amount_cbfield`,`amount_cbfield_deduct`,`stages`,`priority`,`exclusive_within_priority`,`show_also_zero_values`,`applies_to_first_payment`,`applies_to_recurrings`,`applies_to_registrations`,`applies_to_upgrades`,`applies_to_renewals`,`max_uses_total`,`max_uses_per_customer`,`buyer_geo_zone_id`,`applies_to_business_consumer`,`applies_to_items`,`plans_applied_to`,`plans_sametime_required`,`cal_proratatemporis`,`cal_periodmissed`,`cal_fullmissed`,`cal_maxdperiodsmissed`,`cal_catchuppromotion`,`cond_1_operator`,`cond_1_plans_required`,`cond_1_plans_status`,`cond_1_purchase_ok`,`cond_1_date_1`,`cond_1_date_cbfield_1`,`cond_1_value_1`,`cond_1_dates_diff_a`,`cond_1_dates_diff_b`,`cond_1_date_2`,`cond_1_date_cbfield_2`,`cond_1_value_2`,`cond_2_operator`,`cond_2_plans_required`,`cond_2_plans_status`,`cond_2_purchase_ok`,`cond_2_date_1`,`cond_2_date_cbfield_1`,`cond_2_value_1`,`cond_2_dates_diff_a`,`cond_2_dates_diff_b`,`cond_2_date_2`,`cond_2_date_cbfield_2`,`cond_2_value_2`,`published`,`start_date`,`stop_date`,`viewaccesslevel`,`usergroups`,`user_ids`,`ordering`,`cssclass`,`owner`,`override_plans_display`,`plan_name_descr_display_type`,`plan_name_display_text`,`plan_description_display_text`,`plan_price_display_type`,`plan_price_display_saletext`,`plan_price_display_text`,`params`,`integrations`) VALUES ('Korting 20 euro','coupon','[KORTING20]','0','Vergeet niet om gebruik te maken van de korting.','fixed','0.0','','20','0','0','0','0','','1','1','1','1','1','1','1','1','0','0','0','A','1','4','','0','1M','1','','1','1','1|*|3|*|2','A|*|R|*|X|*|U','0','','0','','','','','0','','','','','0','','0','','','','','0','','1','2014-11-22','2015-04-01','2','2','','1','','0','1','1','','<h3><strong>Aanbieding: 20 euro korting!</strong></h3>','2','Lidmaatschap met korting:','<p>Maak gebruik van de aanbieding en ontvang 20 euro korting op de aanschaf van of de upgrade naar het lifetimelidmaatschap. Normale prijs lifetimelidmaatschap is: [NORMAL_PRICE_NO_DURATION]. Nu met korting: [DISCOUNTED_PRICE_NO_DURATION].Gebruik de volgende couponcode: <strong>[KORTING20] </strong>Aanbieding loopt tot en met 31 maart 2015.</p>','','')

Please Log in to join the conversation.

9 years 4 months ago #256232 by krileon
Replied by krileon on topic 1062 error CBSubs
The name column is marked unique, but the copy isn't incrementing the name or altering it in any way before storing, which results in that error. Was able to confirm your issue and have created a bug ticket to investigate further. However, you should not have lost the original promotion as the original is never touched during the copy process.

#4982

The only workaround at this time would be to manually copy the row within phpmyadmin in the _cbsubs_promotions table then alter the name before storing the copy.


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.

9 years 4 months ago #256239 by Vajaro
Replied by Vajaro on topic 1062 error CBSubs
Hi,

Thanks for your quick reply. Looking forward to the fix of this issue.

My promotion is now set up and active, condition is filled and applied to the specific plan. In my opinion there should not be an reason that the promotion does not show up in the frontend. Unfortunately it does not show up. Is there maybe a setting that I could have missed?

Thanks again!

Regards,
Vajaro

Please Log in to join the conversation.

9 years 4 months ago #256243 by krileon
Replied by krileon on topic 1062 error CBSubs
Try removing any conditions for the promotion and see if it applies. The issue could be with the condition failing.


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.

9 years 4 months ago #256283 by Vajaro
Replied by Vajaro on topic 1062 error CBSubs
Solved! I had installed the nightly built components to solve my problem with access to locations. When I installed the regular promotions plugin the promotion showed up. It looks like there was an error in the nightly built of 30 december 2014.

Regards,
Vajaro

Please Log in to join the conversation.

9 years 3 months ago #256327 by nant
Replied by nant on topic 1062 error CBSubs

Vajaro wrote: Solved! I had installed the nightly built components to solve my problem with access to locations. When I installed the regular promotions plugin the promotion showed up. It looks like there was an error in the nightly built of 30 december 2014.

Regards,
Vajaro


Interesting - we just pushed a new nightly - can you check if error is still present with this one?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.201 seconds

Facebook Twitter LinkedIn