Hi.

After updating to the latest dev version of commerce_feeds this message appeared

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'FeedsCommerceCouponProcessor-class' for key 'PRIMARY': INSERT INTO {registry} (name, type, filename, module, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => FeedsCommerceCouponProcessor [:db_insert_placeholder_1] => class [:db_insert_placeholder_2] => sites/all/modules/commerce_feeds/plugins/FeedsCommerceCouponProcessor.inc [:db_insert_placeholder_3] => commerce_feeds [:db_insert_placeholder_4] => 0 ) in _registry_parse_file() (line 179 of /home/immort16/public_html/mybaladeur/includes/registry.inc).

I also updated to the latest version of feeds

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

frixos12’s picture

Moved back to recommended version and error disappeared

pcambra’s picture

Status: Active » Closed (works as designed)

Commerce coupon had feeds integration and it was moved into commerce feeds, so if you use both dev versions of the modules it should be fine.

PatchRanger’s picture

Status: Closed (works as designed) » Needs review
FileSize
1.16 KB

I had a similar problem.

Symptoms :
After updating commerce_feeds to latest dev I got this error message instead of every page on my site :

Fatal error: Call to undefined function commerce_coupon_type_get_name() in /srv/bindings/d3b66cb38bfa46b9ab489fd93f58c1c5/code/sites/all/modules/commerce_feeds/plugins/FeedsCommerceCouponProcessor.inc on line 66

How to reproduce :

  • Having commerce_feeds enabled of any stable version (in fact I had the dev-version but from earlier date).
  • Updating commerce_feeds code to latest dev.
  • Flush caches.

Reason :
Small investigation resulted in commerce_feeds.module file : it has a feeds plugin declaration for coupon processing - but I don't have commerce_coupon installed. That is the reason of this error.
I think that my problem is related to this topic because of theese reasons :

  1. Error happens when updating to the latest dev.
  2. The root of the problem is in commerce coupon processing.

The difference between my case and this one is in the state of commerce_coupon module : Frixos had it installed and I don't. That is why error message are different.

How to solve :

  • Backup your database and code.
  • Apply attached patch.
  • Do registry rebuild by the module of the same name : Registry Rebuild .
  • Flush caches and refresh the page of your site.

Voila! It works! :)

Please review the patch.

checker’s picture

Thank you Staratel. Bug is fixed.

PatchRanger’s picture

Glad to hear.
We need at least one more success story to mark this patch as "reviewed & tested by the community".

checker’s picture

I'm wondering because the "older" versions of feeds have no problems with current commerce_feeds version. Maybe it is not the root of the problem just to check if the coupon module is enabled?!

PatchRanger’s picture

See comment #2 above.
As you could see in commit histories Commerce Coupon Feeds support was moved on the 3rd of February from Commerce Coupon (Commerce Coupon commit history) to Commerce Feeds (Commerce Feeds commit history).
That is why all releases elder than this date are working fine together while those are newer are resulting in this error.

pcambra’s picture

Status: Needs review » Reviewed & tested by the community

This is definitely a go. I'll commit it asap.

pcambra’s picture

Status: Reviewed & tested by the community » Fixed

Commited, many thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.