Drupal https://michalak.world/ en Drupal 9 Patch htaccess with Composer https://michalak.world/article/drupal-9-patch-htaccess-composer <span property="schema:name">Drupal 9 Patch htaccess with Composer</span> <span rel="schema:author"><span lang="" about="/u/1" typeof="schema:Person" property="schema:name" datatype="">useradmin</span></span> <span property="schema:dateCreated" content="2023-09-21T17:28:07+00:00">Thu, 09/21/2023 - 12:28</span> <div class="primary-image field field--name-field-image field--type-image field--label-above"> <div class="field__label">Image</div> <div class="field__item"> <img loading="lazy" src="/sites/default/files/default_images/cover.png" width="2010" height="1343" alt="Default blog post image" title="Default blog post image" typeof="foaf:Image" /> </div> </div> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-above"> <div class="field__label">Body</div> <div property="schema:text" class="field__item"><p>In composer.json add to the scripts section. See below:</p> <pre> "scripts": { "pre-install-cmd": [],   ... "post-drupal-scaffold-cmd": [ "patch -p1 &lt; patches/my-htaccess.patch" ] }, </pre> </div> </div> <section rel="schema:comment" data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comments</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=91&amp;2=comment&amp;3=comment" token="YwgHS-LCDb_Q9b7iBwPzs1DFMKlXOZP2gM97Z2nh3X8"></drupal-render-placeholder> </div> </div> </section> <div class="field field--name-field-tags field--type-entity-reference field--label-above field--tags"> <h3 class="field__label field--tags__label">Tags</h3> <ul class="links field__items field--tags__items"> <li property="schema:about" resource="/tag/composer" class="field--tags__item"><div about="/tag/composer" typeof="schema:Thing"> <h2><a href="/tag/composer"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Composer</div> </a></h2> <span property="schema:name" content="Composer" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/configuration" class="field--tags__item"><div about="/tag/configuration" typeof="schema:Thing"> <h2><a href="/tag/configuration"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Configuration</div> </a></h2> <span property="schema:name" content="Configuration" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal" class="field--tags__item"><div about="/tag/drupal" typeof="schema:Thing"> <h2><a href="/tag/drupal"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal</div> </a></h2> <span property="schema:name" content="Drupal" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-8" class="field--tags__item"><div about="/tag/drupal-8" typeof="schema:Thing"> <h2><a href="/tag/drupal-8"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 8</div> </a></h2> <span property="schema:name" content="Drupal 8" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-9" class="field--tags__item"><div about="/tag/drupal-9" typeof="schema:Thing"> <h2><a href="/tag/drupal-9"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 9</div> </a></h2> <span property="schema:name" content="Drupal 9" class="hidden"></span> </div> </li> </ul> </div> Thu, 21 Sep 2023 17:28:07 +0000 useradmin 91 at https://michalak.world Update UUID in a Drupal Configuration https://michalak.world/article/update-uuid-drupal-configuration <span property="schema:name">Update UUID in a Drupal Configuration</span> <span rel="schema:author"><span lang="" about="/u/1" typeof="schema:Person" property="schema:name" datatype="">useradmin</span></span> <span property="schema:dateCreated" content="2023-08-03T13:21:14+00:00">Thu, 08/03/2023 - 08:21</span> <div class="primary-image field field--name-field-image field--type-image field--label-above"> <div class="field__label">Image</div> <div class="field__item"> <img loading="lazy" src="/sites/default/files/default_images/cover.png" width="2010" height="1343" alt="Default blog post image" title="Default blog post image" typeof="foaf:Image" /> </div> </div> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-above"> <div class="field__label">Body</div> <div property="schema:text" class="field__item"><p><strong>Update a UUID: </strong></p> <p><code>drush config-set "config.name" uuid "</code>a2afbb3b-d34f-42fd-bf0c-593a103aa6f4<code>"</code></p> <p><strong>Also how to generate an new UUID:</strong></p> <p><code>drush php-eval "echo \Drupal::service('uuid')-&gt;generate();"</code></p> <p><strong>Notes:</strong></p> <ul><li>Remember to back up your database first!</li> <li>Check your config:  <ul><li><code>drush config-get "config.name" uuid</code></li> </ul></li> </ul></div> </div> <section rel="schema:comment" data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comments</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=85&amp;2=comment&amp;3=comment" token="ufXfbn79uHOSWXxHGxLsZ5_R_iaIuBW6NTVHF2mTWsc"></drupal-render-placeholder> </div> </div> </section> <div class="field field--name-field-tags field--type-entity-reference field--label-above field--tags"> <h3 class="field__label field--tags__label">Tags</h3> <ul class="links field__items field--tags__items"> <li property="schema:about" resource="/tag/drupal" class="field--tags__item"><div about="/tag/drupal" typeof="schema:Thing"> <h2><a href="/tag/drupal"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal</div> </a></h2> <span property="schema:name" content="Drupal" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-10" class="field--tags__item"><div about="/tag/drupal-10" typeof="schema:Thing"> <h2><a href="/tag/drupal-10"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 10</div> </a></h2> <span property="schema:name" content="Drupal 10" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-8" class="field--tags__item"><div about="/tag/drupal-8" typeof="schema:Thing"> <h2><a href="/tag/drupal-8"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 8</div> </a></h2> <span property="schema:name" content="Drupal 8" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-9" class="field--tags__item"><div about="/tag/drupal-9" typeof="schema:Thing"> <h2><a href="/tag/drupal-9"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 9</div> </a></h2> <span property="schema:name" content="Drupal 9" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drush" class="field--tags__item"><div about="/tag/drush" typeof="schema:Thing"> <h2><a href="/tag/drush"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drush</div> </a></h2> <span property="schema:name" content="Drush" class="hidden"></span> </div> </li> </ul> </div> Thu, 03 Aug 2023 13:21:14 +0000 useradmin 85 at https://michalak.world Drupal 8 - Sending Faxes with Twilio https://michalak.world/article/drupal-8-sending-faxes-twilio <span property="schema:name">Drupal 8 - Sending Faxes with Twilio</span> <span rel="schema:author"><span lang="" about="/u/1" typeof="schema:Person" property="schema:name" datatype="">useradmin</span></span> <span property="schema:dateCreated" content="2020-12-06T14:53:29+00:00">Sun, 12/06/2020 - 08:53</span> <div class="primary-image field field--name-field-image field--type-image field--label-above"> <div class="field__label">Image</div> <div class="field__item"> <img loading="lazy" src="/sites/default/files/default_images/cover.png" width="2010" height="1343" alt="Default blog post image" title="Default blog post image" typeof="foaf:Image" /> </div> </div> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-above"> <div class="field__label">Body</div> <div property="schema:text" class="field__item"><p><br /> Yep, you read the title correctly and it says “fax.”  Faxes are still used more than I thought, and it is really cool that Twilio has an API to send and receive faxes that is quite easy to use.</p> <p>Today in this post I will be talking about sending faxes from your Drupal website.  Which is quite easy and doesn’t take much code to achieve.</p> <p>I have pulled together a code example from the Twilio API documents and as you can see below there isn’t much there.</p> <p><code>use Twilio\Rest\Client; </code></p> <p><code>$twilio = new Client($sid, $token);<br /> $to = “+1234567890”;<br /> $from = “+0987654321”;<br /> $document = “https://example.com/document.pdf”;<br /><br /> $response = twilio-&gt;fax-&gt;v1-&gt;faxes-&gt;create($to, $document,["from" =&gt; $from]); </code></p> <p>A couple of notes on the Twilio fax API:</p> <ul><li>There isn’t much of a response back which can make error handling or logging a little difficult.</li> <li>The document being faxed must be a PDF.</li> </ul><p><br /> Resources:</p> <ul><li>Twilio: <a href="https://www.twilio.com/fax">https://www.twilio.com/fax</a></li> </ul></div> </div> <section rel="schema:comment" data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comments</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=83&amp;2=comment&amp;3=comment" token="LI5W_Ja-CIpAVq29BYN0CHhRaUFC8TFuAew8fUEGPNY"></drupal-render-placeholder> </div> </div> </section> <div class="field field--name-field-tags field--type-entity-reference field--label-above field--tags"> <h3 class="field__label field--tags__label">Tags</h3> <ul class="links field__items field--tags__items"> <li property="schema:about" resource="/tag/api" class="field--tags__item"><div about="/tag/api" typeof="schema:Thing"> <h2><a href="/tag/api"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">API</div> </a></h2> <span property="schema:name" content="API" class="hidden"></span> <div property="schema:description" class="text-content clearfix field field--name-description field--type-text-long field--label-hidden field__item"><p>API</p></div> </div> </li> <li property="schema:about" resource="/tag/drupal" class="field--tags__item"><div about="/tag/drupal" typeof="schema:Thing"> <h2><a href="/tag/drupal"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal</div> </a></h2> <span property="schema:name" content="Drupal" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-7" class="field--tags__item"><div about="/tag/drupal-7" typeof="schema:Thing"> <h2><a href="/tag/drupal-7"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 7</div> </a></h2> <span property="schema:name" content="Drupal 7" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-8" class="field--tags__item"><div about="/tag/drupal-8" typeof="schema:Thing"> <h2><a href="/tag/drupal-8"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 8</div> </a></h2> <span property="schema:name" content="Drupal 8" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-development" class="field--tags__item"><div about="/tag/drupal-development" typeof="schema:Thing"> <h2><a href="/tag/drupal-development"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Development</div> </a></h2> <span property="schema:name" content="Drupal Development" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/integration" class="field--tags__item"><div about="/tag/integration" typeof="schema:Thing"> <h2><a href="/tag/integration"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Integration</div> </a></h2> <span property="schema:name" content="Integration" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/rest-api" class="field--tags__item"><div about="/tag/rest-api" typeof="schema:Thing"> <h2><a href="/tag/rest-api"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">REST API</div> </a></h2> <span property="schema:name" content="REST API" class="hidden"></span> </div> </li> </ul> </div> Sun, 06 Dec 2020 14:53:29 +0000 useradmin 83 at https://michalak.world iPhone Screen Sizes and Media Queries https://michalak.world/article/iphone-screen-sizes-and-media-queries <span property="schema:name">iPhone Screen Sizes and Media Queries </span> <span rel="schema:author"><span lang="" about="/u/1" typeof="schema:Person" property="schema:name" datatype="">useradmin</span></span> <span property="schema:dateCreated" content="2019-08-29T12:08:33+00:00">Thu, 08/29/2019 - 07:08</span> <div class="primary-image field field--name-field-image field--type-image field--label-above"> <div class="field__label">Image</div> <div class="field__item"> <img property="schema:image" loading="lazy" src="/sites/default/files/2019-08/iphone.jpg" width="5585" height="3729" alt="iphone" title="iPhone" typeof="foaf:Image" /> </div> </div> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-above"> <div class="field__label">Body</div> <div property="schema:text" class="field__item"><p>When styling mobile-friendly pages I have run into issues between the different iPhone X versions.  Also included: iPhone 7 and 8.</p> <h2><strong>iPhone XR</strong></h2> <pre> /* 1792x828px at 326ppi */ @media only screen and (device-width : 414px) and (device-height : 896px) and (-webkit-device-pixel-ratio : 2) { } </pre> <h2><strong>iPhone X</strong></h2> <pre> /* 2436x1125px at 458ppi */ @media only screen and (device-width : 375px) and (device-height : 812px) and (-webkit-device-pixel-ratio : 3) { }</pre> <h2><strong>iPhone Xs</strong></h2> <pre> /* 2688x1242px at 458ppi */ @media only screen and (device-width : 414px) and (device-height : 896px) and (-webkit-device-pixel-ratio : 3) { } </pre> <h2><strong>iPhone 7+/8+</strong></h2> <pre> /* iphone 6+, 6s+, 7+, 8+ */ @media only screen and (min-device-width: 414px) and (max-device-height: 736px) and (-webkit-device-pixel-ratio: 3) { } </pre> <h2><strong>iPhone 7/8</strong></h2> <pre> /* iphone 6, 6s, 7, 8 */ @media only screen and (min-device-width: 375px) and (max-device-height: 667px) and (-webkit-device-pixel-ratio: 2) { } </pre> <h2><strong>Resources:</strong></h2> <ul><li><a href="https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/Displays/Displays.html">Apple</a> - Developer Archive</li> <li><a href="https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/adaptivity-and-layout">Apple Developer iOS Interface Guidelines</a></li> <li><a href="https://stackoverflow.com/questions/52321212/iphone-xr-xs-xs-max-css-media-queries">Stack Overflow: iPhone XR / XS / XS Max CSS media queries</a></li> <li><a href="https://stackoverflow.com/questions/46313640/iphone-x-8-8-plus-css-media-queries#46313641">Stack Overflow: All iPhones</a></li> <li><a href="https://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions">Ultimate Guide to iPhone Resolutions</a></li> </ul><p> </p> </div> </div> <section rel="schema:comment" data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comments</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=78&amp;2=comment&amp;3=comment" token="gqdxo0DEdyaM5ZCiBBKz75MOrJGBO3oR7mBgIKBWJtY"></drupal-render-placeholder> </div> </div> </section> <div class="field field--name-field-tags field--type-entity-reference field--label-above field--tags"> <h3 class="field__label field--tags__label">Tags</h3> <ul class="links field__items field--tags__items"> <li property="schema:about" resource="/tag/drupal" class="field--tags__item"><div about="/tag/drupal" typeof="schema:Thing"> <h2><a href="/tag/drupal"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal</div> </a></h2> <span property="schema:name" content="Drupal" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-7" class="field--tags__item"><div about="/tag/drupal-7" typeof="schema:Thing"> <h2><a href="/tag/drupal-7"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 7</div> </a></h2> <span property="schema:name" content="Drupal 7" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-8" class="field--tags__item"><div about="/tag/drupal-8" typeof="schema:Thing"> <h2><a href="/tag/drupal-8"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 8</div> </a></h2> <span property="schema:name" content="Drupal 8" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-development" class="field--tags__item"><div about="/tag/drupal-development" typeof="schema:Thing"> <h2><a href="/tag/drupal-development"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Development</div> </a></h2> <span property="schema:name" content="Drupal Development" class="hidden"></span> </div> </li> </ul> </div> Thu, 29 Aug 2019 12:08:33 +0000 useradmin 78 at https://michalak.world PDF Generation in Drupal https://michalak.world/article/pdf-generation-drupal <span property="schema:name">PDF Generation in Drupal</span> <span rel="schema:author"><span lang="" about="/u/1" typeof="schema:Person" property="schema:name" datatype="">useradmin</span></span> <span property="schema:dateCreated" content="2019-08-21T19:52:30+00:00">Wed, 08/21/2019 - 14:52</span> <div class="primary-image field field--name-field-image field--type-image field--label-above"> <div class="field__label">Image</div> <div class="field__item"> <img property="schema:image" loading="lazy" src="/sites/default/files/2019-08/pdf-generate_0.jpg" width="3888" height="2592" alt="pdf generation" title="PDF Generate" typeof="foaf:Image" /> </div> </div> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-above"> <div class="field__label">Body</div> <div property="schema:text" class="field__item"><p>It is nice when a user can click a button and generate a PDF. Over the last few months, I have added PDF generation to many projects. Examples of PDF generation include order invoices, sell sheets, webform submission results, and general node to PDF generation. </p> <p>When tasked at generating PDFs, I have been applying the <a href="https://github.com/dompdf/dompdf">dompdf</a><a href="https://github.com/dompdf/dompdf"> library</a>. The dompdf library implements the most versatility by using HTML and CSS to generate PDFs.  Therefore, giving the most flexibility for custom theming.  </p> <h2><strong>Example 1</strong></h2> <p>The most recent PDF generation task I completed was for Drupal commerce order invoices.  I leveraged twig templates to provide as much flexibility as possible, which allowed me to incorporate a special entity view mode and for additional block regions.  The new entity view display allows website admins to add, remove or rearrange order fields, and the additional block regions allowed for adding additional blocks throughout the template.  The flexibility of the Drupal interface not only provides a way for website admins to generate order invoices but also allows them to modify the layouts of the PDF invoice.</p> <h2><strong>Example 2</strong></h2> <p>In a past Drupal 8 commerce project, I have also automated the process to generate picket tickets upon orders reaching a specific state in the commerce order workflow. </p> <p>The dompdf library has been enjoyable and straightforward to use and I intend to use this library for future PDF generation projects.</p></div> </div> <section rel="schema:comment" data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comments</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=77&amp;2=comment&amp;3=comment" token="Qzb37j7VqLlKUKgiGSHsGIdM5xh3GhwoL_4P668Docs"></drupal-render-placeholder> </div> </div> </section> <div class="field field--name-field-tags field--type-entity-reference field--label-above field--tags"> <h3 class="field__label field--tags__label">Tags</h3> <ul class="links field__items field--tags__items"> <li property="schema:about" resource="/tag/drupal" class="field--tags__item"><div about="/tag/drupal" typeof="schema:Thing"> <h2><a href="/tag/drupal"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal</div> </a></h2> <span property="schema:name" content="Drupal" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-7" class="field--tags__item"><div about="/tag/drupal-7" typeof="schema:Thing"> <h2><a href="/tag/drupal-7"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 7</div> </a></h2> <span property="schema:name" content="Drupal 7" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-8" class="field--tags__item"><div about="/tag/drupal-8" typeof="schema:Thing"> <h2><a href="/tag/drupal-8"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 8</div> </a></h2> <span property="schema:name" content="Drupal 8" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-commerce" class="field--tags__item"><div about="/tag/drupal-commerce" typeof="schema:Thing"> <h2><a href="/tag/drupal-commerce"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Commerce</div> </a></h2> <span property="schema:name" content="Drupal Commerce" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-development" class="field--tags__item"><div about="/tag/drupal-development" typeof="schema:Thing"> <h2><a href="/tag/drupal-development"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Development</div> </a></h2> <span property="schema:name" content="Drupal Development" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-performance" class="field--tags__item"><div about="/tag/drupal-performance" typeof="schema:Thing"> <h2><a href="/tag/drupal-performance"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Performance</div> </a></h2> <span property="schema:name" content="Drupal Performance" class="hidden"></span> </div> </li> </ul> </div> Wed, 21 Aug 2019 19:52:30 +0000 useradmin 77 at https://michalak.world Pantheon - Cloning a Project https://michalak.world/article/pantheon-cloning-project <span property="schema:name">Pantheon - Cloning a Project</span> <span rel="schema:author"><span lang="" about="/u/1" typeof="schema:Person" property="schema:name" datatype="">useradmin</span></span> <span property="schema:dateCreated" content="2019-08-07T17:54:57+00:00">Wed, 08/07/2019 - 12:54</span> <div class="primary-image field field--name-field-image field--type-image field--label-above"> <div class="field__label">Image</div> <div class="field__item"> <img loading="lazy" src="/sites/default/files/default_images/cover.png" width="2010" height="1343" alt="Default blog post image" title="Default blog post image" typeof="foaf:Image" /> </div> </div> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-above"> <div class="field__label">Body</div> <div property="schema:text" class="field__item"><p>If you need to clone a project within the Pantheon ecosystem Terminus is a great tool to use.</p> <p>First, <a href="https://pantheon.io/docs/terminus/install">install Terminus</a> and then add the <a href="https://github.com/pantheon-systems/terminus-site-clone-plugin">site clone plugin</a>.</p> <p>After authenticating with terminus use the site:clone command</p> <pre> terminus site:clone &lt;source&gt;.&lt;env&gt; &lt;destination&gt;.&lt;env&gt;</pre> <p>&lt;source&gt; and &lt;destination&gt; are either the site names or the site UUIDs.  &lt;env&gt; is the environment, e.g. dev, test, prod or multi dev.</p> <p><strong>Resources</strong></p> <ul><li>I<a href="https://pantheon.io/docs/terminus/install">nstall Terminus</a></li> <li><a href="https://github.com/pantheon-systems/terminus-site-clone-plugin">Terminus's Site Clone Plugin</a></li> <li><a href="https://pantheon.io/docs/terminus">Terminus Documentation</a></li> <li><a href="https://pantheon.io/docs/migrate">Pantheon Migration Documentation</a></li> </ul><p> </p> </div> </div> <section rel="schema:comment" data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comments</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=76&amp;2=comment&amp;3=comment" token="sJ_UIyQ90zvYFCIevMbx_95Z7pdNofcckWbJLUB-ZJY"></drupal-render-placeholder> </div> </div> </section> <div class="field field--name-field-tags field--type-entity-reference field--label-above field--tags"> <h3 class="field__label field--tags__label">Tags</h3> <ul class="links field__items field--tags__items"> <li property="schema:about" resource="/tag/api" class="field--tags__item"><div about="/tag/api" typeof="schema:Thing"> <h2><a href="/tag/api"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">API</div> </a></h2> <span property="schema:name" content="API" class="hidden"></span> <div property="schema:description" class="text-content clearfix field field--name-description field--type-text-long field--label-hidden field__item"><p>API</p></div> </div> </li> <li property="schema:about" resource="/tag/drupal" class="field--tags__item"><div about="/tag/drupal" typeof="schema:Thing"> <h2><a href="/tag/drupal"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal</div> </a></h2> <span property="schema:name" content="Drupal" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-7" class="field--tags__item"><div about="/tag/drupal-7" typeof="schema:Thing"> <h2><a href="/tag/drupal-7"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 7</div> </a></h2> <span property="schema:name" content="Drupal 7" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-8" class="field--tags__item"><div about="/tag/drupal-8" typeof="schema:Thing"> <h2><a href="/tag/drupal-8"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 8</div> </a></h2> <span property="schema:name" content="Drupal 8" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-commerce" class="field--tags__item"><div about="/tag/drupal-commerce" typeof="schema:Thing"> <h2><a href="/tag/drupal-commerce"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Commerce</div> </a></h2> <span property="schema:name" content="Drupal Commerce" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-development" class="field--tags__item"><div about="/tag/drupal-development" typeof="schema:Thing"> <h2><a href="/tag/drupal-development"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Development</div> </a></h2> <span property="schema:name" content="Drupal Development" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/update" class="field--tags__item"><div about="/tag/update" typeof="schema:Thing"> <h2><a href="/tag/update"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Update</div> </a></h2> <span property="schema:name" content="Update" class="hidden"></span> </div> </li> </ul> </div> Wed, 07 Aug 2019 17:54:57 +0000 useradmin 76 at https://michalak.world Compromised Drupal 7 Website Recovery Review https://michalak.world/article/compromised-drupal-7-website-recovery-review <span property="schema:name">Compromised Drupal 7 Website Recovery Review</span> <span rel="schema:author"><span lang="" about="/u/1" typeof="schema:Person" property="schema:name" datatype="">useradmin</span></span> <span property="schema:dateCreated" content="2019-07-31T11:06:12+00:00">Wed, 07/31/2019 - 06:06</span> <div class="primary-image field field--name-field-image field--type-image field--label-above"> <div class="field__label">Image</div> <div class="field__item"> <img property="schema:image" loading="lazy" src="/sites/default/files/2019-07/hacked.jpg" width="8000" height="4500" alt="ghost" title="hacked" typeof="foaf:Image" /> </div> </div> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-above"> <div class="field__label">Body</div> <div property="schema:text" class="field__item"><p>I was brought on board to help recover a website that was possibly exploited by hackers, a Drupal 7 project.  What triggered the investigation?  My client was informed that their customers were receiving spam emails from the website.</p> <p>After a thorough review of the project's code base and database. I found multiple exploits and backdoors.  All of the issues/exploits were within the Drupal core.  None of the contrib. or custom modules were exploited.  </p> <p>What was the cause? The website was compromised due to an outdated Drupal 7 core.  With routine updates, this would have not happened.  That is why it is important to keep up with website maintenance and security updates.</p></div> </div> <section rel="schema:comment" data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comments</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=75&amp;2=comment&amp;3=comment" token="N348bnV5IYcEoBzW9Gg6NCKW95PWcocUuhX4iLVyV3g"></drupal-render-placeholder> </div> </div> </section> <div class="field field--name-field-tags field--type-entity-reference field--label-above field--tags"> <h3 class="field__label field--tags__label">Tags</h3> <ul class="links field__items field--tags__items"> <li property="schema:about" resource="/tag/drupal" class="field--tags__item"><div about="/tag/drupal" typeof="schema:Thing"> <h2><a href="/tag/drupal"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal</div> </a></h2> <span property="schema:name" content="Drupal" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-7" class="field--tags__item"><div about="/tag/drupal-7" typeof="schema:Thing"> <h2><a href="/tag/drupal-7"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 7</div> </a></h2> <span property="schema:name" content="Drupal 7" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-development" class="field--tags__item"><div about="/tag/drupal-development" typeof="schema:Thing"> <h2><a href="/tag/drupal-development"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Development</div> </a></h2> <span property="schema:name" content="Drupal Development" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/security" class="field--tags__item"><div about="/tag/security" typeof="schema:Thing"> <h2><a href="/tag/security"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Security</div> </a></h2> <span property="schema:name" content="Security" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/update" class="field--tags__item"><div about="/tag/update" typeof="schema:Thing"> <h2><a href="/tag/update"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Update</div> </a></h2> <span property="schema:name" content="Update" class="hidden"></span> </div> </li> </ul> </div> Wed, 31 Jul 2019 11:06:12 +0000 useradmin 75 at https://michalak.world Drupal 8 - Longer Titles - Entity Title Length/Node Title Length https://michalak.world/article/drupal-8-longer-titles-entity-title-lengthnode-title-length <span property="schema:name">Drupal 8 - Longer Titles - Entity Title Length/Node Title Length</span> <span rel="schema:author"><span lang="" about="/u/1" typeof="schema:Person" property="schema:name" datatype="">useradmin</span></span> <span property="schema:dateCreated" content="2019-07-11T10:48:04+00:00">Thu, 07/11/2019 - 05:48</span> <div class="primary-image field field--name-field-image field--type-image field--label-above"> <div class="field__label">Image</div> <div class="field__item"> <img property="schema:image" loading="lazy" src="/sites/default/files/2019-07/Title_0.jpg" width="4928" height="3264" alt="Titles" title="Titles" typeof="foaf:Image" /> </div> </div> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-above"> <div class="field__label">Body</div> <div property="schema:text" class="field__item"><p>I created this post to have a quick overview of the two different Drupal 8 modules that extend the default node title length.  There are currently two modules: Node Title Length and Entity Title Length.  </p> <p>Both modules are easy to set up and both have a very minimal configuration.   I do recommend the Node Title Length module due to being in a stable and released state.</p> <h2><strong>Node Title Length [Recommended]</strong></h2> <ul><li> <p>Module: <a href="https://www.drupal.org/project/title_length">https://www.drupal.org/project/title_length</a></p> </li> <li> <p>Admin: No admin configuration, defaults to 8000 which can be updated before installing in the module code.</p> </li> <li> <p>Official Release: Yes</p> </li> </ul><p><strong>How to set up and configure: </strong></p> <ol><li> <p>Enable the module</p> </li> <li> <p>All set! Nothing else needed to do.</p> </li> </ol><h2><strong>Entity Title Length</strong></h2> <ul><li> <p>Module: <a href="https://www.drupal.org/project/entity_title_length">https://www.drupal.org/project/entity_title_length</a></p> </li> <li> <p>Admin Configuration: /admin/etl/config</p> </li> <li> <p>Official Release: No</p> </li> </ul><h3><strong>How to set up and configure:</strong></h3> <ol><li> <p>Enable the module</p> </li> <li> <p>Update the configuration in the admin section: /admin/etl/config</p> </li> <li> <p>Update the title on the form display configuration for that entity/node to the desired new length</p> </li> </ol></div> </div> <section rel="schema:comment" data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comments</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=72&amp;2=comment&amp;3=comment" token="_qlVZpTyMz0d7hHUCADXnSk-Q1OExZ3ckFxk0CC5wU8"></drupal-render-placeholder> </div> </div> </section> <div class="field field--name-field-tags field--type-entity-reference field--label-above field--tags"> <h3 class="field__label field--tags__label">Tags</h3> <ul class="links field__items field--tags__items"> <li property="schema:about" resource="/tag/drupal" class="field--tags__item"><div about="/tag/drupal" typeof="schema:Thing"> <h2><a href="/tag/drupal"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal</div> </a></h2> <span property="schema:name" content="Drupal" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-8" class="field--tags__item"><div about="/tag/drupal-8" typeof="schema:Thing"> <h2><a href="/tag/drupal-8"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 8</div> </a></h2> <span property="schema:name" content="Drupal 8" class="hidden"></span> </div> </li> </ul> </div> Thu, 11 Jul 2019 10:48:04 +0000 useradmin 72 at https://michalak.world Drupal 8 Commerce - Setting a Default Currency on Product Variations https://michalak.world/article/drupal-8-commerce-setting-default-currency-product-variations <span property="schema:name">Drupal 8 Commerce - Setting a Default Currency on Product Variations</span> <span rel="schema:author"><span lang="" about="/u/1" typeof="schema:Person" property="schema:name" datatype="">useradmin</span></span> <span property="schema:dateCreated" content="2019-05-08T11:13:50+00:00">Wed, 05/08/2019 - 06:13</span> <div class="primary-image field field--name-field-image field--type-image field--label-above"> <div class="field__label">Image</div> <div class="field__item"> <img loading="lazy" src="/sites/default/files/default_images/cover.png" width="2010" height="1343" alt="Default blog post image" title="Default blog post image" typeof="foaf:Image" /> </div> </div> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-above"> <div class="field__label">Body</div> <div property="schema:text" class="field__item"><p>By default Drupal 8 commerce 2.x product variations do not have a default currency setting for multi-currency projects.  </p> <p>Currently, there is a patch in the works to solve this issue.  The patch can be found in the commerce issue queue: <a href="https://www.drupal.org/project/commerce/issues/3016777">https://www.drupal.org/project/commerce/issues/3016777</a></p> <p>Thank you a.dmitriiev for creating a patch to solve this issue!</p></div> </div> <section rel="schema:comment" data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comments</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=71&amp;2=comment&amp;3=comment" token="G5ShwSxymiQjhwboVPPPD3c_EjNM6JxcEGuGL63s568"></drupal-render-placeholder> </div> </div> </section> <div class="field field--name-field-tags field--type-entity-reference field--label-above field--tags"> <h3 class="field__label field--tags__label">Tags</h3> <ul class="links field__items field--tags__items"> <li property="schema:about" resource="/tag/drupal" class="field--tags__item"><div about="/tag/drupal" typeof="schema:Thing"> <h2><a href="/tag/drupal"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal</div> </a></h2> <span property="schema:name" content="Drupal" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-8" class="field--tags__item"><div about="/tag/drupal-8" typeof="schema:Thing"> <h2><a href="/tag/drupal-8"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 8</div> </a></h2> <span property="schema:name" content="Drupal 8" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-commerce" class="field--tags__item"><div about="/tag/drupal-commerce" typeof="schema:Thing"> <h2><a href="/tag/drupal-commerce"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Commerce</div> </a></h2> <span property="schema:name" content="Drupal Commerce" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-development" class="field--tags__item"><div about="/tag/drupal-development" typeof="schema:Thing"> <h2><a href="/tag/drupal-development"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Development</div> </a></h2> <span property="schema:name" content="Drupal Development" class="hidden"></span> </div> </li> </ul> </div> Wed, 08 May 2019 11:13:50 +0000 useradmin 71 at https://michalak.world Drupal: Pantheon Cookies https://michalak.world/article/drupal-pantheon-cookies <span property="schema:name">Drupal: Pantheon Cookies</span> <span rel="schema:author"><span lang="" about="/u/1" typeof="schema:Person" property="schema:name" datatype="">useradmin</span></span> <span property="schema:dateCreated" content="2019-05-03T13:11:38+00:00">Fri, 05/03/2019 - 08:11</span> <div class="primary-image field field--name-field-image field--type-image field--label-above"> <div class="field__label">Image</div> <div class="field__item"> <img loading="lazy" src="/sites/default/files/default_images/cover.png" width="2010" height="1343" alt="Default blog post image" title="Default blog post image" typeof="foaf:Image" /> </div> </div> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-above"> <div class="field__label">Body</div> <div property="schema:text" class="field__item"><p>I've been using the commerce_currency_resolver module and it has been fantastic to use.   One issue I ran into was with how the cookies are handled on Pantheon.</p> <p>When using custom cookies a special naming convention must be used.  The cookie's name must start with <em><code>STYXKEY.</code></em></p> <p>Per Pantheon: </p> <blockquote> <p>Respond to a request with cached content depending on the presence and value of a particular cookie. It's important to note that in order for the response to be cached by Pantheon's edge, the cookie name must match <code>STYXKEY[a-zA-Z0-9_-]+</code>.</p> </blockquote> <p>Pantheon Documentation: <a href="https://pantheon.io/docs/cookies/">https://pantheon.io/docs/cookies/</a></p></div> </div> <section rel="schema:comment" data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comments</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=70&amp;2=comment&amp;3=comment" token="lVr2me8sBkS-nqUIwncjF3mVjqLfFPdES9CWk_dZWLs"></drupal-render-placeholder> </div> </div> </section> <div class="field field--name-field-tags field--type-entity-reference field--label-above field--tags"> <h3 class="field__label field--tags__label">Tags</h3> <ul class="links field__items field--tags__items"> <li property="schema:about" resource="/tag/drupal" class="field--tags__item"><div about="/tag/drupal" typeof="schema:Thing"> <h2><a href="/tag/drupal"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal</div> </a></h2> <span property="schema:name" content="Drupal" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-7" class="field--tags__item"><div about="/tag/drupal-7" typeof="schema:Thing"> <h2><a href="/tag/drupal-7"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 7</div> </a></h2> <span property="schema:name" content="Drupal 7" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-8" class="field--tags__item"><div about="/tag/drupal-8" typeof="schema:Thing"> <h2><a href="/tag/drupal-8"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 8</div> </a></h2> <span property="schema:name" content="Drupal 8" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-commerce" class="field--tags__item"><div about="/tag/drupal-commerce" typeof="schema:Thing"> <h2><a href="/tag/drupal-commerce"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Commerce</div> </a></h2> <span property="schema:name" content="Drupal Commerce" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-development" class="field--tags__item"><div about="/tag/drupal-development" typeof="schema:Thing"> <h2><a href="/tag/drupal-development"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Development</div> </a></h2> <span property="schema:name" content="Drupal Development" class="hidden"></span> </div> </li> <li property="schema:about" resource="/tag/drupal-performance" class="field--tags__item"><div about="/tag/drupal-performance" typeof="schema:Thing"> <h2><a href="/tag/drupal-performance"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Performance</div> </a></h2> <span property="schema:name" content="Drupal Performance" class="hidden"></span> </div> </li> </ul> </div> Fri, 03 May 2019 13:11:38 +0000 useradmin 70 at https://michalak.world