<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sean B on Medium]]></title>
        <description><![CDATA[Stories by Sean B on Medium]]></description>
        <link>https://medium.com/@seanblommaert?source=rss-2941a91ef5ca------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nTxZdP_zC-pT3Au1PtfmMw.png</url>
            <title>Stories by Sean B on Medium</title>
            <link>https://medium.com/@seanblommaert?source=rss-2941a91ef5ca------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 10:59:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@seanblommaert/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introducing YAML Bundles: The easiest way to maintain your content types!]]></title>
            <link>https://seanblommaert.medium.com/introducing-yaml-bundles-the-easiest-way-to-maintain-your-content-types-f7158f439387?source=rss-2941a91ef5ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7158f439387</guid>
            <category><![CDATA[content-management]]></category>
            <category><![CDATA[drupal]]></category>
            <category><![CDATA[drupal-10]]></category>
            <category><![CDATA[drupal-development]]></category>
            <dc:creator><![CDATA[Sean B]]></dc:creator>
            <pubDate>Tue, 19 Dec 2023 12:21:29 GMT</pubDate>
            <atom:updated>2023-12-19T12:21:29.459Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QylyXMlwirD4SgMIa2LQNw.png" /></figure><p>Let’s face it — manually creating and maintaining a lot of content types in Drupal can be a real pain. The repetitive nature of tasks, inconsistencies in field creation, and the time-consuming process of updating settings across multiple content types are familiar struggles for developers working in teams.</p><p>At <a href="https://www.twelvebricks.com/en">TwelveBricks</a>, we maintain sites with very different content models. Too much time was spent setting up and maintaining those models, so we finally decided to do something about it!</p><h3>Enter YAML Bundles: A Developer’s new best friend</h3><p><a href="https://www.drupal.org/project/yaml_bundles">YAML Bundles</a> is a pragmatic approach to streamlining content type management through YAML-based Drupal plugins. It allows developers to define fields and content types from custom modules, making it a lot easier to add or update fields and content types.</p><p>The module defines 3 important plugin types:</p><ul><li>Field types<br>By defining common field types and their form/display settings (like widgets and formatters), you can remove repetitive configuration from the bundle definitions.</li><li>Entity types<br>You can define common settings for entity types to remove even more repetitive configurations from the bundle definitions. We have also integrated support for a bunch of other contrib modules we often use, to save even more time.</li><li>Entity bundles<br>You can use the defined fields in entity bundles, complete with customizable form and display settings that can be overridden on a field-by-field basis. The default settings of the entity types can also be overridden if you need to.</li></ul><p>The module ships with defaults for the most common field and entity types, but you can easily override them. We have tests, which we also used to document all the available plugin settings and options. You can check out the documentation in the <a href="https://git.drupalcode.org/project/yaml_bundles/-/tree/1.0.x/tests/modules/yaml_bundles_test?ref_type=heads">plugin definitions of the <strong>yaml_bundles_test</strong> module</a>.</p><h3>YAML Bundles’ Drush Tools</h3><p>To use the power of YAML bundles, we’ve added a couple of helpful Drush commands that will revolutionize your content type management.</p><p><strong>drush yaml-bundles:create-bundles</strong><br>This command uses the defined plugins to (re)create all the specified bundles, fields, and settings. Whether you’re starting from scratch or optimizing an existing configuration, this command ensures the seamless generation of all your content types with a single command.</p><p><strong>drush yaml-bundles:create-bundle</strong> <br>You don’t have to use the bundle plugins if you don’t want to. For those who prefer a more hands-on approach, this command offers the flexibility to create a new content type directly through Drush.</p><p><strong>drush yaml-bundles:create-field</strong><br>This command simplifies the process of adding new fields to existing content types using default plugin configurations. With the ability to customize form and view displays, this command makes adding fields to different content types much easier.</p><h3>Integrating the modules we all love</h3><p>YAML Bundles comes with out-of-the-box support for several popular Drupal modules, including:</p><ul><li>Pathauto: Define path aliases for entities and bundles effortlessly.</li><li>Content Translation: Translate fields, labels, and settings into multiple languages.</li><li>Content Moderation: Integrate content types into existing workflows.</li><li>Field Group: Group fields for your content type directly from the YAML plugins.</li><li>Simple Sitemap: Ensure your entity/bundle is included in the sitemap.</li><li>Maxlength: Define maximum lengths for text fields if needed.</li><li>Layout Builder: Utilize layout builder for your entity/bundle.</li><li>Search API: Index entities/bundles and defined fields using the powerful Search API.</li></ul><h3>Let’s define a content type</h3><p>To define default settings and fields for an entity type in your custom module, create a <strong><em>[mymodule].yaml_bundles.entity_type.yml</em></strong> file. In this file, you can create all the defaults you need for the entity type.</p><pre># Add the default settings and fields for node types.<br>node:<br>  description: &#39;&#39;<br>  langcode: en<br><br>  # Make sure our plugin gets preference over the yaml_bundle plugin.<br>  weight: 1<br><br>  # Default content type settings.<br>  new_revision: true<br>  preview_mode: 0<br>  display_submitted: false<br><br>  # Enable content translation.<br>  content_translation:<br>    enabled: true<br>    bundle_settings:<br>      untranslatable_fields_hide: &#39;1&#39;<br>    language_alterable: true<br>    default_langcode: current_interface<br><br>  # Add the content to the sitemap by default.<br>  sitemap:<br>    index: true<br>    priority: 0.5<br>    changefreq: &#39;weekly&#39;<br>    include_images: false<br><br>  # Enable layout builder.<br>  layout_builder: true<br><br>  # Enable content moderation.<br>  workflow: content<br><br>  # Add the content to the default search index.<br>  search_indexes:<br>    - default<br><br>  # Create the full and teaser view displays.<br>  view_displays:<br>    - teaser<br><br>  # Add the default fields.<br>  fields:<br>    langcode:<br>      label: Language<br>      weight: -100<br>      form_displays:<br>        - default<br>    title:<br>      label: Title<br>      search: true<br>      search_boost: 20<br>      weight: -98<br>      form_displays:<br>        - default<br>    field_meta_description:<br>      label: Meta description<br>      type: text_plain<br>      search: true<br>      search_boost: 20<br>      maxlength: 160<br>      maxlength_label: &#39;The content is limited to @limit characters, remaining: &lt;strong&gt;@remaining&lt;/strong&gt;&#39;<br>      weight: -25<br>      form_displays:<br>        - default<br><br>  # Translate the default fields.<br>  translations:<br>    nl:<br>      fields:<br>        langcode:<br>          label: Taal<br>        title:<br>          label: Titel<br>        field_meta_description:<br>          label: Metabeschrijving<br>          maxlength_label: &#39;De inhoud is beperkt tot @limit tekens, resterend: &lt;strong&gt;@remaining&lt;/strong&gt;&#39;<br>    de:<br>      fields:<br>        langcode:<br>          label: Sprache<br>        title:<br>          label: Titel<br>        field_meta_description:<br>          label: Meta-Beschreibung<br>          maxlength_label: &#39;Der Inhalt ist auf @limit-Zeichen beschränkt, verbleibend: &lt;strong&gt;@remaining&lt;/strong&gt;&#39;</pre><p>To define a content type in your custom module, create a <strong><em>[mymodule].yaml_bundles.bundle.yml</em></strong> file. In this file, you can create all the bundle definitions you need for the bundle.</p><pre>node.news:<br>  label: News<br>  description: A description for the news type.<br>  langcode: en<br><br>  # Add generic node type settings.<br>  help: Help text for the news bundle.<br><br>  # Enable a custom path alias for the bundle. Requires the pathauto module to<br>  # be enabled.<br>  path: &#39;news/[node:title]&#39;<br><br>  # Configure the simple_sitemap settings for the bundle. Requires the<br>  # simple_sitemap module to be enabled.<br>  sitemap:<br>    priority: 0.5<br><br>  # Configure the search API index boost for the bundle. Requires the<br>  # search_indexes to be configured and the search_api module to be enabled.<br>  boost: 1.5<br><br>  # Configure the fields for the bundle. For base fields, the field only needs<br>  # a label. For custom fields, the type needs to be specified. The type<br>  # configuration from the yaml_bundles.field_type plugins will be merged with<br>  # the field configuration to allow the definition to be relatively simple.<br>  # Generic defaults for a field type can be configured in the<br>  # yaml_bundles.field_type plugins.<br>  #<br>  # See yaml_bundles.yaml_bundles.field_type.yml for the list of supported<br>  # field types and their configuration properties.<br>  fields:<br><br>    field_date:<br>      type: datetime<br>      label: Date<br>      required: false<br>      search: true<br>      search_boost: 1<br>      cardinality: 1<br>      field_default_value:<br>        -<br>          default_date_type: now<br>          default_date: now<br>      form_displays:<br>        - default<br>      view_displays:<br>        - full<br>        - teaser<br><br>    field_body:<br>      type: text_long<br>      label: Text<br>      required: true<br>      search: true<br>      search_boost: 1<br>      form_displays:<br>        - default<br>      view_displays:<br>        - full<br><br>    field_image:<br>      type: image<br>      label: Image<br>      required: true<br>      search: true<br>      form_displays:<br>        - default<br>      view_displays:<br>        - full<br>        - teaser<br><br>    field_category:<br>      type: list_string<br>      label: Category<br>      required: false<br>      search: true<br>      options:<br>        category_1: Category 1<br>        category_2: Category 2<br>      form_displays:<br>        - default<br>      view_displays:<br>        - full<br>        - teaser<br><br>    field_link:<br>      type: link<br>      label: Link<br>      required: true<br>      search: true<br>      cardinality: 2<br>      form_displays:<br>        - default<br>      view_displays:<br>        - full<br>        - teaser</pre><h3>That’s all folks!</h3><p>We’re excited about the potential YAML Bundles brings to the Drupal ecosystem, and we can’t wait for you to experience the difference it makes in your projects. Please check it out and let us know what you think!</p><p><a href="https://www.drupal.org/project/yaml_bundles">Download YAML Bundles</a> | <a href="https://git.drupalcode.org/project/yaml_bundles/-/blob/1.0.x/README.md">Documentation</a> | <a href="https://git.drupalcode.org/project/yaml_bundles/-/tree/1.0.x/tests/modules/yaml_bundles_test">Example plugins</a></p><h3>Sponsored by TwelveBricks — The easiest CMS for your business</h3><p>Building a new website can be a time-consuming and expensive process, but it doesn’t have to be. TwelveBricks offers an affordable and easy-to-use (<a href="https://splashawards.nl/winnaars-van-2023#:~:text=TwelveBricks%20%2D%C2%A0TwelveBricks%20CMS">Award-winning</a>!) Content Management System (CMS) for a fixed monthly price.</p><p>We’ve optimized the workflow for editors so they can fully focus on their content without worrying about the appearance. With built-in analytics and extensive SEO tools, optimizing content becomes even easier. Each website can be delivered in just 2 days!</p><p>If you’re looking for a new website and don’t want to wait for months, spend a fortune, or compromise on quality, check out our website at <a href="https://www.twelvebricks.com/en">https://www.twelvebricks.com/en</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7158f439387" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Responsive Image Optimization With Media in Drupal 9]]></title>
            <link>https://medium.com/geekculture/responsive-image-optimization-with-media-in-drupal-9-62080c31d5f4?source=rss-2941a91ef5ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/62080c31d5f4</guid>
            <category><![CDATA[responsive-design]]></category>
            <category><![CDATA[drupal]]></category>
            <category><![CDATA[drupal-8]]></category>
            <category><![CDATA[drupal-9]]></category>
            <category><![CDATA[drupal-development]]></category>
            <dc:creator><![CDATA[Sean B]]></dc:creator>
            <pubDate>Sat, 06 Mar 2021 03:49:03 GMT</pubDate>
            <atom:updated>2021-03-10T18:44:50.045Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ay9b3CtelTzpl3ZbhLYtgA.png" /></figure><p>Responsive images have always been a pain to configure properly. In Drupal you can <a href="https://www.drupal.org/docs/theming-drupal/working-with-breakpoints-in-drupal">create your breakpoints in your theme or module</a> and use the <a href="https://www.drupal.org/docs/mobile-guide/responsive-images">Responsive Image module</a> to set up different responsive image styles, defining which image style to use for a specific breakpoint. This takes quite some work and planning to set everything up, and maintaining all the image styles if changes need to be made is always a pain. Most of the sites I have built lately also have a fluid design. Since the images are defined for fixed breakpoints, this leads to a lot of the images being loaded for the user are still too big.</p><p>After struggling with this, we thought about how we could find a way to improve this. In HTML5 we can define a “srcset” attribute, which loads the correct image based on the browsers viewport. The default “src” contains a really small version of the image by default for better performance. Also notice the HTML5 “loading” attribute to enable lazy loading of images for even more optimization.</p><pre>&lt;img src=&quot;image-50w.jpg&quot; srcset=&quot;image-480w.jpg 480w, image-800w.jpg 800w&quot; alt=&quot;My pretty image&quot; loading=&quot;lazy&quot; /&gt;</pre><h3>Media view modes per aspect ratio</h3><p>Since we were using media to add images to content, we experimented with having media view modes defined by aspect ratio, combined with a bunch of different image styles for the images in that specific aspect ratio. The media template could provide all the image styles with different widths for that image style, and use the “srcset” attribute to let the browser pick the best image. So we now got image styles for a 4:3 ratio and 16:9 ratio like:</p><ul><li>responsive_4_3_50w</li><li>responsive_16_9_50w</li><li>responsive_4_3_150w</li><li>responsive_16_9150w</li><li>…</li><li>responsive_4_3_1450w</li><li>responsive_16_9_1450w</li></ul><p>For images maintaining their original ratio we just use the width, like <em>50w</em>, <em>150w</em>, etc. The media template for our “16_9&quot; view mode (<em>media — image — 16-9.html.twig</em>) now looked like this, using the “image_style“ filter of the <a href="https://www.drupal.org/project/twig_tweak">Twig Tweak module</a> to load the actual image URLs for image styles from the file:</p><pre>{#<br>/**<br> * @file<br> * Default theme implementation to display an image.<br> */<br>#}<br>{% set file = media.field_media_image.entity %}<br>{% set src = file.uri.value|image_url(https://medium.com/&#39;responsive_16_9_50w&#39;) %}<br>{% set srcset = [<br>  file.uri.value|image_style(&#39;responsive_16_9_150w&#39;) ~ &#39; 150w&#39;,<br>  file.uri.value|image_style(&#39;responsive_16_9_350w&#39;) ~ &#39; 350w&#39;,<br>  file.uri.value|image_style(&#39;responsive_16_9_550w&#39;) ~ &#39; 550w&#39;,<br>  file.uri.value|image_style(&#39;responsive_16_9_950w&#39;) ~ &#39; 950w&#39;,<br>  file.uri.value|image_style(&#39;responsive_16_9_1250w&#39;) ~ &#39; 1250w&#39;,<br>  file.uri.value|image_style(&#39;responsive_16_9_1450w&#39;) ~ &#39; 1450w&#39;,<br>] %}<br>&lt;img src=&quot;{{ src }}&quot; srcset=&quot;{{ srcset|join(&#39;,&#39;) }}&quot; alt=&quot;{{ media.field_media_image.alt }}&quot; loading=&quot;lazy&quot; /&gt;</pre><h3>Image styles based on container width</h3><p>The first problem we noticed, was the “srcset” attribute uses the viewport width, not the width of the image container. This means when the viewport is 1400px and the image is shown in a column with a width of 200px, the image style with a width of 1400px is chosen by the browser. This was not giving us the result we were looking for. The only way to figure out the width of the container is via JavaScript, so we wrote a little script to figure out the available width for each image and load the correct image style using <a href="https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver">ResizeObserver</a>. The ResizeObserver does not work in IE11, but this was not a requirement for our project. Besides, Drupal will also <a href="https://www.drupal.org/node/3199540">drop IE11 support in Drupal 10</a>! To prevent the browser from initially loading the large images from the “srcset” attribute, we changed the “srcset” attribute to “data-srcset” and let the JavaScript handle the rest.</p><pre>// Fetch all images containing a &quot;data-srcset&quot; attribute.<br>const images = context.querySelectorAll(&#39;img[data-srcset]&#39;);<br><br>// Create a ResizeObserver to update the image &quot;src&quot; attribute when its<br>// parent container resizes.<br>const observer = new ResizeObserver(entries =&gt; {<br>  for (let entry of entries) {<br>    const images = entry.target.querySelectorAll(&#39;img[data-srcset]&#39;);<br>    images.forEach(image =&gt; {<br>      const availableWidth = <strong><em>Math</em></strong>.floor(image.parentNode.clientWidth);<br>      const attrWidth = image.getAttribute(&#39;width&#39;);<br>      const sources = image.getAttribute(&#39;data-srcset&#39;).split(&#39;,&#39;);<br><br>      // If the selected image is already bigger than the available width,<br>      // we do not update the image.<br>      if (attrWidth &amp;&amp; attrWidth &gt; availableWidth) {<br>        return;<br>      }<br><br>      // Find the best matching source based on actual image space.<br>      let source, responsiveImgPath, responsiveImgWidth;<br>      for (source of sources) {<br>        let array = source.split(&#39; &#39;);<br>        responsiveImgPath = array[0];<br>        responsiveImgWidth = array[1].slice(0, -1);<br>        if (availableWidth &lt; responsiveImgWidth) {<br>          break;<br>        }<br>      }<br><br>      // Update the &quot;src&quot; with the new image and also set the &quot;width&quot;<br>      // attribute to easily check if we need a new image after resize.<br>      image.setAttribute(&#39;src&#39;, responsiveImgPath);<br>      image.setAttribute(&#39;width&#39;, responsiveImgWidth);<br>    });<br>  }<br>});<br><br>// Attach the ResizeObserver to the image containers.<br>images.forEach(image =&gt; {<br>  observer.observe(image.parentNode);<br>});</pre><h3>Auto generate image styles</h3><p>The second problem with this method was creating all the image styles we needed. This could be fixed with a form to automatically create all the image styles we needed for our aspect ratios. So we built the <a href="https://www.drupal.org/project/easy_responsive_images">Easy Responsive Images module</a>. The module needs a minimum and maximum width in combination with a preferred amount of pixels between each image style. An optional list of aspect ratio’s can also be defined. When the configuration is saved, the styles are automatically generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y972LldgwCZqR7-6cV-wjQ.png" /></figure><h3>Image optimization and WebP support</h3><p>Now that we have the best possible images loaded based on the container, we can take one more step to improve the performance of our images. Using the <a href="https://www.drupal.org/project/imageapi_optimize">Image Optimize module</a>, we can create optimization pipelines that can automatically apply to images displayed via image styles. We chose to use JpegOptim and PngQuant supported via the <a href="https://www.drupal.org/project/imageapi_optimize_binaries">Image Optimize Binaries module</a> (<a href="https://www.previousnext.com.au/blog/better-image-optimisation-drupal">the PreviousNext blog</a> contains some more data on the module and results). If you can not install those binaries on your server, there is also a <a href="https://www.drupal.org/project/imageapi_optimize_gd">ImageAPI Optimize GD module</a>.</p><p>Then there is also the <a href="https://www.drupal.org/project/imageapi_optimize_webp">ImageAPI Optimize WebP</a> module.</p><blockquote>WebP is a modern image format that provides superior lossless and lossy compression for images on the web. Using WebP, webmasters and web developers can create smaller, richer images that make the web faster.</blockquote><p>In our tests we found that for most images, WebP is about 30% — 50% smaller than jpg images. For png images it is even more. To easily load the WebP version of an image when a browser supports it, we created a “image_url” Twig filter in the <a href="https://www.drupal.org/project/easy_responsive_images">Easy Responsive Images module</a>, with added bonus support for external images via the <a href="https://www.drupal.org/project/imagecache_external">Imagecache External module</a>.</p><p>The final file for our media view mode using the JavaScript and the new Twig filter looks like this:</p><pre>{#<br>/**<br> * @file<br> * Default theme implementation to display an image.<br> */<br>#}<br>{{ attach_library(&#39;easy_responsive_images/resizer&#39;) }}</pre><pre>{% set file = media.field_media_image.entity %}<br>{% set src = file.uri.value|image_url(https://medium.com/&#39;responsive_16_9_50w&#39;) %}<br>{% set srcset = [<br>  file.uri.value|image_url(https://medium.com/&#39;responsive_16_9_150w&#39;) ~ &#39; 150w&#39;,<br>  file.uri.value|image_url(https://medium.com/&#39;responsive_16_9_350w&#39;) ~ &#39; 350w&#39;,<br>  file.uri.value|image_url(https://medium.com/&#39;responsive_16_9_550w&#39;) ~ &#39; 550w&#39;,<br>  file.uri.value|image_url(https://medium.com/&#39;responsive_16_9_950w&#39;) ~ &#39; 950w&#39;,<br>  file.uri.value|image_url(https://medium.com/&#39;responsive_16_9_1250w&#39;) ~ &#39; 1250w&#39;,<br>  file.uri.value|image_url(https://medium.com/&#39;responsive_16_9_1450w&#39;) ~ &#39; 1450w&#39;,<br>] %}<br>&lt;img src=&quot;{{ src }}&quot; data-srcset=&quot;{{ srcset|join(&#39;,&#39;) }}&quot; alt=&quot;{{ media.field_media_image.alt }}&quot; loading=&quot;lazy&quot; /&gt;</pre><p>The example uses the same aspect ratio for all defined widths, but technically that is not a requirement. Using a different aspect ratio for smaller/larger screens can still be used based on the requirements, although that would make the setup a bit more complex and would require more view modes for your media.</p><p>That’s about it. Some next steps could be adding a formatters for the modules and figuring out support for retina images (even though these would increase the image sizes).</p><p>Hope this helps anyone looking to improve and optimise the way they implement responsive images in Drupal.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62080c31d5f4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/responsive-image-optimization-with-media-in-drupal-9-62080c31d5f4">Responsive Image Optimization With Media in Drupal 9</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A simple subsite setup in Drupal]]></title>
            <link>https://seanblommaert.medium.com/a-simple-subsite-setup-in-drupal-e2cd4db41f38?source=rss-2941a91ef5ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2cd4db41f38</guid>
            <category><![CDATA[drupal]]></category>
            <category><![CDATA[drupal-9]]></category>
            <category><![CDATA[drupal-8]]></category>
            <category><![CDATA[drupal-development]]></category>
            <dc:creator><![CDATA[Sean B]]></dc:creator>
            <pubDate>Wed, 13 Jan 2021 11:24:03 GMT</pubDate>
            <atom:updated>2021-01-13T11:24:03.969Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YECeOxlko9KoOJNw8RNm3A.jpeg" /></figure><p>For some reason I recently had different clients with a similar need to create subsites in Drupal based on some kind of context in the URL. The context would mostly be defined via a URL prefix, but in some cases this could also be a different domain. Drupal has several modules that could provide functionality related to subsites, like <a href="https://www.drupal.org/project/domain">Domains Access</a>, <a href="https://www.drupal.org/project/group">Group</a> and <a href="https://www.drupal.org/project/og">Organic Groups</a>. For contexts defined via a path prefix or domain the <a href="https://www.drupal.org/project/purl">Persistant URL</a> module used to be a good pick, but there does not seem to be a stable Drupal 8 release (I did create a <a href="https://github.com/seanBlommaert/purl-d8">Drupal 9 ready fork on github</a> based on amazing work in the issue queue).</p><h3>Subsite setup based on entities</h3><p>After a lot of discussion about the implementation of subsites, I found for most clients a simple approach would solve their needs.</p><ol><li>Create an entity/bundle to define the subsite. This could be based on a taxonomy vocabulary, a node type, or a group if you need more advanced features like access control for the different subsites.<br>- Content for the subsite must be linked to the subsite entity.<br>- The subsite entity needs a field to define the path prefix (and/or domain).<br>- Other fields can be added as required, like a custom logo, menu etc.</li><li>Create a service to fetch the correct subsite entity based on the URL prefix. Depending on the actual needs, you can implement custom blocks, <a href="https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21entity.api.php/function/hook_entity_access/9.1.x">access hooks</a>, <a href="https://www.drupal.org/node/2287827">condition plugins</a>, and <a href="https://api.drupal.org/api/drupal/core%21modules%21views%21src%21Plugin%21views%21argument_default%21ArgumentDefaultPluginBase.php/group/views_argument_default_plugins/9.1.x">views argument default plugin</a> that can ask the service for the current subsite.</li></ol><p>How to create a vocabulary, node type or group is hopefully not very exciting, but I thought the service to determine the current subsite is code worth sharing.</p><h3>Custom service to fetch the current subsite</h3><p>Fetching the subsite from the URL is very similar to the way the language is determined for a page. Since a lot of code could depend on the current subsite, we want to determine it as soon in the request as possible. The best way to do that is to create an event subscriber for the KernelEvents::REQUEST event. The request subscriber is responsible for checking the URL and setting the subsite entity in a property on the service. We have build a settings page to allow a content manager to configure a default subsite, but this can also be determined by an empty path prefix, or a boolean field on the subsite entity for example. We simply check if we can match the first part of the current path the a prefix field on the subsite entity.</p><p>Besides the event subscriber, we need an inbound and outbound processor to change incoming and outgoing links. This inbound path processor makes sure that subsite path prefix is stripped from the path before trying to match it to a route. The outbound path processor adds the prefix back when links are added to a page, so the subsite prefix is persisted when clicking links in the menu for example.</p><p>First define the service in mymodule.services.yml:</p><pre>services:<br>  mymodule.subsite_manager:<br>    class: Drupal\mymodule\SubsiteManager<br>    arguments: [&#39;<a href="http://twitter.com/entity_type">@entity_type</a>.manager&#39;, &#39;<a href="http://twitter.com/config">@config</a>.factory&#39;]<br>    tags:<br>      - { name: event_subscriber }<br>      # We want our outbound processor to run just after PathProcessorLanguage.<br>      - { name: path_processor_outbound, priority: 90 }<br>      # We want our inbound processor to run just after PathProcessorLanguage.<br>      - { name: path_processor_inbound, priority: 290 }</pre><p>Then create the service class in /src/SubsiteManager.php:</p><pre>&lt;?php<br><br>namespace Drupal\mymodule;<br><br>use Drupal\Core\Config\ConfigFactoryInterface;<br>use Drupal\Core\Entity\EntityInterface;<br>use Drupal\Core\Entity\EntityTypeManagerInterface;<br>use Drupal\Core\PathProcessor\InboundPathProcessorInterface;<br>use Drupal\Core\PathProcessor\OutboundPathProcessorInterface;<br>use Drupal\Core\Render\BubbleableMetadata;<br>use Symfony\Component\EventDispatcher\EventSubscriberInterface;<br>use Symfony\Component\HttpFoundation\Request;<br>use Symfony\Component\HttpKernel\Event\GetResponseEvent;<br>use Symfony\Component\HttpKernel\KernelEvents;<br><br><em>/**<br> * Get the active subsite from the request based on URL.<br> */<br></em>class SubsiteManager implements EventSubscriberInterface, OutboundPathProcessorInterface, InboundPathProcessorInterface {<br><br>  const <em>SUBSITE_ENTITY_TYPE </em>= &#39;node&#39;;<br><br>  const <em>SUBSITE_PATH_FIELD </em>= &#39;field_path&#39;;<br><br>  <em>/**<br>   * The entity type manager.<br>   *<br>   * </em><strong><em>@var </em></strong><em>\Drupal\Core\Entity\EntityTypeManagerInterface<br>   */<br>  </em>protected $entityTypeManager;<br><br>  <em>/**<br>   * The configuration factory.<br>   *<br>   * </em><strong><em>@var </em></strong><em>\Drupal\Core\Config\ConfigFactoryInterface<br>   */<br>  </em>protected $configFactory;<br><br>  <em>/**<br>   * The active subsite.<br>   *<br>   * </em><strong><em>@var </em></strong><em>\Drupal\Core\Entity\EntityInterface<br>   */<br>  </em>protected $subsite;<br><br>  <em>/**<br>   * Contruct the SubsiteManager.<br>   *<br>   * </em><strong><em>@param </em></strong><em>\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager<br>   *   The entity type manager.<br>   * </em><strong><em>@param </em></strong><em>\Drupal\Core\Config\ConfigFactoryInterface $configFactory<br>   *   The configuration factory.<br>   */<br>  </em>public function __construct(EntityTypeManagerInterface $entityTypeManager, ConfigFactoryInterface $configFactory) {<br>    $this-&gt;entityTypeManager = $entityTypeManager;<br>    $this-&gt;configFactory = $configFactory;<br>  }<br><br>  <em>/**<br>   * {</em><strong><em>@inheritdoc</em></strong><em>}<br>   */<br>  </em>public static function getSubscribedEvents() {<br>    return [<br>      // Runs as soon as possible in the request but after<br>      // LanguageRequestSubscriber (priority 255) because we want the language<br>      // prefix to come before the subsite prefix.<br>      KernelEvents::<em>REQUEST </em>=&gt; [&#39;onKernelRequestSetSubsite&#39;, 254],<br>    ];<br>  }<br><br>  <em>/**<br>   * Get the active subsite from the request.<br>   *<br>   * </em><strong><em>@param </em></strong><em>\Symfony\Component\HttpKernel\Event\GetResponseEvent $event<br>   *   The event to process.<br>   */<br>  </em>public function onKernelRequestSetSubsite(GetResponseEvent $event) {<br>    // Set the default subsite as fallback.<br>    if ($default_subsite = $this-&gt;getDefaultSubsite()) {<br>      $this-&gt;setCurrentSubsite($default_subsite);<br>    }<br><br>    $request = $event-&gt;getRequest();<br>    $request_path = urldecode(trim($request-&gt;getPathInfo(), &#39;/&#39;));<br><br>    // First strip the language when it&#39;s processor is available. This is only<br>    // the case when more than 1 language is installed.<br>    if (\Drupal::<em>hasService</em>(&#39;path_processor_language&#39;)) {<br>      $request_path = \Drupal::<em>service</em>(&#39;path_processor_language&#39;)-&gt;processInbound($request_path, $request);<br>    }<br><br>    // Get the first part of the path to check if it matches to a subsite page.<br>    $path_args = array_filter(explode(&#39;/&#39;, $request_path));<br>    $prefix = array_shift($path_args);<br><br>    if (!$prefix) {<br>      return;<br>    }<br><br>    // If the prefix matches to a subsite page, set it in the property.<br>    $subsites = $this-&gt;entityTypeManager-&gt;getStorage(static::<em>SUBSITE_ENTITY_TYPE</em>)-&gt;loadByProperties([<br>      &#39;type&#39; =&gt; &#39;subsite&#39;,<br>      static::<em>SUBSITE_PATH_FIELD </em>=&gt; $prefix,<br>    ]);<br>    $subsite = reset($subsites);<br>    if ($subsite) {<br>      $this-&gt;setCurrentSubsite($subsite);<br>    }<br>  }<br><br>  <em>/**<br>   * {</em><strong><em>@inheritdoc</em></strong><em>}<br>   */<br>  </em>public function processInbound($path, Request $request) {<br>    // Get the first part of the path to check if it matches to a subsite page.<br>    $path_args = explode(&#39;/&#39;, trim($path, &#39;/&#39;));<br>    $prefix = array_shift($path_args);<br><br>    // If we don&#39;t have a prefix, or if the prefix is the only thing in the path,<br>    // keep the current path as it is. This is a subsite homepage.<br>    if (!$prefix || $path === &#39;/&#39; . $prefix) {<br>      return $path;<br>    }<br><br>    // Only when dealing with a subsite page, change the request.<br>    $subsites = $this-&gt;entityTypeManager-&gt;getStorage(static::<em>SUBSITE_ENTITY_TYPE</em>)-&gt;loadByProperties([<br>      &#39;type&#39; =&gt; &#39;subsite&#39;,<br>      static::<em>SUBSITE_PATH_FIELD </em>=&gt; $prefix,<br>    ]);<br>    $subsite = reset($subsites);<br>    if (!$subsite) {<br>      return $path;<br>    }<br><br>    return &#39;/&#39; . implode(&#39;/&#39;, $path_args);<br>  }<br><br>  <em>/**<br>   * {</em><strong><em>@inheritdoc</em></strong><em>}<br>   */<br>  </em>public function processOutbound($path, &amp;$options = [], Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) {<br>    if (!empty($options[&#39;subsite&#39;])) {<br>      $subsite = $this-&gt;entityTypeManager-&gt;getStorage(static::<em>SUBSITE_ENTITY_TYPE</em>)-&gt;load($options[&#39;subsite&#39;]);<br>      $options[&#39;prefix&#39;] = $this-&gt;addPrefix($options[&#39;prefix&#39;], $subsite-&gt;get(static::<em>SUBSITE_PATH_FIELD</em>)-&gt;value);<br>    }<br>    $subsite = $this-&gt;getCurrentSubsite();<br>    if ($subsite &amp;&amp; empty($options[&#39;subsite&#39;]) &amp;&amp; !$this-&gt;isDefaultSubsite() &amp;&amp; $path !== &#39;/&#39; . $subsite-&gt;get(static::<em>SUBSITE_PATH_FIELD</em>)-&gt;value) {<br>      $options[&#39;subsite&#39;] = $subsite-&gt;id();<br>      $options[&#39;prefix&#39;] = $this-&gt;addPrefix($options[&#39;prefix&#39;], $subsite-&gt;get(static::<em>SUBSITE_PATH_FIELD</em>)-&gt;value);<br>    }<br>    return $path;<br>  }<br><br>  <em>/**<br>   * Create the updated path prefix.<br>   *<br>   * </em><strong><em>@param </em></strong><em>string $existing_prefix<br>   *   The existing path prefix.<br>   * </em><strong><em>@param </em></strong><em>string $subsite_prefix<br>   *   The Subsite path prefix.<br>   *<br>   * </em><strong><em>@return </em></strong><em>string<br>   *   The combined path prefix.<br>   */<br>  </em>protected function addPrefix($existing_prefix, $subsite_prefix) {<br>    $existing_prefix = trim($existing_prefix, &#39;/&#39;);<br>    $subsite_prefix = trim($subsite_prefix, &#39;/&#39;);<br>    $combined_prefixes = array_filter([$existing_prefix, $subsite_prefix]);<br>    $prefix = implode(&#39;/&#39;, $combined_prefixes) . &#39;/&#39;;<br>    return $prefix !== &#39;/&#39; ? $prefix : &#39;&#39;;<br>  }<br><br>  <em>/**<br>   * Set the current subsite.<br>   *<br>   * </em><strong><em>@param </em></strong><em>\Drupal\Core\Entity\EntityInterface $subsite<br>   *   The current subsite.<br>   */<br>  </em>public function setCurrentSubsite(EntityInterface $subsite) {<br>    $this-&gt;subsite = $subsite;<br>  }<br><br>  <em>/**<br>   * Get the current subsite.<br>   *<br>   * </em><strong><em>@return </em></strong><em>\Drupal\Core\Entity\EntityInterface<br>   *   The current subsite.<br>   */<br>  </em>public function getCurrentSubsite() {<br>    return $this-&gt;subsite;<br>  }<br><br>  <em>/**<br>   * Get the default subsite.<br>   */<br>  </em>public function getDefaultSubsite() {<br>    // Fetch a default subsite based on a config page.<br>    $default_subsite_id = $this-&gt;configFactory-&gt;get(&#39;mymodule.settings&#39;)-&gt;get(&#39;default&#39;);<br>    return $default_subsite_id ? $this-&gt;entityTypeManager-&gt;getStorage(static::<em>SUBSITE_ENTITY_TYPE</em>)-&gt;load($default_subsite_id) : NULL;<br>  }<br><br>  <em>/**<br>   * Check if the current subsite is the default subsite.<br>   */<br>  </em>public function isDefaultSubsite() {<br>    return $this-&gt;subsite &amp;&amp; $this-&gt;getDefaultSubsite()-&gt;id() === $this-&gt;subsite-&gt;id();<br>  }<br><br>}</pre><p>As mentioned before, you can implement custom blocks, <a href="https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21entity.api.php/function/hook_entity_access/9.1.x">access hooks</a>, <a href="https://www.drupal.org/node/2287827">condition plugins</a>, and <a href="https://api.drupal.org/api/drupal/core%21modules%21views%21src%21Plugin%21views%21argument_default%21ArgumentDefaultPluginBase.php/group/views_argument_default_plugins/9.1.x">views argument default plugin</a> that can ask the service for the current subsite. You can create blocks to show the correct content in the header (like logo or menu) and fetch the correct content in views etc. You can really make it as complex as needed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2cd4db41f38" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Updating to Drupal 9]]></title>
            <link>https://seanblommaert.medium.com/updating-to-drupal-9-81040c3b4dcf?source=rss-2941a91ef5ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/81040c3b4dcf</guid>
            <category><![CDATA[drupal-9]]></category>
            <category><![CDATA[drupal]]></category>
            <category><![CDATA[drupal-development]]></category>
            <dc:creator><![CDATA[Sean B]]></dc:creator>
            <pubDate>Mon, 04 Jan 2021 11:20:55 GMT</pubDate>
            <atom:updated>2021-01-04T11:20:55.419Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Di2yQ-4o4kLLOa8Jg99VQw.jpeg" /></figure><p>Two weeks ago I tweeted about updating a website with 123 contrib and 59 custom modules to Drupal 9. When I sent that tweet I was just starting the update and all was going pretty smooth. After using the awesome <a href="https://www.drupal.org/project/upgrade_status">Upgrade Status</a> module, all the contributed modules and our custom modules showed they were ready. Since our team believes waiting only makes it harder to keep up, we decided to go for Drupal 9.1.0 while we were at it.</p><h3></h3><p>Updating a site with 123 contrib en 59 custom modules to Drupal 9. I am totally in love with our automated tests right now. 😍</p><p>I want to start by saying that we have quite some test coverage for our custom code, and a lot of functional tests as well. I’m not sure how much time this saved, but even with the test coverage soms issues were tricky to find. That is also the reason I’m writing this. Partially to help teams that do not have the luxury of extensive test coverage, partially as a reminder that test coverage will eventually save time!</p><h3>Update the code using composer</h3><p>Updating all the modules using composer was a little tricky. The site contains a little over 50 core patches. Luckily most still applied but 17 of them had to be updated or rerolled. We also had to update PHPUnit and since we are using <a href="https://packagist.org/packages/brianium/paratest">brianium/paratest</a> we had to update to PHPUnit 9 to make all dependencies work. After we had all the code updated, the fun started.</p><h3>Get the site running</h3><p>The first thing that needs to be done to get a running site is make sure all service dependencies are correct. The deprecated entity.manager and path.alias_manager were the ones we found most.</p><h4><strong>The Path Alias core subsystem has been moved to the “path_alias” module</strong></h4><p><a href="https://www.drupal.org/node/3092086">https://www.drupal.org/node/3092086</a></p><pre>\Drupal\Core\Path\AliasManagerInterface<br><a href="http://twitter.com/path">@path</a>.alias_manager<br></pre><pre>\Drupal\path_alias\AliasManagerInterface<br><a href="http://twitter.com/path_alias">@path_alias</a>.manager</pre><h4><strong>EntityManager has been split into 11 classes</strong></h4><p><a href="https://www.drupal.org/node/2549139">https://www.drupal.org/node/2549139</a><br>We found quite a few places where we had overridden or extended core classes that still injected the old entity manager. If you find references to the old entity manager in your code, there is a good chance you need to replace it with the entity type manager. In some cases though, you need other services as well, so please pay close attention to check if the constructor has changed.</p><pre>entity.manager</pre><pre>entity_type.manager</pre><p>Some of the classes we had extended/overridden and constructors we had to change were:</p><ul><li>NodeController</li><li>CommentDefaultFormatter</li><li>TermSelection</li><li>ContentEntityNormalizer</li></ul><h3>Fixing our custom blocks</h3><p>Now that we had a running site, some of the blocks wouldn’t show up. We traced this to the following issues.</p><h4>Plugins now use the ‘context_definitions’ key to define their contexts</h4><p><a href="https://www.drupal.org/node/3016699">https://www.drupal.org/node/3016699</a></p><pre> * context = {<br> * “user” = <a href="http://twitter.com/ContextDefinition">@ContextDefinition</a>(“entity:user”, label = <a href="http://twitter.com/Translation">@Translation</a>(“User”))<br> * }</pre><pre> * context_definitions = {<br> * “user” = <a href="http://twitter.com/ContextDefinition">@ContextDefinition</a>(“entity:user”, label = <a href="http://twitter.com/Translation">@Translation</a>(“User”))<br> * }</pre><h4>Entity contexts have dedicated classes</h4><p><a href="https://www.drupal.org/node/2976400">https://www.drupal.org/node/2976400</a></p><pre>$context = new ContextDefinition(‘entity:’ . $entity-&gt;getEntityTypeId())</pre><pre>$context = EntityContext::fromEntityTypeId($entity-&gt;getEntityTypeId());</pre><h4>Render callbacks must be a closure or implement TrustedCallbackInterface or RenderCallbackInterface</h4><p><a href="https://www.drupal.org/node/2966725">https://www.drupal.org/node/2966725</a><br>This mostly applied to #pre_render methods for our code, but we also had some custom #lazy_builder callbacks.</p><pre>$build[‘#pre_render’][] = my_module_block_pre_render’;</pre><pre>$build[‘#pre_render’][] = [MyModuleBlock::class, ‘preRender’];</pre><h3>Fixing issues found by our tests</h3><p>Now that we had a “working” site, it was time to run the tests. The following list of deprecations/changes was harder to track down and we would probably only have found those issues after extensive user testing.</p><h4>The “Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent::getException()” method is deprecated since Symfony 4.4, use “getThrowable()” instead</h4><p><a href="https://www.drupal.org/project/drupal/issues/3113876">https://www.drupal.org/project/drupal/issues/3113876</a></p><pre>public function on404(GetResponseForExceptionEvent $event) {</pre><pre>public function on404(ExceptionEvent $event) {</pre><h4><strong>Several file uri/scheme functions deprecated and moved to \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface</strong></h4><p><a href="https://www.drupal.org/node/3035273">https://www.drupal.org/node/3035273</a></p><pre>\Drupal::service(‘file_system’)-&gt;uriScheme($uri)</pre><pre>StreamWrapperManager::getScheme($uri)<br></pre><h4><strong>user.private_tempstore is deprecated use the ‘tempstore.private’ service instead</strong></h4><p><a href="https://www.drupal.org/project/entity/issues/2951683">https://www.drupal.org/project/entity/issues/2951683</a></p><pre>$container-&gt;get(‘user.private_tempstore’)</pre><pre>$container-&gt;get(‘tempstore.private’)</pre><h4><strong>ConfigurablePluginInterface is deprecated in favor of ConfigurableInterface, DependentPluginInterface.</strong></h4><p><a href="https://www.drupal.org/node/2946161">https://www.drupal.org/node/2946161</a></p><pre>interface MyModulePluginInterface extends ConfigurablePluginInterface, PluginFormInterface, PluginInspectionInterface {</pre><pre>interface MyModulePluginInterface extends ConfigurableInterface, PluginFormInterface, PluginInspectionInterface {</pre><h4><strong>Deprecate TermInterface::getVocabularyId()</strong></h4><p><a href="https://www.drupal.org/project/drupal/issues/2850691">https://www.drupal.org/project/drupal/issues/2850691</a></p><pre>$term&gt;getVocabularyId()</pre><pre>$term&gt;bundle()</pre><h4><strong>The ::getCurrentUserId method is deprecated</strong></h4><p><a href="https://api.drupal.org/api/drupal/core%21modules%21node%21src%21Entity%21Node.php/function/Node%3A%3AgetCurrentUserId/8.7.x">https://api.drupal.org/api/drupal/core%21modules%21node%21src%21Entity%21Node.php/function/Node%3A%3AgetCurrentUserId/8.7.x<br></a>We had references to getCurrentUserId in the config of media/node base field overrides (eg core.base_field_override.media.image.uid.yml). These should be replaced. Other entity types might have them too.</p><pre>default_value_callback: ‘Drupal\media\Entity\Media::getCurrentUserId’</pre><pre>default_value_callback: ‘Drupal\media\Entity\Media::getDefaultEntityOwner’</pre><h4><strong>POSTing to EntityResource can now happen at /node, /taxonomy/term … instead of /entity/node, /entity/taxonomy_term …</strong></h4><p><a href="https://www.drupal.org/node/2737401">https://www.drupal.org/node/2737401</a></p><pre> * “https://www.drupal.org/link-relations/create&quot; = “/api/my-entity/{id}”</pre><pre> * “create” = “/api/my-entity/{id}”</pre><h4><strong>CSRF token route protection moved out of the REST module to be available to other core systems and contrib.</strong></h4><p><a href="https://www.drupal.org/node/2772399">https://www.drupal.org/node/2772399</a></p><pre>$response = $http_client-&gt;get(‘/rest/session/token’, [‘query’ =&gt; [‘_format’ =&gt; ‘hal_json’]]);</pre><pre>$response = $http_client-&gt;get(‘/session/token’, [‘query’ =&gt; [‘_format’ =&gt; ‘hal_json’]]);</pre><h4><strong>Forwards-compatibility shims of PHPUnit 8 functionality added for PHPUnit 6 &amp; 7</strong></h4><p><a href="https://www.drupal.org/node/3133050">https://www.drupal.org/node/3133050</a><br>We had to change some of our tests for compatibility with the new PHPUnit version.</p><pre>$this-&gt;assertContains</pre><pre>$this-&gt;assertStringContainsString</pre><h4><strong>Overridden test methods require void return type hints</strong></h4><p><a href="https://www.drupal.org/node/3114724">https://www.drupal.org/node/3114724</a></p><pre>protected function onNotSuccessfulTest(\Throwable $t) {</pre><pre>protected function onNotSuccessfulTest(\Throwable $t): void {</pre><h3>Thats it…</h3><p>Even though most of these changes had change records, I was not fully aware of all these breaking changes and I’m also not sure how realistic it is to keep track of everything. In the end it took about 4 full days to get all our code updated, tests debugged and code fixed. Looking at the list, it all seems like a very manageable set of changes for a project of this size. I can imagine most sites will be a lot easier to update. I guess having a decent amount of test coverage and debugging a couple of issues is probably a good enough way to deal with the changes. I’m curious how other teams handle this, so if you have a good way to maybe prevent some debugging in the future, please let me know!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81040c3b4dcf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>