Installatie Drupal Commerce 2.x (2015-2016)
Procedure
Deze procedure is de combinatie van de verschillende casussen van hieronder.
- Basisinstallatie Drupal 8
- Installatie Composer Manager, want nodig voor Drupal Commerce:
drush en -y composer_manager
- Initiatie Composer Manager vanaf wortel van de installatie:
php modules/composer_manager/scripts/init.php
- Installatie Drupal Commerce:
drush en -y commerce
Casus: 17 Nov. 2015 - Libraries lukken niet
- Basisinstallatie Drupal 8 RC 4
- Drush bijwerken:
composer global update
ivm. [1] - Drupal Commerce installeren:
drush en commerce
- Installatie vereiste ondersteunende modules:
drush en address, inline_entity_form, profile
- Installatie benodigde php-libraries composer:
cd /modules/commerce composer install
Helaas: Ik blijf de foutmelding krijgen dat libraries ontbreken
Casus: 17 Nov. 2015 - Gelukt!
- Basisinstallatie Drupal 8 RC 4 - Handmatig, dus zonder drush
- Drupal Commerce geïnstalleerd - Handmatig vanwege die vervelende fouten-loop waar Drush steeds in belandt
- Composer Manager-module handmatig geïnstalleerd → Dat had ik tijdens de eerdere casus niet gedaan
composer_manager
gestart vanaf de wortel van deze Drupal-installatie:
php modules/composer_manager/scripts/init.php
Uitvoer:
Composer Manager has been successfully initialized.
Invoer:
composer drupal-update
Uitvoer:
> Drupal\composer_manager\Composer\Command::update Loading composer repositories with package information Updating dependencies (including require-dev) - Removing composer/installers (v1.0.21) - Installing composer/installers (v1.0.22) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Removing wikimedia/composer-merge-plugin (dev-master 47bb338) - Installing wikimedia/composer-merge-plugin (v1.3.0) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Removing egulias/email-validator (1.2.9) - Installing egulias/email-validator (1.2.11) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Removing zendframework/zend-diactoros (1.1.3) - Installing zendframework/zend-diactoros (1.1.4) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Removing composer/semver (1.0.0) - Installing composer/semver (1.2.0) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Removing sebastian/global-state (1.0.0) - Installing sebastian/global-state (1.1.1) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Removing phpunit/phpunit (4.8.11) - Installing phpunit/phpunit (4.8.18) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Removing doctrine/cache (v1.4.2) - Installing doctrine/cache (v1.5.1) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Removing doctrine/inflector (v1.0.1) - Installing doctrine/inflector (v1.1.0) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Removing zendframework/zend-stdlib (2.7.3) - Installing zendframework/zend-stdlib (2.7.4) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Removing guzzlehttp/promises (1.0.2) - Installing guzzlehttp/promises (1.0.3) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Removing guzzlehttp/psr7 (1.2.0) - Installing guzzlehttp/psr7 (1.2.1) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Removing fabpot/goutte (v3.1.1) - Installing fabpot/goutte (v3.1.2) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Installing commerceguys/intl (dev-master d975da2) Downloading: 100% > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Installing commerceguys/pricing (dev-master fd1c8e6) Downloading: 100% > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Installing commerceguys/enum (v1.0) Loading from cache > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Installing commerceguys/addressing (v0.8.1) Downloading: 100% > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Installing commerceguys/zone (v0.7.1) Downloading: 100% > Drupal\Core\Composer\Composer::vendorTestCodeCleanup - Installing commerceguys/tax (dev-master c4df96b) Downloading: 100% > Drupal\Core\Composer\Composer::vendorTestCodeCleanup commerceguys/addressing suggests installing symfony/intl (to use it as the source of country data) commerceguys/addressing suggests installing symfony/form (to generate Symfony address forms) Writing lock file Generating autoload files > Drupal\Core\Composer\Composer::preAutoloadDump > Drupal\Core\Composer\Composer::ensureHtaccess
- Commerce-modules installeren - Dit keer wel met Drush:
drush en -y commerce commerce_order commerce_product commerce_tax
- Gelijk weer die irrante loop, maar de modules lijken wel geïnstalleerd te zijn.
... Installatie gelukt!
Casus: 21 Nov. 2015
- Installatie Drupal 8.0.0 (handmatig)
composer global update
- Bleek niet nodig te zijn- Composer Manager:
drush en -y composer_manager
- Drupal Commerce:
drush en -y commerce
- In één keer gelukt
Benodigde additionele modules
drush en -y address drush en -y inline_entity_form drush en -y profile
Submodules aanzetten
Handmatig:
- Drupal Core: Statistics
- Drupal Commerce: Commerce Payment, Commerce Price, Commerce Tax - Externe PHP-libraries worden vanzelf binnengehengeld
- Field Types: Telephone
- Multilingual: Alle opties
Gescript, met dank aan drush pml
:
drush en -y address drush en -y inline_entity_form drush en -y config_translation drush en -y content_translation drush en -y locale drush en -y language drush en -y statistics drush en -y commerce_cart drush en -y commerce_order drush en -y commerce_payment drush en -y commerce_price drush en -y commerce_product drush en -y commerce_store
Trusted Host Settings
Toegevoegd aan settings.php
:
$settings['trusted_host_patterns'] = array( '^sub\.example\.com$', '^www\.sub\.example\.com$' );
Dit betreft de configuratie van een subdomein, en ik weet zo snel niet of www wel gerdirect wordt naar de variant zonder www.
Basis-instellingen
Er viel weinig in te stellen:
- Configuration » Regional and language: First day of the week
Casus 19 & 21 dec. 2015
Niet gelukt. Zie Drupal 8 - Overstappen? voor details.
Casus begin januari 2016
Niet gelukt:
Conflicterende versies van Drush
Gedoe met verschillende versies van drush: AccountInterface-foutmelding (Drupal), wat ik uiteindelijk ad-hoc heb opgelost. Ik moet een keer uitzoeken hoe sudo
en su
precies werken.
Composer: Missende .git-map
Storing tijdens executie van composer drupal-update
:
[RuntimeException] The .git directory is missing from /var/www/example.com/vendor/jcalderonzumba/mink-phantomjs-driver, see https ://getcomposer.org/commit-deps for more information
Daar is een patch voor: wget https://www.drupal.org/files/issues/2629772-2.patch
maar die kreeg ik niet aan de praat.
Inline Entity Forms?
Eerdere pogingen strandden uiteindelijk op de afwezigheid van een release van de Inline Entity Form-module. De stand van zaken lijkt sinds november 2015 niet veel veranderd te zijn:
- https://www.drupal.org/project/inline_entity_form - Er is nu een alpha-3-versie (25 dec. 2015)
- De IEF-Drupal 8-prerelease-projectpagina is hier, maar is niet bijgewerkt sinds november, geloof ik
- De roadmap voor IEF 8.x-1.0 komt me verdacht statisch over, en vooraal de term Unassigned belooft weinig goed.
Casus 10 jan. 2016 - Gelukt
- Op 10 januari kreeg ik via Drush de installatie zonder schokkende foutmeldingen aan de praat. Helemaal soepeltjes ging het welliswar niet, maar wel een stuk beter
- Admin-toolbar lukte niet.
Casus 19 jan. 2016
Testinstallatie vanuit script:
- Captcha-module doet moeilijk
- Admin toolbar functioneert
Zie ook Drupal 8 - Overstappen? » Half januari 2016 (2)
Storing composer drupal_update
Zelfde storing als begin deze maand:
[RuntimeException] The .git directory is missing from /var/www/dc8.dvb/vendor/jcalderonzumba/gastonjs, see https://getcomposer.org/commit-deps for more information
Bizar dat zo'n storing terugkomt. Maar er lijkt een oplossing te zijn [2]:
rm -rf vendor/jcalderonzumba composer drupal-update
Let op: Je moet in de root van de betreffende Drupal-installatie zijn.
Feb. 2017
Zie ook
Bronnen
- https://www.drupal.org/node/2608270 - Foutmelding: Invalid placeholder: !default FormattableMarkup.php:240
- https://github.com/commerceguys/commerce - Inclusief de installatie-handleiding die ik heb gebruikt tijdens de tweede sessie op 17 november 2015.
- https://github.com/commerceguys/intl
- https://github.com/commerceguys/pricing
- https://github.com/commerceguys/addressing
- https://github.com/commerceguys/tax
- https://events.drupal.org/losangeles2015/sessions/decoupling-drupal-modules-php-libraries-commerce-2x-primer
- http://symfony.com/components
- https://drupalcommerce.org/blog/41828/commerce-2x-stories-currencies
- https://drupalcommerce.org/blog/15916/commerce-2x-stories-internationalization → Uitleg dat installatie libraries mbv. Composer gaat
- https://www.drupal.org/node/1992030 - Protecting against HTTP HOST Header attacks (prevent your site from thinking it is someone else)
Support requests
- https://drupal.stackexchange.com/ - using the drupal-commerce tag
- https://drupalcommerce.org/questions
Drupal Commerce Non-Kickstart-documentatie
- https://www.drupal.org/resource-guides/building-ecommerce - Resource Guide: Building an eCommerce Website → Goed startpunt!
- https://www.drupal.org/node/1007414 - Community Documentation - Drupal Commerce
Products & Product Displays
- https://www.youtube.com/watch?v=Wp0fsHV5vMI - Toronto Website Developer - Drupal Commerce Module Tutorial 1: Setting up Product Types, Products and Product Displays → Goed!
.git-composer-probleem
- https://www.drupal.org/node/2632916 - module doesnt find libraries → Uitleg onder #19 heeft geholpen op 19 jan. 2016
- https://www.drupal.org/node/2405811 - Composer Manager for Drupal 8