drupal planet https://www.millwoodonline.co.uk/taxonomy/term/1 en Drupal composer paranoia plugin https://www.millwoodonline.co.uk/blog/drupal-composer-paranoia-plugin <span property="schema:name">Drupal composer paranoia plugin</span> <div property="schema:text" class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Over the past few months one of my colleagues, Jean Ribeiro (<a href="https://www.drupal.org/u/jribeiro">jribeiro</a>), has been working in conjunction with Florian Weber (<a href="https://www.drupal.org/u/webflo">webflo</a>) from drupal-composer, on a composer plugin for added Drupal site security.</p> <p>The <a href="https://github.com/drupal-composer/drupal-paranoia">Drupal Paranoia</a> plugin works with two directories, <code>web</code> and <code>app</code>, although these can be renamed within you composer config to whatever works for you. The app directory is where all non-user facing code lives, this includes PHP, yaml, twig etc from core, contrib, and custom modules.The web directory then contains symlinks all user facing code, such as CSS, JS, and other files. It also contains stub PHP files for some items within the app directory.</p> <p>Within the plugin the public files directory is assumed to contain only user facing files, so it is symlinked. The codebase is then scanned for what are considered asset files. These are a fixed list of file extensions, which are expected to be used for module themeing and themes themselves, such as css, js, png, gif, etc. There is also a set list of "front controller" files, these are PHP files that do need to be user facing. The list includes <code>index.php</code>, <code>core/install.php</code>, <code>core/rebuild.php</code>, and <code>core/modules/statistics/statistics.php</code>. These files are then added via a stub PHP file, which calls the require function to pull them in.</p> <p>This plugin allows you to point your web server to the web directory without exposing any non-public files to users, giving an extra layer of security. There are no known specific security issues this will mitigate, however if there were any contrib or custom code with executable PHP code, this will update the codebase to make sure it's not remotely executable. For example in 2016 there was an<a href="https://www.drupal.org/forum/newsletters/security-advisories-for-contributed-projects/2016-07-13/coder-highly-critical"> issue found with coder module</a> were one of the executable PHP files opened a security hole. If anything like that were to happen again, you would be protected by using the <a href="https://github.com/drupal-composer/drupal-paranoia">Drupal Parnoia</a> plugin.</p> <p> </p> <p><em>Thanks to <a href="https://www.drupal.org/u/jribeiro">Jean Ribeiro</a> and <a href="https://www.drupal.org/u/badjava">Chad DeGoot</a> for helping write and review this blog post.</em></p> </div> <span rel="schema:author"><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span></span> <span property="schema:dateCreated" content="2018-06-07T09:04:15+00:00">Thu, 07/06/2018 - 10:04</span> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">Tags</div> <div class="field--items"> <div class="field--item"><a href="/taxonomy/term/1" property="schema:about" hreflang="en">drupal planet</a></div> <div class="field--item"><a href="/taxonomy/term/2" property="schema:about" hreflang="en">drupal-planet</a></div> <div class="field--item"><a href="/taxonomy/term/14" property="schema:about" hreflang="en">composer</a></div> <div class="field--item"><a href="/taxonomy/term/34" property="schema:about" hreflang="en">plugin</a></div> <div class="field--item"><a href="/taxonomy/term/3" property="schema:about" hreflang="en">drupal</a></div> <div class="field--item"><a href="/taxonomy/term/5" property="schema:about" hreflang="en">drupal 8</a></div> <div class="field--item"><a href="/taxonomy/term/4" property="schema:about" hreflang="en">drupal8</a></div> </div> </div> <section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=49&amp;2=field_comment&amp;3=basic" token="eWWFfpdRX5FnI0fGfO_R6OLe0OCSRyfdUksf_JiQ4zc"></drupal-render-placeholder> </section> Thu, 07 Jun 2018 09:04:15 +0000 timmillwood 49 at https://www.millwoodonline.co.uk Workspace upgrade path https://www.millwoodonline.co.uk/blog/workspace-upgrade-path <article role="article" about="/index.php/blog/workspace-upgrade-path" typeof="schema:Article" class="article is-promoted full clearfix"> <span property="schema:name" content="Workspace upgrade path" class="hidden"></span> <span property="schema:interactionCount" content="UserComments:3" class="hidden"></span> <footer> <article typeof="schema:Person" about="/user/1"> </article> <div class="author"> Submitted by <span rel="schema:author"><span lang="" about="/index.php/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span></span> on <span property="schema:dateCreated" content="2018-06-07T09:03:44+00:00">Thu, 07/06/2018 - 10:03</span> <span property="schema:dateCreated" content="2018-06-07T09:03:44+00:00" class="hidden"></span> </div> </footer> <div class="content"> <div property="schema:text" class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>We've taken some time recently to discuss how we're going to handle the upgrade from the Workspace contrib module to the Workspace core module, once it's released. In our setup we have around 20 sites, each with 4 (or more) environments, all with Workspace installed, syncing content between each environments (and sometimes between each site). Therefore this is a task we are taking very seriously and want to make sure we have a super stable approach which will result in no loss of production content.</p> <p>The obvious idea is that we provide some kind of update hook that converts all of the workspaces to the new core module, along with all of their content. However, the new Workspace module is quite different in the way that it stores and handled entities, therefore this will be a lot of work. We don't have a lot of time to do a lot of work because we have to port Multiversion and Relaxed modules over to handle all the features that are not going into core. We also have "day job" work to do helping to build and support these 20+ sites.</p> <p>The idea we are looking to implement is a lot more simple. Uninstall the contrib Workspace module, and install the core Workspace module.</p> <p>Uninstalling the Workspace module (and all dependencies) will delete all workspaces, and all content in them. Therefore what you will be left with, effectively, is the live workspace and all live content. Installing the new module will recreate a live (and stage) workspace, and all content will be associated with the live workspace. There will be some kind of check available to see if all content has been synced up to the live workspace to prevent real data loss, but we see workspaces as <span>disposable anyway.</span></p> <p><span>Another option we are looking into is being able to replicate content off to another Drupal site (or CouchDB database), then do the uninstall / reinstall process, and sync content back. This will work well because the HTTP API used will be the same on both versions of Relaxed module. However, because of the number of moving parts here we feel the straight uninstall / reinstall process, dropping all non-live content, might actually provide better stability.</span></p> <p><span>This process will be fully documented in release notes and on Drupal.org when the time comes.</span></p> <p><span>It'd be great to hear any feedback from users of the contrib Workspace module if this approach would work.</span></p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">Tags</div> <div class="field--items"> <div class="field--item"><a href="/index.php/taxonomy/term/1" property="schema:about" hreflang="en">drupal planet</a></div> <div class="field--item"><a href="/index.php/taxonomy/term/2" property="schema:about" hreflang="en">drupal-planet</a></div> <div class="field--item"><a href="/index.php/taxonomy/term/3" property="schema:about" hreflang="en">drupal</a></div> <div class="field--item"><a href="/index.php/taxonomy/term/4" property="schema:about" hreflang="en">drupal8</a></div> <div class="field--item"><a href="/index.php/taxonomy/term/5" property="schema:about" hreflang="en">drupal 8</a></div> <div class="field--item"><a href="/index.php/taxonomy/term/8" property="schema:about" hreflang="en">drupal core</a></div> <div class="field--item"><a href="/index.php/taxonomy/term/33" property="schema:about" hreflang="en">workspace</a></div> </div> </div> <ul class="links inline list-inline"><li class="comment-add"><a href="/index.php/blog/workspace-upgrade-path#comment-form" title="Share your thoughts and opinions." hreflang="en">Add new comment</a></li></ul><section> <h2>Comment</h2> <a id="comment-1829"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1528806653"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Vijay(vijaycs85) (not verified)</span> on Sun, 10/06/2018 - 21:50</p> <a href="/index.php/comment/1829#comment-1829" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/index.php/comment/1829#comment-1829" class="permalink" rel="bookmark" hreflang="en">I have been thinking about…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>I have been thinking about this part especially after I installed contib workspace on 8.6.x core and got weird exception (which remains me to raise <a href="https://www.drupal.org/project/workspace/issues/2978699">this issue</a>)</p> <p>How does the install/unstall would react to module with same name? Is it still possible to use <code>\Drupal::service('module_installer')</code>?</p> <p>Uninstalling contrib workspace module means uninstalling replication and multiversion (dependecies) and probably installl again with core module?</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1829&amp;1=default&amp;2=en&amp;3=" token="QLCNpotWPyvpCcG_0Yq8X-ZGsriy5KhiEg9Wvt36Rpo"></drupal-render-placeholder> </div> </article> <div class="indented"><a id="comment-1830"></a> <article data-comment-user-id="1" class="js-comment"> <mark class="hidden" data-comment-timestamp="1528806728"></mark> <footer> <article typeof="schema:Person" about="/user/1"> </article> <p>Submitted by <span lang="" about="/index.php/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span> on Tue, 12/06/2018 - 13:32</p> <p class="visually-hidden">In reply to <a href="/index.php/comment/1829#comment-1829" class="permalink" rel="bookmark" hreflang="en">I have been thinking about…</a> by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Vijay(vijaycs85) (not verified)</span></p> <a href="/index.php/comment/1830#comment-1830" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/index.php/comment/1830#comment-1830" class="permalink" rel="bookmark" hreflang="en">You would need to uninstall …</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>You would need to uninstall (and remove Workspace contrib module) while still on 8.5.x, then upgrade to 8.6.x and enable the Workspace core module.</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1830&amp;1=default&amp;2=en&amp;3=" token="AgD7mSF2dFPyxNsaLi10WUpJtcpjL7XaQkhDzy7uBvk"></drupal-render-placeholder> </div> </article> <div class="indented"><a id="comment-1831"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1528987938"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Vijay (vijaycs85) (not verified)</span> on Tue, 12/06/2018 - 16:55</p> <p class="visually-hidden">In reply to <a href="/index.php/comment/1830#comment-1830" class="permalink" rel="bookmark" hreflang="en">You would need to uninstall …</a> by <span lang="" about="/index.php/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span></p> <a href="/index.php/comment/1831#comment-1831" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/index.php/comment/1831#comment-1831" class="permalink" rel="bookmark" hreflang="en">Got it, thanks!</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>Got it, thanks!</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1831&amp;1=default&amp;2=en&amp;3=" token="whjkeHXp4X1hIPzwpBhh_ED8exVI7cM6xkHKxbYUL8U"></drupal-render-placeholder> </div> </article> </div></div> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=48&amp;2=field_comment&amp;3=basic" token="JVQ1tkQLjuM4Ht-20VNde6I6huvTHt2eWlWRcskNZBE"></drupal-render-placeholder> </section> </div> </article> Thu, 07 Jun 2018 09:03:44 +0000 timmillwood 48 at https://www.millwoodonline.co.uk Drupal core Workspace module https://www.millwoodonline.co.uk/blog/drupal-core-workspace-module <span property="schema:name">Drupal core Workspace module</span> <div property="schema:text" class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>The Workspace entity was first seen in the contrib module Multiversion on 1st June 2014. Back then the entity type was called "Content repository", it was renamed to "Workspace" in September 2014.</p> <p>On 22nd Febuary 2016 the Workspace module was created, which built upon the Multiversion module.</p> <p>The Workflow Initiative was announced in Dries' keynote DrupalCon New Orleans.</p> <p>Today the Workspace module landed in Drupal core as a new experimental module. This module is very different from the contrib Workspace module. It has no dependencies and now actually has a lot in common with the Drupal 7 module <a href="https://www.drupal.org/project/cps">CPS</a>.</p> <p>Please give the module a try, join us in the <a href="https://www.drupal.org/project/issues/drupal?component=workspace.module">issue queue</a>, and help us get Workspace module beta ready for 8.6.0-alpha1 in just over 2 months time.</p> <p><img src="https://www.millwoodonline.co.uk/sites/default/files/2018-05/workspace.gif" alt="Workspace demo" /></p> </div> <span rel="schema:author"><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span></span> <span property="schema:dateCreated" content="2018-05-04T14:46:47+00:00">Fri, 04/05/2018 - 15:46</span> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">Tags</div> <div class="field--items"> <div class="field--item"><a href="/taxonomy/term/1" property="schema:about" hreflang="en">drupal planet</a></div> <div class="field--item"><a href="/taxonomy/term/2" property="schema:about" hreflang="en">drupal-planet</a></div> <div class="field--item"><a href="/taxonomy/term/3" property="schema:about" hreflang="en">drupal</a></div> <div class="field--item"><a href="/taxonomy/term/4" property="schema:about" hreflang="en">drupal8</a></div> <div class="field--item"><a href="/taxonomy/term/5" property="schema:about" hreflang="en">drupal 8</a></div> <div class="field--item"><a href="/taxonomy/term/8" property="schema:about" hreflang="en">drupal core</a></div> </div> </div> <ul class="links inline list-inline"><li class="comment-add"><a href="/blog/drupal-core-workspace-module#comment-form" title="Share your thoughts and opinions." hreflang="en">Add new comment</a></li></ul><section> <h2>Comment</h2> <a id="comment-1820"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1526158644"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Wim Leers (not verified)</span> on Thu, 10/05/2018 - 11:21</p> <a href="/comment/1820#comment-1820" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1820#comment-1820" class="permalink" rel="bookmark" hreflang="en">Congrats! :)</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>Congrats! :)</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1820&amp;1=default&amp;2=en&amp;3=" token="3VXxL-eQN7tOYxAoMEtQPinq1w_mF26oR1VgOja_aoI"></drupal-render-placeholder> </div> </article> <a id="comment-1822"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1526158644"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Paolo (not verified)</span> on Thu, 10/05/2018 - 12:16</p> <a href="/comment/1822#comment-1822" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1822#comment-1822" class="permalink" rel="bookmark" hreflang="en">It&#039;s amazing how you…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>It's amazing how you succeeded not to say a word about what this module is about... but hey, we know it's whole history!</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1822&amp;1=default&amp;2=en&amp;3=" token="avANjwuG1ZOCha6rDf8dikFaUn2SyFdmByUDXDMBS8Q"></drupal-render-placeholder> </div> </article> <a id="comment-1823"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1526158644"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Wilma Smith (not verified)</span> on Fri, 11/05/2018 - 14:40</p> <a href="/comment/1823#comment-1823" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1823#comment-1823" class="permalink" rel="bookmark" hreflang="en">Hello, I am not a developer…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>Hello,<br /> I am not a developer, but I am interested in possibly useful Drupal modules and functionality. Workspace sounds like something useful, but I can't really discern from your introduction what it does. Could you please include some information on what Workspace does and for what purpose it woudl be useful?</p> <p>Thanks in advance for your information.<br /> regards, Wilma</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1823&amp;1=default&amp;2=en&amp;3=" token="jDB5MU7ut7msvv4JjaoiP7rQFLsCATf6nYK06zrvZyU"></drupal-render-placeholder> </div> </article> <a id="comment-1826"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1528987938"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Paul Rijke (not verified)</span> on Fri, 25/05/2018 - 22:17</p> <a href="/comment/1826#comment-1826" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1826#comment-1826" class="permalink" rel="bookmark" hreflang="en">It is a great succes ti get…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>It is a great success to get this in core. Thank you guys!</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1826&amp;1=default&amp;2=en&amp;3=" token="achegIzLv492t6qCukfy5m9r6x2d7mnBT1IHP-8w56A"></drupal-render-placeholder> </div> </article> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=46&amp;2=field_comment&amp;3=basic" token="biCwSqlVFOcJI6yHNg7zcy9HppBxfp_MbZMhW_tA1CI"></drupal-render-placeholder> </section> Fri, 04 May 2018 14:46:47 +0000 timmillwood 46 at https://www.millwoodonline.co.uk Getting started with React and Drupal https://www.millwoodonline.co.uk/blog/getting-started-with-react-and-drupal <span property="schema:name">Getting started with React and Drupal</span> <div property="schema:text" class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Over the weekend I decided it was long overdue that I learnt React, or at least understood what all the fuss was about, so with npm in hand I installed yarn and started my quest.</p> <p>We're going to use <a href="https://github.com/facebook/create-react-app">Create React App</a> to setup our base React install. First install then run the command to create a react app called "drupal-react":<br /><code>npm install -g create-react-app<br /> create-react-app drupal-react<br /> cd drupal-react</code></p> <p>You can now run <code>npm start</code> (or <code>yarn start</code>) to start your app locally and open it in a browser. Here you'll see a React default page, this is all created from a React component called "App". If you take a look at the file src/App.js you will see the component and how the <code>render()</code> method returns the page HTML as <a href="https://reactjs.org/docs/introducing-jsx.html">JSX</a>. We need to replace to the code returned here to show some Drupal nodes, so how about replacing it with (or just adding) <code>&lt;NodeContainer /&gt;</code>. This will call a new component, so at the top of app.js we will also need to import that, so with the other import code add <code>import NodeContainer from './NodeContainer';</code>.</p> <p>Now to create the NodeContainer component. First we need to add the Axios library which we'll use to query the Drupal REST API, run <code>npm install axios --save</code>. Then create the file src/NodeContainer.js, and in there add the following code:<br /><code>import React, { Component } from 'react'<br /> import axios from 'axios'<br /><br /> class NodeContainer extends Component {<br />   constructor(props) {<br />     super(props)<br />     this.state = {<br />       nodes: []<br />     }<br />   }<br /><br />   componentDidMount() {<br />     axios.get('http://example.com/api/nodes')<br />     .then(response =&gt; {<br />       this.setState({nodes: response.data})<br />     })<br />     .catch(error =&gt; console.log(error))<br />   }<br /><br />   render() {<br />     return (<br />       &lt;ul&gt;<br />        {this.state.nodes.map((node) =&gt; {<br />           return(<br />            &lt;li={node.nid}&gt;{node.title}&lt;/li&gt;<br />           )<br />         })}<br />       &lt;/ul&gt;<br />     )<br />   }<br /><br /> }<br /><br /> export default NodeContainer</code></p> <p>At the top of the file React and Axios are both imported, the class for <code>NodeContainer</code> is then created. The constructor method is where we add the state <code>node</code>, <code>componentDidMount()</code> is called to get the nodes from the View /api/nodes, which then gets rendered as an unordered list.</p> <p>To create the /api/nodes view install the core Rest module. This will allow you to create a "REST Export" view. Here the path can be set to /api/nodes, and you can select nid, and title.</p> <p>As long as you left npm start running, you should be able to go back to your browser, and view a nice list of Drupal nodes being rendered in React.</p> <p>Next, routing, to make these node titles clickable! <span>😱</span></p> </div> <span rel="schema:author"><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span></span> <span property="schema:dateCreated" content="2018-04-23T06:20:09+00:00">Mon, 23/04/2018 - 07:20</span> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">Tags</div> <div class="field--items"> <div class="field--item"><a href="/taxonomy/term/1" property="schema:about" hreflang="en">drupal planet</a></div> <div class="field--item"><a href="/taxonomy/term/2" property="schema:about" hreflang="en">drupal-planet</a></div> <div class="field--item"><a href="/taxonomy/term/3" property="schema:about" hreflang="en">drupal</a></div> <div class="field--item"><a href="/taxonomy/term/4" property="schema:about" hreflang="en">drupal8</a></div> <div class="field--item"><a href="/taxonomy/term/5" property="schema:about" hreflang="en">drupal 8</a></div> <div class="field--item"><a href="/taxonomy/term/9" property="schema:about" hreflang="en">drupal development</a></div> <div class="field--item"><a href="/taxonomy/term/26" property="schema:about" hreflang="en">react</a></div> <div class="field--item"><a href="/taxonomy/term/27" property="schema:about" hreflang="en">reactjs</a></div> <div class="field--item"><a href="/taxonomy/term/28" property="schema:about" hreflang="en">javascript</a></div> </div> </div> <ul class="links inline list-inline"><li class="comment-add"><a href="/blog/getting-started-with-react-and-drupal#comment-form" title="Share your thoughts and opinions." hreflang="en">Add new comment</a></li></ul><section> <h2>Comment</h2> <a id="comment-1796"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1524559875"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">ygerasimov (not verified)</span> on Tue, 24/04/2018 - 02:05</p> <a href="/comment/1796#comment-1796" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1796#comment-1796" class="permalink" rel="bookmark" hreflang="en">Hey Tim, Thank you for…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>Hey Tim,</p> <p>Thank you for putting this together.</p> <p>Any recommendations about material to learn plain React? Preferably with PHP as backend. Like laracasts for vuejs.</p> <p>Yuriy</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1796&amp;1=default&amp;2=en&amp;3=" token="n0eg9BNprgPtH0wNsfaCJI1Ztl6BlVCXD2Y9whi9MNM"></drupal-render-placeholder> </div> </article> <div class="indented"><a id="comment-1797"></a> <article data-comment-user-id="1" class="js-comment"> <mark class="hidden" data-comment-timestamp="1524560027"></mark> <footer> <article typeof="schema:Person" about="/user/1"> </article> <p>Submitted by <span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span> on Tue, 24/04/2018 - 09:53</p> <p class="visually-hidden">In reply to <a href="/comment/1796#comment-1796" class="permalink" rel="bookmark" hreflang="en">Hey Tim, Thank you for…</a> by <span lang="" typeof="schema:Person" property="schema:name" datatype="">ygerasimov (not verified)</span></p> <a href="/comment/1797#comment-1797" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1797#comment-1797" class="permalink" rel="bookmark" hreflang="en">I started with React docs …</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>I started with React docs (<a href="https://reactjs.org/docs/hello-world.html">https://reactjs.org/docs/hello-world.html</a>), also looked Sitepoint (<a href="https://www.sitepoint.com/learn/react/">https://www.sitepoint.com/learn/react/</a>) and Lullabot (<a href="https://www.lullabot.com/articles/how-to-learn-react">https://www.lullabot.com/articles/how-to-learn-react</a>).</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1797&amp;1=default&amp;2=en&amp;3=" token="MEsgq6RKWiW72wASJ9-iH4dYoxsD5XRJ-5U_re3lfvU"></drupal-render-placeholder> </div> </article> </div><a id="comment-1798"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1524755103"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">dawehner (not verified)</span> on Tue, 24/04/2018 - 22:30</p> <a href="/comment/1798#comment-1798" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1798#comment-1798" class="permalink" rel="bookmark" hreflang="en">+1 for the official react…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>+1 for the official react docs. They got improved a lot over time.</p> <p>For more advanced tutorials I can recommend <a href="https://egghead.io/">https://egghead.io/</a> which is not fully free, but it is well done.</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1798&amp;1=default&amp;2=en&amp;3=" token="GA13uRswUHckkvN1kCaZQ8tYvUurkeBLPHxL9FSo2LE"></drupal-render-placeholder> </div> </article> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=44&amp;2=field_comment&amp;3=basic" token="6tdRzb_KucnJVgx1NkLq4i24_3-C-Lr841wCtq8uAhY"></drupal-render-placeholder> </section> Mon, 23 Apr 2018 06:20:09 +0000 timmillwood 44 at https://www.millwoodonline.co.uk Should Drupal's installer be tailored towards the Enterpise? https://www.millwoodonline.co.uk/blog/should-drupals-installer-be-tailored-towards-the-enterprise <span property="schema:name">Should Drupal&#039;s installer be tailored towards the Enterpise?</span> <div property="schema:text" class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>In <a href="https://www.youtube.com/watch?v=AjwnsjGGlv8&amp;feature=youtu.be&amp;t=1h31m44s">Dries' keynote at DrupalCon Nashville</a> 2018 he discussed a <a href="http://matthewgrasmick.com/compare-php-frameworks">blog post by Matthew Grasmick</a> where the "first impression" or installer experience of Drupal was compared with Wordpress, Symfony, and Laravel. A tweet by Jeff Eaton then got me thinking:</p> <blockquote> <p dir="ltr" lang="en" xml:lang="en">Kind of weird that the <a href="https://twitter.com/hashtag/driesnote?src=hash&amp;ref_src=twsrc%5Etfw">#driesnote</a> compares the install complexity of Drupal, Wordpress, Laravel, and Symfony. Why aren't AEM and Sitecore in there?</p> — Actually, (@eaton) <a href="https://twitter.com/eaton/status/983716399356043264?ref_src=twsrc%5Etfw">April 10, 2018</a></blockquote> <p>Drupal powers about 2% of the web, but when looking at top websites, either by NASDAQ, FTSE, or number of visitors, Drupal powers a much bigger percentage of sites. This shows that Drupal is an Enterprise platform. When an enterprise level client is evaluating Drupal they would have much difference "first impression" experience than for example a hobbyist or blogger. Enterprise users would not often use the inbuilt installer, they'd be looking at tools such as Drush or Composer to facilitate the installation for them via some kind of continuous integration platform. For example, in my day job we install an instance of Drupal most hours of the day, this is all handled by a python script running on iron.io.</p> <p>When tweeting about this blog post I had an interesting response from Kevin Oleary:</p> <blockquote> <p dir="ltr" lang="en" xml:lang="en">#2 is already true. The question should be “should Drupal go back to the simple install and extend model that produced it’s period of explosive growth”</p> — Kevin Oleary (@kolearyUX) <a href="https://twitter.com/kolearyUX/status/983857149154603008?ref_src=twsrc%5Etfw">April 10, 2018</a></blockquote> <p>This tweet made me readjust my thinking. Drupal was almost a ground up initiative. Drupal may not have had it's success without people like me running a blog on it, contributing to it, and fostering it within enterprise organisations. Kevin also completely derailed what the conclusion of this post was going to be. The post was going to conclude with thoughts and ideas about making things easier for enterprise clients. However, maybe the proposal in Dries' keynote to improve the installer experience will help grow Drupal from the ground up, yet again.</p> </div> <span rel="schema:author"><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span></span> <span property="schema:dateCreated" content="2018-04-11T10:47:42+00:00">Wed, 11/04/2018 - 11:47</span> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">Tags</div> <div class="field--items"> <div class="field--item"><a href="/taxonomy/term/1" property="schema:about" hreflang="en">drupal planet</a></div> <div class="field--item"><a href="/taxonomy/term/2" property="schema:about" hreflang="en">drupal-planet</a></div> <div class="field--item"><a href="/taxonomy/term/3" property="schema:about" hreflang="en">drupal</a></div> </div> </div> <ul class="links inline list-inline"><li class="comment-add"><a href="/blog/should-drupals-installer-be-tailored-towards-the-enterprise#comment-form" title="Share your thoughts and opinions." hreflang="en">Add new comment</a></li></ul><section> <h2>Comment</h2> <a id="comment-1721"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1523801412"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">@MrAlexar (not verified)</span> on Wed, 11/04/2018 - 15:59</p> <a href="/comment/1721#comment-1721" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1721#comment-1721" class="permalink" rel="bookmark" hreflang="en">what can help in my opinion:…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>what can help in my opinion:<br /> - re-design "installation profile" selection page to highlight that they exist!<br /> - providing more installation profiles to demonstrate the variety of ways Drupal can be set up. (e.g. blog, corporate, API, etc)<br /> - introducing the concept of "installation modules" that offer alternative ways of installing an "installation profile"<br /> - allowing "installation profiles" to inherit. (<a href="https://www.drupal.org/project/drupal/issues/1356276">https://www.drupal.org/project/drupal/issues/1356276</a>)<br /> - consistency with the installation via CLI. (Allow for not setting an admin username and password in UI when it is possible in the CLI)</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1721&amp;1=default&amp;2=en&amp;3=" token="zBoVITXtXc9byZ3gtGngXZQz8K4Zlu4blTJWva0DbSI"></drupal-render-placeholder> </div> </article> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=42&amp;2=field_comment&amp;3=basic" token="us7Psbg5QoLr4QVdM78ewgmKojfE3oN7VR8NsAg45U4"></drupal-render-placeholder> </section> Wed, 11 Apr 2018 10:47:42 +0000 timmillwood 42 at https://www.millwoodonline.co.uk Deprecation fails when testing Drupal 8 https://www.millwoodonline.co.uk/blog/deprecation-fails-when-testing-drupal-8 <span property="schema:name">Deprecation fails when testing Drupal 8</span> <div property="schema:text" class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>With each release of Drupal 8 more and more things are being deprecated, which is awesome. It shows innovation, forward thinking, and a thought for backwards compatibility. However throwing notices or warnings when deprecated code is used can cause tests to fail. We already counter this a little by adding <code>&lt;env name="SYMFONY_DEPRECATIONS_HELPER" value="weak_vendors"&gt;</code> to phpunit.xml.dist in core.</p> <p>To quote the <a href="https://symfony.com/doc/current/components/phpunit_bridge.html#making-tests-fail">Symfony documentation</a>:</p> <blockquote>By using the <code>weak_vendors</code> value, deprecations that are triggered outside the <code class="notranslate">vendors</code> directory will make the test suite fail, while deprecations triggered from a library inside it will not, giving you the best of both worlds.</blockquote> <p>This shows that deprecations within Drupal will still cause test fails, to combat that simply update the SYMFONY_DEPRECATIONS_HELPER setting to "weak" or "disabled", which would ignore the deprecations or disable the deprecation helper.</p> <p>However if you're testing with run-test.sh this will interfere with the settings in your phpunit.xml file and use always use weak_vendors unless you have the suppress-deprecations argument set. Therefore use <code>run-tests.sh --suppress-deprecations</code> and the SYMFONY_DEPRECATIONS_HELPER setting will be set to "disabled". See the <code>simpletest_script_run_one_test()</code> function in run-tests.sh for more context.</p> <p>Hopefully this helps, we found this really useful when testing Drupal modules with Travis, where we needed tests passing for Drupal 8.4 and 8.5.</p> </div> <span rel="schema:author"><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span></span> <span property="schema:dateCreated" content="2018-02-26T08:57:15+00:00">Mon, 26/02/2018 - 08:57</span> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">Tags</div> <div class="field--items"> <div class="field--item"><a href="/taxonomy/term/1" property="schema:about" hreflang="en">drupal planet</a></div> <div class="field--item"><a href="/taxonomy/term/2" property="schema:about" hreflang="en">drupal-planet</a></div> <div class="field--item"><a href="/taxonomy/term/3" property="schema:about" hreflang="en">drupal</a></div> <div class="field--item"><a href="/taxonomy/term/4" property="schema:about" hreflang="en">drupal8</a></div> <div class="field--item"><a href="/taxonomy/term/5" property="schema:about" hreflang="en">drupal 8</a></div> <div class="field--item"><a href="/taxonomy/term/24" property="schema:about" hreflang="en">testing</a></div> <div class="field--item"><a href="/taxonomy/term/25" property="schema:about" hreflang="en">drupal testing</a></div> </div> </div> <ul class="links inline list-inline"><li class="comment-add"><a href="/blog/deprecation-fails-when-testing-drupal-8#comment-form" title="Share your thoughts and opinions." hreflang="en">Add new comment</a></li></ul><section> <h2>Comment</h2> <a id="comment-1527"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1519906034"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Pasqualle (not verified)</span> on Tue, 27/02/2018 - 21:36</p> <a href="/comment/1527#comment-1527" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1527#comment-1527" class="permalink" rel="bookmark" hreflang="en">Why don&#039;t we just remove the…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>Why don't we just remove the use of deprecated code? It should have been done before every minor Drupal core release..</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1527&amp;1=default&amp;2=en&amp;3=" token="iGoVRnL-xQ7uFVdc1CekCbOtthrEupWd8ZYGEYN4lag"></drupal-render-placeholder> </div> </article> <div class="indented"><a id="comment-1531"></a> <article data-comment-user-id="1" class="js-comment"> <mark class="hidden" data-comment-timestamp="1519906094"></mark> <footer> <article typeof="schema:Person" about="/user/1"> </article> <p>Submitted by <span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span> on Thu, 01/03/2018 - 12:08</p> <p class="visually-hidden">In reply to <a href="/comment/1527#comment-1527" class="permalink" rel="bookmark" hreflang="en">Why don&#039;t we just remove the…</a> by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Pasqualle (not verified)</span></p> <a href="/comment/1531#comment-1531" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1531#comment-1531" class="permalink" rel="bookmark" hreflang="en">My use case for this was a…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>My use case for this was a contrib module where I needed to support both 8.4.x and 8.5.x versions of core. Therefore couldn't remove the use of deprecated code.</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1531&amp;1=default&amp;2=en&amp;3=" token="sYMvH-lyRy4sZadabWcwPoCv7TgNFavGMQYxh9dCEZo"></drupal-render-placeholder> </div> </article> </div> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=41&amp;2=field_comment&amp;3=basic" token="aiw6YOvX0o1rAYnyIUSX__C3tp7y4ma2mG0_IBE3icU"></drupal-render-placeholder> </section> Mon, 26 Feb 2018 08:57:15 +0000 timmillwood 41 at https://www.millwoodonline.co.uk 10 years of Drupal https://www.millwoodonline.co.uk/blog/10-years-of-drupal <span property="schema:name">10 years of Drupal</span> <div property="schema:text" class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>At 12:54pm on January 15th 2008 (based on the created time stamp of "<span><span>1200401651")</span></span> I signed up for my Drupal.org account while working for International Baccalaureate. Before my interview there I had never heard of Drupal, but managed to ace the interview and get the job, no idea why I didn't bother signing up for Drupal.org until after I started the job, but hey, that's just how it was. It was <a href="https://www.drupal.org/u/jamesfk">jamesfk</a> who introduced me to Drupal there and who I worked with building a bunch of community sites in Drupal 5, then 6. I got the chance to visit Toronto for training with Lullabot where I got to meet great people such as <a href="https://www.drupal.org/u/walkah">James Walker</a>, <a href="https://www.drupal.org/u/matt-westgate">Matt Westgate</a>, <a href="https://www.drupal.org/u/jjeff">Jeff Robbins</a>, <a href="https://www.drupal.org/u/add1sun">Addison Berry</a>, and fellow student <a href="https://www.drupal.org/u/dougvann">Doug Vann</a>. I also landed a trip to DrupalCon DC 2009, where I met even more great people and many people I now knew virtually from Drupal.org, IRC, and Twitter.</p> <p>Later in 2009 I started work with Mark Boulton who was already well into his work with the Drupal.org redesign, and starting work on the new admin theme for Drupal 7. It was awesome to be a part of these projects, as well as many Drupal projects which were coming in on the back of these. While working here I got to attend DrupalCamp UK, DrupalCon Paris, and DrupalCon Copenhagen.</p> <p>In 2011 I moved to a position at Acquia which saw me become the 4th Acquia employee in the UK, along with great Drupalists like <a href="https://www.drupal.org/u/hernani">Hernâni</a>, and the first support engineer based in Europe, shortly followed by <a href="https://www.drupal.org/u/anavarre">Aurelien</a>. Later that year I co-load organization of DrupalCon London (or Croydon) with <a href="https://www.drupal.org/u/jeff-veit">Jeff</a>. At Acquia I moved to help form the customer success team, assisting clients getting their Drupal sites up and running and launch successfully.</p> <p>After nearly 4 years I left Acquia to join Appnovation who were looking to setup a UK office in Wales (where I live). This also saw me start working with Pfizer on their Drupal 8 projects, initially I was contributing to a lot of the Composer related issues, then moved on to start the Workflow Initiative.</p> <p>Outside of "work" in this time I have contributed to many contrib modules, become the core maintainer for Statistics, Content Moderation, and Node modules, been a DrupalCon track chair three times, attended 9 DrupalCons, written Drupal articles for Net magazine and appeared on some Drupal podcasts. Outside of Drupal I have moved house twice, got married, and had two kids.</p> <p>It's been a fun time, here's to the next 10 years!</p> </div> <span rel="schema:author"><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span></span> <span property="schema:dateCreated" content="2018-01-10T13:28:28+00:00">Wed, 10/01/2018 - 13:28</span> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">Tags</div> <div class="field--items"> <div class="field--item"><a href="/taxonomy/term/1" property="schema:about" hreflang="en">drupal planet</a></div> <div class="field--item"><a href="/taxonomy/term/2" property="schema:about" hreflang="en">drupal-planet</a></div> <div class="field--item"><a href="/taxonomy/term/3" property="schema:about" hreflang="en">drupal</a></div> </div> </div> <ul class="links inline list-inline"><li class="comment-add"><a href="/blog/10-years-of-drupal#comment-form" title="Share your thoughts and opinions." hreflang="en">Add new comment</a></li></ul><section> <h2>Comment</h2> <a id="comment-1314"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1516227087"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">James Forbes Keir (not verified)</span> on Wed, 17/01/2018 - 11:06</p> <a href="/comment/1314#comment-1314" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1314#comment-1314" class="permalink" rel="bookmark" hreflang="en">Congratulations, Tim!…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>Congratulations, Tim!</p> <p>It was great to work with you all those years ago and to how good Drupal has been to you, and you have been to Drupal :)</p> <p>James</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1314&amp;1=default&amp;2=en&amp;3=" token="skl6xfq7w9RCI99WHQhQ7j0CPDj1SCo-6kU99L-teFs"></drupal-render-placeholder> </div> </article> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=40&amp;2=field_comment&amp;3=basic" token="V5lbx7z5MwBvjkTbKq1AL0bAxS9Rnij4yQ7aQh49xWI"></drupal-render-placeholder> </section> Wed, 10 Jan 2018 13:28:28 +0000 timmillwood 40 at https://www.millwoodonline.co.uk Drupal Service ID Collectors https://www.millwoodonline.co.uk/blog/drupal-service-id-collectors <span property="schema:name">Drupal Service ID Collectors</span> <div property="schema:text" class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Since Drupal 8 we've had services. This also brought the concept of a service collector or tagged services. This allows services to be tagged with a specific tag, then a service collector can collect all services with the a given tag and use whichever service "applies".</p> <p>As you could imagine loaded all of these tagged services when loading the service collector service can be a performance nightmare, which is why Drupal 8.4.0 brought us <a href="https://www.drupal.org/node/2598944">service ID collector functionality</a>.</p> <p>Tagging a service with the <code>service_id_collector</code> tag will pass all services with a given tag as the last parameter in the constructor. This will be an array of service IDs ordered by the priority. You will then need to use the <code>ClassResolver</code> service to lazily instantiate the collected service IDs.</p> <p><strong>my_module.services.yml</strong><br /><code>my_module.negotiator:<br />   class: \Drupal\my_module\MyModuleNegotiator<br />   arguments: {'@class.resolver'}<br />   tags:<br />     - { name: service_id_collector, tag: my_module_negotiator }<br /> my_module.negotiator.foo:<br />   class:\Drupal\my_module\FooNegotiator<br />   arguments: {'@entity_type.manager'}<br />   tags:<br />     - { name: my_module_negotiator, priority: 100 }<br /> my_module.negotiator.bar:<br />   class:\Drupal\my_module\BarNegotiator<br />   arguments: {'@entity_type.manager'}<br />   tags:<br />     - { name: my_module_negotiator, priority: -100 }<br /> my_module.negotiator.baz:<br />   class:\Drupal\my_module\BazNegotiator<br />   arguments: {'@entity_type.manager'}<br />   tags:<br />     - { name: my_module_negotiator, priority: 0 } </code></p> <p><strong>MyModuleNegotiator.php</strong><br /><code>/**<br />  * The negotiator for my module.<br />  */<br /> class MyModuleNegotiator {</code></p> <p>  /**<br />    * The class resolver service.<br />    *<br />    * @var \Drupal\Core\DependencyInjection\ClassResolver<br />    */<br />   protected $classResolver;</p> <p>  /**<br />    * The negotiator service IDs.<br />    *<br />    * @var array<br />    */<br />   protected $negotiatorServiceIds;</p> <p>  /**<br />    * Constructs the negotiator.<br />    *<br />    * @param \Drupal\Core\DependencyInjection\ClassResolver $class_resolver</p> <p>   *   The class resolver service.<br />    * @param array $negotiator_service_ids<br />    *   The negotiator service IDs.<br />    */</p> <p>  public function __construct(ClassResolverInterface $class_resolver, array $negotiator_service_ids) {<br />     $this-&gt;classResolver = $class_resolver;<br />     $this-&gt;negotiatorServiceIds = $negotiator_service_ids;<br />   }</p> <p>  /**<br />    * Run the negotiators.<br />    */<br />   public function runNegotiators() {<br />     foreach ($this-&gt;negotiatorServiceIds as $negotiator_service_id) {<br />       $negotiator = $this-&gt;classResolver-&gt;getInstanceFromDefinition($negotiator_service_id);<br />       if ($negotiator-&gt;applies()) {<br />         $negotiator-&gt;run();<br />       }<br />     }<br />   }<br /> } </p> </div> <span rel="schema:author"><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span></span> <span property="schema:dateCreated" content="2017-12-14T09:29:06+00:00">Thu, 14/12/2017 - 09:29</span> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">Tags</div> <div class="field--items"> <div class="field--item"><a href="/taxonomy/term/1" property="schema:about" hreflang="en">drupal planet</a></div> <div class="field--item"><a href="/taxonomy/term/2" property="schema:about" hreflang="en">drupal-planet</a></div> <div class="field--item"><a href="/taxonomy/term/4" property="schema:about" hreflang="en">drupal8</a></div> </div> </div> <ul class="links inline list-inline"><li class="comment-add"><a href="/blog/drupal-service-id-collectors#comment-form" title="Share your thoughts and opinions." hreflang="en">Add new comment</a></li></ul><section> <h2>Comment</h2> <a id="comment-1068"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1513330033"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Anonymous (not verified)</span> on Thu, 14/12/2017 - 13:14</p> <a href="/comment/1068#comment-1068" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1068#comment-1068" class="permalink" rel="bookmark" hreflang="en">Do you have any example of…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>Do you have any example of how this is used in core or why someone may use a service collector?</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1068&amp;1=default&amp;2=en&amp;3=" token="r5XUh20tzyT4by5PdMg0BzeOKFGaR4ouPQLTakNQtmc"></drupal-render-placeholder> </div> </article> <div class="indented"><a id="comment-1077"></a> <article data-comment-user-id="1" class="js-comment"> <mark class="hidden" data-comment-timestamp="1513330137"></mark> <footer> <article typeof="schema:Person" about="/user/1"> </article> <p>Submitted by <span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span> on Fri, 15/12/2017 - 09:28</p> <p class="visually-hidden">In reply to <a href="/comment/1068#comment-1068" class="permalink" rel="bookmark" hreflang="en">Do you have any example of…</a> by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Anonymous (not verified)</span></p> <a href="/comment/1077#comment-1077" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1077#comment-1077" class="permalink" rel="bookmark" hreflang="en">theme.negotiator is a…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p><code>theme.negotiator</code> is a service ID collector - <a href="https://api.drupal.org/api/drupal/core%21core.services.yml/service/theme.negotiator/8.4.x">https://api.drupal.org/api/drupal/core%21core.services.yml/service/theme.negotiator/8.4.x</a></p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1077&amp;1=default&amp;2=en&amp;3=" token="5oucln2XSQEPipwfaMc4l1h9PfsL206VfxrF69YKplo"></drupal-render-placeholder> </div> </article> </div> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=39&amp;2=field_comment&amp;3=basic" token="HTtXpZF2KBzblPquXs1Nc1VH0b9OqURLIyxl2uqb16c"></drupal-render-placeholder> </section> Thu, 14 Dec 2017 09:29:06 +0000 timmillwood 39 at https://www.millwoodonline.co.uk Dreditor for Firefox https://www.millwoodonline.co.uk/blog/dreditor-for-firefox <span property="schema:name">Dreditor for Firefox</span> <div property="schema:text" class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Last week I switch from years of using Chrome to Firefox 57 because of all the hype about it being fast, and that I'd been suffering from Chrome using up to 10GB of ram. The big issue I hit though was I didn't have Dreditor and there seemed to be no way to install it. I decided to go on using Firefox without Dreditor, and loading Chrome every time I needed to do an in depth patch review.</p> <p>Then yesterday I saw the latest <a href="https://twitter.com/CommitStrip/status/933033486495178752">Commit Strip cartoon</a>, where in a reply <a href="https://twitter.com/williambl_/status/933087306571018240">@williambl</a> suggested <a href="https://addons.mozilla.org/en-US/firefox/addon/chrome-store-foxified/">Chrome Store Foxified</a> for converting Chrome plugins to Firefox. First thing I thought was to try the Dreditor Chrome plugin, and it worked.</p> <p>This morning <a href="https://www.drupal.org/u/berdir">Berdir</a> suggested "<span><span>maybe someone will release that thing as a public extension". So I went digging on </span></span>addons.mozilla.org and found I could download the XPI file Chrome Store Foxified created during the conversion.</p> <p><a href="/sites/default/files/2018-03/dreditor.xpi">Download Dreditor for Firefox</a></p> </div> <span rel="schema:author"><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span></span> <span property="schema:dateCreated" content="2017-11-23T09:33:24+00:00">Thu, 23/11/2017 - 09:33</span> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">Tags</div> <div class="field--items"> <div class="field--item"><a href="/taxonomy/term/1" property="schema:about" hreflang="en">drupal planet</a></div> <div class="field--item"><a href="/taxonomy/term/2" property="schema:about" hreflang="en">drupal-planet</a></div> <div class="field--item"><a href="/taxonomy/term/3" property="schema:about" hreflang="en">drupal</a></div> <div class="field--item"><a href="/taxonomy/term/23" property="schema:about" hreflang="en">dreditor</a></div> </div> </div> <ul class="links inline list-inline"><li class="comment-add"><a href="/blog/dreditor-for-firefox#comment-form" title="Share your thoughts and opinions." hreflang="en">Add new comment</a></li></ul><section> <h2>Comment</h2> <a id="comment-873"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1511470610"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">gambry (not verified)</span> on Thu, 23/11/2017 - 15:20</p> <a href="/comment/873#comment-873" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/873#comment-873" class="permalink" rel="bookmark" hreflang="en">Yep! I&#039;ve been a Foxified…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>Yep! I've been a Foxified Dreditor user for a couple of months already.<br /> With mentors we were planning to do the same task, so thank you for doing it!<br /> Kudos+++</p> <p>Have you updated the Contributors section of d.org?</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=873&amp;1=default&amp;2=en&amp;3=" token="q-koJOnDcyQEGTnsLT3wcdcHV93_3SWBNU2FQdm03PI"></drupal-render-placeholder> </div> </article> <a id="comment-878"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1511511680"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">larowlan (not verified)</span> on Thu, 23/11/2017 - 21:13</p> <a href="/comment/878#comment-878" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/878#comment-878" class="permalink" rel="bookmark" hreflang="en">I&#039;ve been using FF nightly…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>I've been using FF nightly for years. And when dreditor stopped working (about 12 months ago) I've been forced to use chrome again, just for reviews.</p> <p>Thank you, thank you, thank you!</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=878&amp;1=default&amp;2=en&amp;3=" token="vwS1TWYlILQajP5ZCSqAG99xONWficEoSrCVTiG6OME"></drupal-render-placeholder> </div> </article> <a id="comment-891"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1511649388"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Colan Schwartz (not verified)</span> on Fri, 24/11/2017 - 20:25</p> <a href="/comment/891#comment-891" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/891#comment-891" class="permalink" rel="bookmark" hreflang="en">Thanks! It seems to work…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>Thanks! It seems to work well, and I'd like to switch back to FF too. However, too many of the extensions I need aren't available in Quantum (Firefox 57) just yet. As soon as these are back (this plug-in certainly helps), I'll dump Chromium.</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=891&amp;1=default&amp;2=en&amp;3=" token="-kGBllJpgQmVhNhGgUpGZksxc4-nTq7XyFZuAhfbxrU"></drupal-render-placeholder> </div> </article> <a id="comment-998"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1513071715"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">navneet0693 (not verified)</span> on Wed, 06/12/2017 - 18:56</p> <a href="/comment/998#comment-998" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/998#comment-998" class="permalink" rel="bookmark" hreflang="en">Seriously thanks for working…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>Seriously thanks for working out on this, I was having same experience as yours !</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=998&amp;1=default&amp;2=en&amp;3=" token="a1mzfeiPcvWkcHhuBvOKJVuPiil7eMND6RQoK3yBoeQ"></drupal-render-placeholder> </div> </article> <a id="comment-1055"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1513071722"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Anonymous (not verified)</span> on Mon, 11/12/2017 - 15:59</p> <a href="/comment/1055#comment-1055" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1055#comment-1055" class="permalink" rel="bookmark" hreflang="en">Thank you very much for your…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>Thank you very much for your work! I'm now back on Firefox. :)</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1055&amp;1=default&amp;2=en&amp;3=" token="GRjnkFkDp3Yea8ols3IfiNMmRAmWlGN7yXjpsc4hwuY"></drupal-render-placeholder> </div> </article> <a id="comment-1534"></a> <article data-comment-user-id="0" class="js-comment"> <mark class="hidden" data-comment-timestamp="1523893365"></mark> <footer> <article typeof="schema:Person" about="/user/0"> </article> <p>Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Anonymous (not verified)</span> on Fri, 02/03/2018 - 19:04</p> <a href="/comment/1534#comment-1534" hreflang="en">Permalink</a> </footer> <div> <h3><a href="/comment/1534#comment-1534" class="permalink" rel="bookmark" hreflang="en">Looks like the link is…</a></h3> <div class="field field--name-comment-body field--type-text-long field--label-hidden field--item"><p>Looks like the link is broken now</p> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1534&amp;1=default&amp;2=en&amp;3=" token="aDga5XarKnBbMWQ_1rqU7XV-YZIL2ZCHP8iQ1AEZLUE"></drupal-render-placeholder> </div> </article> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=37&amp;2=field_comment&amp;3=basic" token="5xU__YHrOTDOGFeiiCl9KkzWFTvJC1Ki8afeg_FIUDo"></drupal-render-placeholder> </section> Thu, 23 Nov 2017 09:33:24 +0000 timmillwood 37 at https://www.millwoodonline.co.uk Workflow Initiative Needs Review https://www.millwoodonline.co.uk/node/2 <article role="article" about="/node/2" typeof="schema:Article" class="article is-promoted full clearfix"> <span property="schema:name" content="Workflow Initiative Needs Review" class="hidden"></span> <span property="schema:interactionCount" content="UserComments:0" class="hidden"></span> <footer> <article typeof="schema:Person" about="/user/1"> </article> <div class="author"> Submitted by <span rel="schema:author"><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">timmillwood</span></span> on <span property="schema:dateCreated" content="2016-12-08T10:49:19+00:00">Thu, 08/12/2016 - 10:49</span> <span property="schema:dateCreated" content="2016-12-08T10:49:19+00:00" class="hidden"></span> </div> </footer> <div class="content"> <div property="schema:text" class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>We have been extremely hard at work this year with the Workflow Initiative bringing some quite big underlying changes to the Entity API and some great advances in core such as the Content Moderation module. There are now around 8 weeks until feature freeze for 8.3.x and there’s still a number of key things we want to get in. Please take a look at our <a href="https://contribkanban.com/sprint/WorkflowInitiative" target="_blank">kanban board</a> and see if there’s anything you’d like to take a look at even if it’s just a quick review, a little feedback, or a +1.</p> <p>At the time of writing this post there are 8 Workflow Initiative issues in Needs Review:<br /><a href="https://www.drupal.org/node/2745619" target="_blank">Which core entities get revisions?</a><br /> We are looking at making more content entities in core revisionable, this will roll out gradually, but which ones should we make revisionable?<br /><br /><a href="https://www.drupal.org/node/2669802" target="_blank">Add a content entity form which allows to set revisions</a><br /> This is mainly an effort by the Media Initiative, but affects the Workflow Initiative too. The idea is to have a generic entity form for revisionable entities.<br /><br /><a href="https://www.drupal.org/node/2820848" target="_blank">Add a publishing status field to BlockContent</a><br /> Shock horror! Block content entities are currently not able to be unpublished. We need to fix this! This will be a pattern for making other things able to be unpublished too.<br /><br /><a href="https://www.drupal.org/node/2721313" target="_blank">Upgrade path between revisionable / non-revisionable entities</a><br /> This patch has had so many iterations but the current one is looking pretty awesome. It will give ups an upgrade path for entity types such as taxonomy terms and menu links to have revisions.<br /><br /><a href="https://www.drupal.org/node/2831428" target="_blank">Introduce sorted set key value store</a><br /> Before we introduce Workspaces in core we want to store a sequence of entity updates, a sorted set key value store will allow us to do this.<br /><br /><a href="https://www.drupal.org/node/2809227" target="_blank">Store revision id in originalRevisionId property to use after revision id is updated</a><br /> There are a number of bugs in core which require us to know what the revision id of an entity object used to be. This issue solves this by adding a simple property.<br /><br /><a href="https://www.drupal.org/node/2825973" target="_blank">Introduce a EditorialContentEntityBase class for revisionable and publishable entity types</a><br /> When we make more entity types revisionable and publishable it’d be great if they all extended the same base class. This issues does this for Nodes, we will then be able to roll it out to Block content once publishable, and other entities once revisionable.<br /><br /><a href="https://www.drupal.org/node/2755073" target="_blank">WI: Content Moderation module roadmap</a><br /> Content moderation is currently in core as an alpha experimental module. How can we get this to beta then stable?</p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">Tags</div> <div class="field--items"> <div class="field--item"><a href="/taxonomy/term/1" property="schema:about" hreflang="en">drupal planet</a></div> <div class="field--item"><a href="/taxonomy/term/2" property="schema:about" hreflang="en">drupal-planet</a></div> <div class="field--item"><a href="/taxonomy/term/3" property="schema:about" hreflang="en">drupal</a></div> <div class="field--item"><a href="/taxonomy/term/4" property="schema:about" hreflang="en">drupal8</a></div> <div class="field--item"><a href="/taxonomy/term/5" property="schema:about" hreflang="en">drupal 8</a></div> <div class="field--item"><a href="/taxonomy/term/6" property="schema:about" hreflang="en">workflow</a></div> <div class="field--item"><a href="/taxonomy/term/7" property="schema:about" hreflang="en">workflow initiative</a></div> </div> </div> <section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=2&amp;2=field_comment&amp;3=basic" token="ECTd4hRDmbyR5E1D0bD0jmhhJg25mFgxgqpK8FzJs_g"></drupal-render-placeholder> </section> </div> </article> Thu, 08 Dec 2016 10:49:19 +0000 timmillwood 2 at https://www.millwoodonline.co.uk