drupal https://www.alexmoreno.net/ en Why decoupling Drupal https://www.alexmoreno.net/why-decoupling-drupal <article role="article" about="https://www.alexmoreno.net/why-decoupling-drupal" class="node node--type-blog node--promoted node--view-mode-teaser"> <header> <div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="https://www.alexmoreno.net/alejandro-moreno" lang="" about="https://www.alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 3 September, 2018 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="https://www.alexmoreno.net/why-decoupling-drupal" rel="bookmark"><span>Why decoupling Drupal</span> </a> </h2> </div> </header> <div class="node__content text-content"> <div class="text-content field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Amongst other things, I hear this quite a lot on my conversations around the subject, why <strong>decoupling Drupal</strong>, is not like you are giving away what <strong>Drupal is and overkilling</strong> with something you could do with other tools? What's the point?</p></div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--tag-ref"> <ul class="links field__items field--tag-ref__items"> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/category/categorias/drupal" hreflang="es">drupal</a></li> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/taxonomy/term/117" hreflang="es">decoupled</a></li> </ul> </div> </div> </article> Mon, 03 Sep 2018 14:22:00 +0000 alexmoreno 122 at https://www.alexmoreno.net Executing memcached in Travis https://www.alexmoreno.net/executing-memcached-travis <article role="article" about="https://www.alexmoreno.net/executing-memcached-travis" class="node node--type-blog node--promoted node--view-mode-teaser"> <header> <div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="https://www.alexmoreno.net/alejandro-moreno" lang="" about="https://www.alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 3 September, 2018 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="https://www.alexmoreno.net/executing-memcached-travis" rel="bookmark"><span>Executing memcached in Travis</span> </a> </h2> </div> </header> <div class="node__content text-content"> <div class="text-content field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>So, I heard you need Drupal and memcached running in Travis, right? But you have this "little" issue that Travis/Drupal cannot connect to memcached, something like:</p></div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--tag-ref"> <ul class="links field__items field--tag-ref__items"> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/category/categorias/drupal" hreflang="es">drupal</a></li> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/taxonomy/term/115" hreflang="es">travis</a></li> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/taxonomy/term/116" hreflang="es">memcached</a></li> </ul> </div> </div> </article> Mon, 03 Sep 2018 14:07:50 +0000 alexmoreno 121 at https://www.alexmoreno.net Parse error: syntax error, unexpected ':', expecting ';' or '{' in vendor/doctrine /annotations/lib/ Doctrine/ Common /Annotations/ AnnotationRegistry. php on line 50 https://www.alexmoreno.net/parse-error-syntax-error-unexpected-expecting-or <article role="article" about="https://www.alexmoreno.net/parse-error-syntax-error-unexpected-expecting-or" class="node node--type-blog node--promoted node--view-mode-teaser"> <header> <div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="https://www.alexmoreno.net/alejandro-moreno" lang="" about="https://www.alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 30 May, 2018 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="https://www.alexmoreno.net/parse-error-syntax-error-unexpected-expecting-or" rel="bookmark"><span>Parse error: syntax error, unexpected ':', expecting ';' or '{' in vendor/doctrine /annotations/lib/ Doctrine/ Common /Annotations/ AnnotationRegistry. php on line 50</span> </a> </h2> </div> </header> <div class="node__content text-content"> <div class="text-content field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Easy error to fix, once you know what's going on (is not always the case?).</p> <p>Just upgrade your system from php 5 to php7. Drupal8 requirement.</p> <p>In BLT, just edit your box/config.yml and change this line</p> <pre> php_version: "5.6"</pre> <p>to this:</p> <pre> php_version: "7.2"</pre> <p>Good old vagrant provision should do the rest of the trick. You are welcome :-)</p></div> <div class="field field--name-field-imagenes field--type-image field--label-hidden field__items"> <div class="field__item"> <img src="https://www.alexmoreno.net/sites/default/files/php7-drupal8-error.png" width="1748" height="788" alt="unexpected error" typeof="foaf:Image" /> </div> </div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--tag-ref"> <ul class="links field__items field--tag-ref__items"> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/taxonomy/term/113" hreflang="es">blt</a></li> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/category/categorias/drupal" hreflang="es">drupal</a></li> </ul> </div> </div> </article> Wed, 30 May 2018 08:04:41 +0000 alexmoreno 118 at https://www.alexmoreno.net Ansistrano, deploying Drupal with Ansible https://www.alexmoreno.net/ansistrano-deploying-drupal-ansible <article role="article" about="https://www.alexmoreno.net/ansistrano-deploying-drupal-ansible" class="node node--type-blog node--promoted node--view-mode-teaser"> <header> <div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="https://www.alexmoreno.net/alejandro-moreno" lang="" about="https://www.alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 4 April, 2016 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="https://www.alexmoreno.net/ansistrano-deploying-drupal-ansible" rel="bookmark"><span>Ansistrano, deploying Drupal with Ansible</span> </a> </h2> </div> </header> <div class="node__content text-content"> <div class="text-content field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Last months have been pretty busy here at BBC Worldwide with some of the projects we've been involved in.</p> <p>In my case, one of the main areas I’ve been trying to improve (apart of the daily busy routine) is our <strong>devops / CI approach</strong>. The previous approach was using Chef, but it was not really adopted by the developers (which meant that after some months, the system was broken) and we were lacking some fundamental things (like integration with the production system, a real CI flow, etc…).</p></div> <div class="field field--name-field-imagenes field--type-image field--label-hidden field__items"> <div class="field__item"> <img src="https://www.alexmoreno.net/sites/default/files/ansistrano-flow.png" width="660" height="426" alt="" typeof="foaf:Image" /> </div> </div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--tag-ref"> <ul class="links field__items field--tag-ref__items"> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/categorias/ansible" hreflang="es">ansible</a></li> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/categorias/deployment-tools" hreflang="es">deployment tools</a></li> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/category/categorias/drupal" hreflang="es">drupal</a></li> </ul> </div> </div> </article> Mon, 04 Apr 2016 18:07:50 +0000 alexmoreno 114 at https://www.alexmoreno.net Profiling PHP and Drupal with XDebug (In OSX) https://www.alexmoreno.net/profiling-php-and-drupal-xdebug-osx <article role="article" about="https://www.alexmoreno.net/profiling-php-and-drupal-xdebug-osx" class="node node--type-blog node--promoted node--view-mode-teaser"> <header> <div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="https://www.alexmoreno.net/alejandro-moreno" lang="" about="https://www.alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 12 June, 2014 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="https://www.alexmoreno.net/profiling-php-and-drupal-xdebug-osx" rel="bookmark"><span>Profiling PHP and Drupal with XDebug (In OSX)</span> </a> </h2> </div> </header> <div class="node__content text-content"> </div> </article> Thu, 12 Jun 2014 08:56:33 +0000 alexmoreno 107 at https://www.alexmoreno.net Using Symfony Dependency Injection in Drupal 7: Software Engineering in Drupal https://www.alexmoreno.net/using-symfony-dependency-injection-drupal-7-software-engineering-drupal <article role="article" about="https://www.alexmoreno.net/using-symfony-dependency-injection-drupal-7-software-engineering-drupal" class="node node--type-blog node--promoted node--view-mode-teaser"> <header> <div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="https://www.alexmoreno.net/alejandro-moreno" lang="" about="https://www.alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 20 April, 2014 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="https://www.alexmoreno.net/using-symfony-dependency-injection-drupal-7-software-engineering-drupal" rel="bookmark"><span>Using Symfony Dependency Injection in Drupal 7: Software Engineering in Drupal</span> </a> </h2> </div> </header> <div class="node__content text-content"> </div> </article> Sun, 20 Apr 2014 11:42:24 +0000 alexmoreno 104 at https://www.alexmoreno.net Changing Short project name in a Drupal.org project https://www.alexmoreno.net/changing-short-project-name-drupalorg-project/24-09-2013 <article role="article" about="https://www.alexmoreno.net/changing-short-project-name-drupalorg-project/24-09-2013" class="node node--type-blog node--promoted node--view-mode-teaser"> <header> <div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="https://www.alexmoreno.net/alejandro-moreno" lang="" about="https://www.alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 24 September, 2013 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="https://www.alexmoreno.net/changing-short-project-name-drupalorg-project/24-09-2013" rel="bookmark"><span>Changing Short project name in a Drupal.org project</span> </a> </h2> </div> </header> <div class="node__content text-content"> <div class="text-content field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Typical problem, you have just gained your full project permissions role in Drupal.org, and you make your first mess... you have promoted your so loved first project without changing the Short project name.</p><p>Well, you have a problem, but not too big. Drupal.org will not allow you to rename your Short project name, so you will have to create a new one if you don't want to have an ugly url like that: https://drupal.org/project/2062343</p><p>Fortunately git can help. You will simply have to:</p></div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--tag-ref"> <ul class="links field__items field--tag-ref__items"> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/category/categorias/drupal" hreflang="es">drupal</a></li> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/drupal-module-development" hreflang="es">drupal module development</a></li> </ul> </div> </div> </article> Tue, 24 Sep 2013 15:24:12 +0000 alexmoreno 101 at https://www.alexmoreno.net Drupal form api select elements returning integers instead of string https://www.alexmoreno.net/drupal-form-api-select-elements-returning-integers-instead-string/03-07-2013 <article role="article" about="https://www.alexmoreno.net/drupal-form-api-select-elements-returning-integers-instead-string/03-07-2013" class="node node--type-blog node--promoted node--view-mode-teaser"> <header> <div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="https://www.alexmoreno.net/alejandro-moreno" lang="" about="https://www.alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 3 July, 2013 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="https://www.alexmoreno.net/drupal-form-api-select-elements-returning-integers-instead-string/03-07-2013" rel="bookmark"><span>Drupal form api select elements returning integers instead of string</span> </a> </h2> </div> </header> <div class="node__content text-content"> <div class="text-content field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>I always have the same problem when using select forms, and I always forget the solution.</p><p>Instead of returning an array, like: return $competitions; you have to return a drupal_map_assoc, like this: return drupal_map_assoc($competitions);</p><p>Otherwise, when selecting the form in hook_submit you will get a number, instead of a human readable string.</p> [gist:5920064]</div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--tag-ref"> <ul class="links field__items field--tag-ref__items"> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/category/categorias/drupal" hreflang="es">drupal</a></li> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/formapi" hreflang="es">formapi</a></li> </ul> </div> </div> </article> Wed, 03 Jul 2013 16:23:40 +0000 alexmoreno 100 at https://www.alexmoreno.net Customize a webform with https://www.alexmoreno.net/customize-webform/14-06-2013 <article role="article" about="https://www.alexmoreno.net/customize-webform/14-06-2013" class="node node--type-blog node--promoted node--view-mode-teaser"> <header> <div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="https://www.alexmoreno.net/alejandro-moreno" lang="" about="https://www.alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 14 June, 2013 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="https://www.alexmoreno.net/customize-webform/14-06-2013" rel="bookmark"><span>Customize a webform with </span> </a> </h2> </div> </header> <div class="node__content text-content"> <div class="text-content field field--name-body field--type-text-with-summary field--label-hidden field__item"></div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--tag-ref"> <ul class="links field__items field--tag-ref__items"> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/category/categorias/drupal" hreflang="es">drupal</a></li> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/webform" hreflang="es">webform</a></li> </ul> </div> </div> </article> Fri, 14 Jun 2013 14:47:16 +0000 alexmoreno 99 at https://www.alexmoreno.net Convert dates from UNIXTIME in mysql https://www.alexmoreno.net/convert-dates-unixtime-mysql/03-05-2013 <article role="article" about="https://www.alexmoreno.net/convert-dates-unixtime-mysql/03-05-2013" class="node node--type-blog node--promoted node--view-mode-teaser"> <header> <div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="https://www.alexmoreno.net/alejandro-moreno" lang="" about="https://www.alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 3 May, 2013 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="https://www.alexmoreno.net/convert-dates-unixtime-mysql/03-05-2013" rel="bookmark"><span>Convert dates from UNIXTIME in mysql</span> </a> </h2> </div> </header> <div class="node__content text-content"> <div class="text-content field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Reading a date in mysql can be frustrating, unless your brain is able to convert Dates from UNIXTIME formats. Let's see for example this scenario in Drupal:</p><p>SELECT * FROM `node` ORDER BY `node`.`created` DESC LIMIT 0 , 30</p><p>If you need to fetch, for example, when it was the last time that a node was created, this format doesn't help too much.</p><p>The solution is quite simple, FROM_UNIXTIME( field_with_date )</p><p>For example:</p><p>SELECT * , FROM_UNIXTIME( created ) FROM `node` ORDER BY `node`.`created` DESC LIMIT 0 , 30</p></div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--tag-ref"> <ul class="links field__items field--tag-ref__items"> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/category/categorias/mysql" hreflang="es">mysql</a></li> <li class="field--tag-ref__item"><a href="https://www.alexmoreno.net/category/categorias/drupal" hreflang="es">drupal</a></li> </ul> </div> </div> </article> Fri, 03 May 2013 09:46:16 +0000 alexmoreno 98 at https://www.alexmoreno.net