Posts

Showing posts from 2021

Regex Lib

 https://regexlib.com/Search.aspx?k=password&AspxAutoDetectCookieSupport=1

Git cherry pick

git checkout <branch_where_you_want_new_commits> git fetch origin <branch_from_which_you_want_commits> git cherry-pick <commit-hash> Note: You can get the commit hashes from "git log" on the source branch

Regex to humar readable

 http://xenon.stanford.edu/~xusch/regexp/ 

http exception Drupal8

  HttpExceptionSubscriberBase - Drupal 8 - W3cubDocs

Local development environment

Image
 https://www.midcamp.org/sites/default/files/2018-03/Local%20Dev%20Environments%20for%20Dummies%20-%20MidCamp%202018.pdf Xdebug intergration: https://www.youtube.com/watch?v=SPgeXMSBQSM&t=2547s Run => Edit configurations Run => Web Server Debug Validation If breakpoints are not working then use  xdebug_break() Enable debugging session as follows Run the browser url View the debugger tab in phpstorm MAMP/Drupal: ngnix config file location:  C:\Users\Public\Documents\Appsolute\MAMPPRO\conf Avoid 404 issue in non index.php pages After installing MAMP PRO and Drupal give  $uri $uri/ /index.php?$args in try_files section in MAMP PRO. This will solve 404 error in non index.php pages. Curl issue: If there are curl certificate issue then add this line in php.ini in according to your path. curl.cainfo = "C:/html/certificates/cacert.pem" Ofcourse download cacert.pem from https://curl.se/docs/caextract.html Command line PHP same as web php 1. copy C:\Users\Public...

Commerce Drupal

 Checkout flow => Order types => Order item types => Production variation type => Product type Except Checkout flow eveything can be cloned.

D8 snippets

Search Drupal all source code http://grep.xnddx.ru/  Programmtically load a views block         use Drupal\block\ Entity ;         $block = \Drupal\block\Entity\Block::load('views_block__who_s_online_who_s_online_block');         $block_content = \Drupal::entityManager()           ->getViewBuilder('block')           ->view($block); Make sure the block is loaded via block management in the region via UI and keep it disabled. https://drupal.stackexchange.com/questions/171686/how-can-i-programmatically-display-a-block  Useful twig functions wrapper https://www.drupal.org/project/twig_tweak Machine name of the block Click "Configure" on the specific block in block management page and you can get the machine name of the block. Example: views_block__e_books_home_e_books_home_block  To get the list of all blocks > bin/drush ev "print_r(array_keys(\Drupal::servi...