Dan Peckardt sent creds:
Username: DNawrot@circlek.com || TOSCO\DNawrotPassword: Hello@DN0826
Importing string translations during drupal installation
First of all you have to have your language exported to files. Next thing is to set the path where translations are stored. This can be done at: admin/config/media/file-systemRight after that go to: admin/config/regional/translate/settings and set "Source translations" to "Only local files". Then export this config and install drupal. There are several ways to import translation during installtion, but none of these worked for me. There always has been an issue with it. I found somewhere in install.core.inc file that default location of translation files is /files/translations but it didn't work for some reason. Placing translations in profile dir also didn't work. The only one setting that worked was to set up the path in file system. I suppose this might be involved with install from config. This needs to be part of config to make it work. Drupal treats "install from config" process as it has everything you need, so if this path is not set it's not gonna work. I also tried to override this path with:
$config['locale.settings']['translation']['path'] = $app_root . '/sites/default/files/translations';
but it also didn't work.
Manufaktura
Manufaktura was enabled on Lando due to issue with MySQL8 which is not supported by Drupal 7. It's in "Prv/manufaktura".
Screen recording - Windows
Go to IE and check favorites. There's a link to https://www.apowersoft.com/free-online-screen-recorder?__c=1 just start recording. In the panel that appears on the microphone icon set system sound and microphone and also make it full screen, then REC.Siec Avengers
szukaj w firmie wifi Avengershasło SpicyHotdog podobno
Split configuration
Config specific to country / env should be placed at site repository, eg. config/pl_dev.If you provide any changes to settings.php regarding config split make sure you clear your cache to make it work.
Config split also comes with its config file eg.: config_split.config_split.pl_dev.yml
This file should also be part of general config stored in profile, that's the only one site specific setting that resides in profile config.
To export split config make sure it's active (settings.php has a info that enables it and cache is cleared). Once it's done:
drush config-split:export (This will update both config and pl_dev).
While installing profile from current config split configuration is also applied by default.
Profile install
Command:lando drush si ck --account-pass=admin
or
lando drush si --account-pass=admin (if distriburion is set in profile yml file).
Drupal 8 from 8.6 version allows to install profile with exported configuration. To do this you need to:
in settings.php specify the path to your config dir. Of course config files needs to exist in order to import it on profile install. So let's assume we're gonna keep our config files in profile directory, as it's part of the installation process:
$config_directories['sync'] = $app_root . '/profiles/custom/ck/config/sync';
The next thing is to edit core.extension.yml file. As we assume that config was exported from different installation profile (eg. standard), (and the profile name is part of that file) we need to tweak it, so it contains our new name of profile. There are two places where we need to tweak it, in module list - the last item with weight 1000 and profile name in profile section, something like this:
module:
.
.
.
dblog: 0
menu_link_content: 1
views: 10
ck: 1000
theme:
stable: 0
classy: 0
seven: 0
profile: ck
_core:
default_config_hash: R4IF-ClDHXxblLcG0L7MgsLvfBIMAvi_skumNFQwkDc
Once we have these two things done we can install drupal with custom profile.
That kind of installation cannot have hook_install function implemented. This hook is triggered before config import so all the changes would be overriden (or not :). However there are features which can be provided in hook_install and adds functionalities that config files does not allow. Anyway, there is a way to provide something similar which is: hook_install_tasks, the implementation can be found here and it works as I tried it with logger:
https://www.drupal.org/project/drupal/issues/2982052#comment-13044759
Another issue regarding to this documentation (https://www.drupal.org/node/2897299) is that there are two ways of providing config dir. In my case I had to provide a $config_directories in settings.php in order to profile trigger config and import it during installation.
In general installing a drupal from exported configuration is a feature that existed as a separate module/profile thing: https://www.drupal.org/project/config_installer
But as it was part of installation process drupal guys decided to make it part of drupal core.
Last thing to note is the uuid value. This is the value of drupal website after installation. It turns out there's no way to import config files to a site B from site A if UUID is different. This value is generated during drupal installation, unless we deliver this value. The value is storred in system.site.yml config file. So, this file has to be part of config we use during drupal profile install process.
Far beyond, another thing is importing part of config. This might be useful to make local changes (per country). To import part of config we can do it with drush like so:
drush config-import --partial --source=config/pl
Works similar to features-revert. Here is nice video explanation: https://www.youtube.com/watch?time_continue=2&v=x2kYZhgUSU0
drush config-import --partial --source=config/pl
Works similar to features-revert. Here is nice video explanation: https://www.youtube.com/watch?time_continue=2&v=x2kYZhgUSU0
Part config is managed by config_split module. Watch this part: https://youtu.be/x2kYZhgUSU0?t=683
or
take a look at this: https://www.drupal.org/docs/8/modules/configuration-split/creating-a-simple-split-configuration-dev-modules-only-in-dev
or look at notes in this document, a section above.
CircleK.com, business-centre-europe.circlek.com
Initial investigation:Custom modules are mixed with contrib modules, no profile, no standards provided. List of custom modules:
- ajax_catcher
- circlek_cannonical
Theme:
circlek
Store locator is using mapboxgl plugin. Endpoint is set to "/stores_new.php" whatever this is. There's no such file in root dir or anywhere in the code.
Bricks
Basic module (bricks) provides a bricks field only.
Bricks Inline provides a (manage form display) to change type of referencing to use inline forms. However inline form comes from inline_entity_form module.
Solros - system rezerwacji samochodow na .se napisany jako plugin do Oracle web cos tam.
Pawel Haran bedzie odpowiedzialny za nowy branding Ingo.
dawna@statoilfuelretail.com
dawid.nawrot@circlekeurope.com
Dominika Trafiał - zajmuje się koordynacją prac utrzymaniowych systemow juz na produkcji
Ubuntu:
user: dnawrot
pwd: same as mac
Installed witout any issues with these instructions: https://docs.microsoft.com/pl-pl/windows/wsl/install-win10
Available at: http://localhost:6688/
Ports config at: /etc/apache2/ports.conf
General config at: /etc/apache2/apache2.conf
Commands: sudo service apache2 reload / start / stop / status
CircleK.com - projekt realizowany przez firme, ktorej developerzy pochodza z Ostrawy. W tej chwili czesc skomplikowanych blokow jest zaprojektowana przez developerow i wrzucona bezposrednio w wysiwyg jako html. Jakakolwiek zmiana wprowadzona przez osoby od tresci konczy sie rozsypaniem elementu.
Projekt europejski - obejmuje 13 krajów i ma byc stworzony na podstawie circlek.com. CircleK.com ma byc wylacznie referencja, ale nie kopia. Calego drupala konfigurujemy od zera, ale moze byc wykorzystana skorka. Osoba odpowiedzialna (pm) jest Robert O ze szwecji, a w pozniejszym czasie ma zostac product ownerem. Będzie od poczatku hostowany na aws.
Ingo - projekt dotyczacy tanich stacji bezobslugowych w Szwecji. Ma to byc white label dla projektu europejskiego podstawowego. Czyli generalnie ladujemy dodatkowy css po wszystkich nadpisujacy glowny theme. Z reszta, w tej chwili strona https://www.ingo.se/ jest dokladnie tak zrobiona, czyli struktura jest identyczna jak https://www.circlek.se/sv_SE roznica polega jedynie na kolorach i brandingu. Za ten projekt tez odpowiada Robert O. To jest czesc projektu europejskiego.
innerCircle - global intranet - stworzone przez firme Opin z Kanady. Hostowane na acquia.com, ale w pozniejszym czasie ma byc przeniesione do aws. Przy instalacji / byl problem z konfiguracja mysql, dane nie mogly byc zaimportowane. Nalezalo zmienic wartosc w ustawieniu innodb_log_file_size z 32MB na 128MB. Plik konfiguracyjny dla mysql dostarczonego z DevDesktop (Acquia) mozna znalezc w Program Files (x86)/DevDesktop/mysql/my.cnf
WiFi:
ck-visitor
FreshFood123
Local setup
Run drush in drupal /web dir: ../vendor/drush/drush/drush cr
PHP local location: c:\php-7.2.18
php.ini location: c:\php-7.2.18\php.ini
OpCache is part of Windons PHP distribution, but it's not listed in php.ini. This extension is recommended by d8, so in order to load it we need to add:
zend_extension=php_opcache.dll
at the end of extensions and set it to 1 down where each plugin is configured:
opcache.enable=1
Apache location: c:\Apache24
Executive apache: c:\Apache24\bin
Config: c:\Apache24\conf\httpd.conf
Apache is running as a windows service and it's been added to PATH, so:
running it up (by default it's auto enabled): httpd -k start
stopping it: httpd -k stop
restart: httpd -k restart
To make clean urls working I had to change:
AllowOverride none
to
AllowOverride All
but make sure you're doing it in the right place, becasue there are several occurences of this setting. So, in my case it was:
DocumentRoot "${SRVROOT}/htdocs"
AllowOverride All
MySQL is running as a service and it's been added to PATH:
mysql -u root -p
Restart service:
Win + R: services.msc
MySQL80 refresh
Config file: C:\ProgramData\MySQL\MySQL Server 8.0\my.ini
MySQL 8 however comes with default_authentication_plugin setting set to caching_sh2_password value, which does not allow PHP to connet to mysql client. In order to make it usable we need to change it to: mysql_native_password value. After that we need to create new user and grant permissions and new database, like so:
CREATE USER 'admin'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpass';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
CREATE DATABASE 'db_name';
Default username used for sites is: admin, password is admin.
UPDATE 20.11.2019
Another instance of MySQL has been installed. It's 5.7 and it's running independently next to version 8. It's been installed with community installer. With this msi file you can install as many MySQL instances as you want, the only thing you need to change is the port the mysql service is running. So, currently there are two instances of mySQL running locally as a service, on is MySQL80 and second one is MySQL57. MySQL80 is running on 3306 port and MySQL57 is running on 3308 port. Access to 57 version is root and password is root. You can run console tool by executing: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MySQL\MySQL Server 5.7\MySQL 5.7 Command Line Client shortcut. Log in to db by providing root password. There should be drupal8 db. I installed drupal8 (provided by apache) in this DB. So, currently if you want you can switch DB's by adjusting settings.php in C:\Apache24\htdocs\d8\web\sites\default\settings.php. Here are the settings to connect to MySQL80:
$databases['default']['default'] = array (
'database' => 'drupal',
'username' => 'admin',
'password' => 'admin',
'prefix' => '',
'host' => 'localhost',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);
Here are the credentials to connect to MySQL57:
$databases['default']['default'] = array (
'database' => 'drupal8',
'username' => 'root',
'password' => 'root',
'prefix' => '',
'host' => 'localhost',
'port' => '3308',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);
AWS docker containers
docker run -p 8181:80 --env MYSQL_DATABASE=docker_test1 --env MYSQL_USER=admin --env MYSQL_PASSWORD=admin --env MYSQL_HOSTNAME=192.168.1.74 --env MYSQL_PORT=3308 --env WORKING_ENVIRONMENT=test --env SITE_CODE=pl --env HASH_SALT=5TerGYk6Po7NtPGBzYYMHJ8MjgOP7GeJLNEgHPn-CZgXuSYMUBYaNgesNsr48zEYDKC7Hhke4w cksites:test12