silvershop / silvershop-core

SilverShop is an e-commerce shopping cart module for the SilverStripe CMS
http://silvershop.github.io
BSD 2-Clause "Simplified" License
113 stars 119 forks source link

CartPage and CheckoutPage records are created multiple times #690

Closed marcokernler closed 5 years ago

marcokernler commented 5 years ago

Unless I set the 'create_default_pages' option for both page types to false, both records will be re-created on each /dev/build.

It seams self::get()->exists() in CheckoutPage and CartPage, returning false even if the specific page already exists.

I installed SilverStripe via the "silverstripe/recipe-cms": "4.2.1@stable", recipe.

wilr commented 5 years ago

@marcokernler You don't happen to subclass those pages in your project do you?

marcokernler commented 5 years ago

hi @wilr, nope - no subclassing. This happened after a fresh installation...

sparkcom commented 5 years ago

i remember i got the same problem, i put

SilverShop\Page\CheckoutPage:
  create_default_pages: false

in my config.yml file