<?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[RKD Digital - Medium]]></title>
        <description><![CDATA[All the blogs and news from RKD Digital, typically including PHP, Javascript and other web development related tutorials and bits. - Medium]]></description>
        <link>https://medium.com/rkd-digital?source=rss----e73f9a7836f3---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>RKD Digital - Medium</title>
            <link>https://medium.com/rkd-digital?source=rss----e73f9a7836f3---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 13:58:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/rkd-digital" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Grunt Watch in Magento2 — Extend.less not reflecting changes on site]]></title>
            <link>https://medium.com/rkd-digital/grunt-watch-in-magento2-extend-less-not-reflecting-changes-on-site-78ea0c1b66cf?source=rss----e73f9a7836f3---4</link>
            <guid isPermaLink="false">https://medium.com/p/78ea0c1b66cf</guid>
            <category><![CDATA[magento-2]]></category>
            <category><![CDATA[magento]]></category>
            <dc:creator><![CDATA[Robert Kent]]></dc:creator>
            <pubDate>Thu, 14 Dec 2017 12:29:43 GMT</pubDate>
            <atom:updated>2017-12-14T10:18:35.126Z</atom:updated>
            <content:encoded><![CDATA[<p>I spent approximately half a day trying to figure out why my _extend.less file doesn’t update the master stylesheet (and therefore show my changes) in Magneto 2.</p><p>There are a lot of stack overflows and small blogs showing that files and folders need to be cleared, static cache needs to be emptied and hair needs to be pulled out in order for it to work.</p><p>I tried all of these and sure enough my changes showed up. However when running Grunt Watch — the changes didn’t take effect. Which meant that each change to the .less file required another static-cache clear-out. This isn’t how I roll…</p><p>What did work however, was making sure my dev/tools/grunt/configs/local-themes.js was set up correctly.</p><p>The prerequisites are the following:</p><ol><li>Create your Magento 2 Theme like a good Magento 2 developer as per the documentation</li><li>Put Magento 2 into developer mode (php bin/magento deploy:mode:set developer)</li><li>Keep the cache turned on (unless you want to make a brew between each refresh)</li><li>Set up Grunt as per the documentation</li></ol><p>Then you want to do what all the other blog posts and SO questions tell you — clear the decks. To do this I typically make a small file within the bin directory of the Magento 2 installation (/path/to/store/bin — where bin/magento lives). I called this one “dev”:</p><pre>php magento deploy:mode:set developer<br>php magento cache:disable<br>php magento cache:flush<br>rm -rf ../generated/*<br>rm -rf ../var/cache/*<br>rm -rf ../var/view_preprocessed/*<br>rm -rf ../var/page_cache/*<br>rm -rf ../pub/static/*<br>php magento cache:enable<br>cd ..<br>grunt refresh<br>grunt watch</pre><p>So this sets everything up for me — makes sure we’re in developer mode, disables cache, clears it — clears some folders, enables cache — then runs grunt from the root Magento 2 installation. To run it just type “bash dev” or simply “dev” if you’re already in bash.</p><p>All I want to do is extend the Blank theme — so the documentation states to simply add an _extend.less file into &lt;module&gt;/&lt;theme&gt;/web/source/_extend.less</p><p>This is fine — but gets confusing — as when I run grunt watch I see that only the _extend.css file is updated.</p><p>What you need to do is to make sure that (f you are extending blank or luma) you specify the <strong>styles-l</strong> and <strong>styles-m</strong> in your grunt configuration as well as the _extend.</p><pre>custom: {<br>    area: &#39;frontend&#39;,<br>    name: &#39;custom/default&#39;,<br>    locale: &#39;en_GB&#39;,<br>    files: [<br>        &#39;css/source/_extend&#39;,<br>        <strong>&#39;css/styles-m&#39;,<br>        &#39;css/styles-l&#39;</strong><br>    ],<br>    dsl: &#39;less&#39;<br>},</pre><p>You don’t actually have to have these files in your custom theme — I simply only have the _extend.less. But when you edit _extend.less, it will also refresh your styles-l and styles-m taking into account your extend changes.</p><p>Now you should be able to simply edit the _extend.less file and see your changes updated without having to clear anything out!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78ea0c1b66cf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rkd-digital/grunt-watch-in-magento2-extend-less-not-reflecting-changes-on-site-78ea0c1b66cf">Grunt Watch in Magento2 — Extend.less not reflecting changes on site</a> was originally published in <a href="https://medium.com/rkd-digital">RKD Digital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Files stuck in your local .git]]></title>
            <link>https://medium.com/rkd-digital/files-stuck-in-your-local-git-461b4742d302?source=rss----e73f9a7836f3---4</link>
            <guid isPermaLink="false">https://medium.com/p/461b4742d302</guid>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Robert Kent]]></dc:creator>
            <pubDate>Wed, 23 Aug 2017 19:14:38 GMT</pubDate>
            <atom:updated>2017-08-23T19:14:38.078Z</atom:updated>
            <content:encoded><![CDATA[<h3>Files stuck in your local .git working copy but won’t stash or remove — Source Tree shows no changes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wj7aC2LcJASgUYGXFd1bjQ.jpeg" /></figure><p>There’s one troublesome issue with SourceTree (or perhaps any other GUI program for .git management) — it never shows you the entire picture.</p><p>I got into a “kerfuffle” with a branch that wouldn’t delete, wouldn’t switch, couldn’t stash, couldn’t force checkout. Literally everything I tried had no effect whatsoever.</p><p>Source Tree was giving me nothing — it simply showed a list of files that had been “modified” without changing any of the code (even <strong>git status </strong>showed me precious little).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YZ4rz17fAE9wsDgx5319AQ.jpeg" /><figcaption>The default git status doesn’t show much</figcaption></figure><p>This got me searching and thinking — what could change a file without changing any code? At first I thought meta data — I’ve obviously grabbed these new files from someone else — their machine must have stamped them or something? Stupid. If this was the case then it’d happen to every file, every time…</p><p><strong>Permissions.</strong></p><p>Yes, that’s right — what can change a file without changing the code? Permissions. Stick that in a cracker.</p><p>To test this you can simply do a git diff &lt;file&gt; (you should really do this first — before trying to think too hard…)</p><p>This should give you the following result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*9lhgBzrnv-E8yr77IWAI8w.jpeg" /><figcaption>Those pesky permissions</figcaption></figure><p>Clear as day right? Old mode was 644 — new mode is now 755. A file permission change. Use “:q” to exit.</p><p>So how do we fix this? Well we could reset the file permissions for all the files but my guess is — the other colleague will not be too pleased about it.</p><p>Instead you can choose not to track file permission changes (just remember to perform them locally / remotely if required):</p><p><strong>git config core.fileMode false (or true)</strong></p><p>This will clear out your Source Tree and git status.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=461b4742d302" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rkd-digital/files-stuck-in-your-local-git-461b4742d302">Files stuck in your local .git</a> was originally published in <a href="https://medium.com/rkd-digital">RKD Digital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Convert a Simple product into a Configurable product in Magento 1.x — one at a time]]></title>
            <link>https://medium.com/rkd-digital/convert-a-simple-product-into-a-configurable-product-in-magento-1-x-one-at-a-time-4005f9c970ae?source=rss----e73f9a7836f3---4</link>
            <guid isPermaLink="false">https://medium.com/p/4005f9c970ae</guid>
            <category><![CDATA[magento]]></category>
            <dc:creator><![CDATA[Robert Kent]]></dc:creator>
            <pubDate>Mon, 14 Aug 2017 11:45:38 GMT</pubDate>
            <atom:updated>2017-08-14T11:45:38.269Z</atom:updated>
            <content:encoded><![CDATA[<p>There are a few ways to convert simple products into configurable in Magento — and if you only need to convert a small number AND you are pretty tech-savvy your best bet might be to make a small edit to the database.</p><p>Here are 4 simple steps to take.</p><ol><li>Inside your database find your <em>catalog_product_entity</em> table, locate the product you wish to change and replace the type_id column for your product from “simple” to “configurable”</li><li>Go back into your Magento admin <em>Catalog &gt; Manage Products</em> and find your product in here — you should now see that it is a configurable product. Click on it and you should be asked which attributes to make your child products with. Choose your attribute and continue.</li><li>On the edit product page — click “<strong>Save and Continue Edit</strong>”. This is important — as this will do a few things in the background to enable you to add child products.</li><li>Once your product is saved you can now go ahead and create your associated products — these should now save correctly</li></ol><p>If you forget to perform step number 3 — the first time you try to create an associated product it will bug-out. Especially when you try to create a second one. Don’t worry! Just click Save and Continue and remove the broken products you just created back on the manage product page.</p><p>So there you have it — one small database change and the rest in CMS. Obviously this might become tedious if you have thousands which is where import/export spreadsheets come into play!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4005f9c970ae" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rkd-digital/convert-a-simple-product-into-a-configurable-product-in-magento-1-x-one-at-a-time-4005f9c970ae">Convert a Simple product into a Configurable product in Magento 1.x — one at a time</a> was originally published in <a href="https://medium.com/rkd-digital">RKD Digital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WordPress Regenerate Thumbnails issue & PHP GD Library]]></title>
            <link>https://medium.com/rkd-digital/wordpress-regenerate-thumbnails-issue-php-gd-library-1f2949d781b7?source=rss----e73f9a7836f3---4</link>
            <guid isPermaLink="false">https://medium.com/p/1f2949d781b7</guid>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Robert Kent]]></dc:creator>
            <pubDate>Mon, 14 Aug 2017 11:10:30 GMT</pubDate>
            <atom:updated>2017-08-14T11:11:10.765Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eucz42SeZsOC-mFLSye-QA.jpeg" /></figure><p>If you’re familiar with WordPress you’ll know that you can create different image sizes for all of your images on your website / blog and regenerate all the thumbnail sizes you’ll need with plugins such as <a href="https://en-gb.wordpress.org/plugins/regenerate-thumbnails/">Regenerate Thumbnails</a> (keep old unused image sizes) and <a href="https://en-gb.wordpress.org/plugins/force-regenerate-thumbnails/">Force Regenerate Thumbnails</a> (remove all unused image sizes).</p><p>Pretty old news for WordPress developers I know, but what I came across recently, had me stumped for a good 30 minutes or so. Which is where a quick post about a problem might save someone else 30 minutes!</p><p>The problem occurred when using these plugins on a staging server that did not have the <a href="http://php.net/manual/en/book.image.php">PHP GD library</a> installed. Unfortunately, the regenerate thumbnails plugin does not produce an error — in fact it’s quite the opposite. The images are regenerated blazingly fast!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*cbqvHWnLprWgLDdkrDlJyQ.jpeg" /><figcaption>Without GD library a thumbnail was generate in 0.216 seconds</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*nHwxKkRIjdffE_Y3Oz-uqQ.jpeg" /><figcaption>This increased to 4.105 seconds with GD library installed</figcaption></figure><p>At first I figured that perhaps the problem lay in file and folder permissions within the <em>wp-content/uploads</em> directory. But after playing around with this for several minutes and doing some testing, it turns out that the 0.216 seconds isn’t the result of a ferrari-esque server or incorrect permissions — it simply skips the file with a success message.</p><p>Comparing my local environment to the staging is always a little tricky, but thankfully a little voice in the back of my head took a guess at the solution as being either ImageMagik or GD — both of which I had to install manually when I set up my local environment.</p><p>A quick and easy way to check if you have this problem is to spit out a yes/no for a check on whether this extension is installed. If you paste the following into your functions.php you should be able to see an HTML comment near the bottom of your website source-code with a clear message as to whether or not your GD library is installed.</p><pre><strong>function </strong>check_if_gd_installed() {<br>    <strong>if </strong>(!extension_loaded(&#39;gd&#39;)) {<br>        <strong>echo </strong>&quot;&lt;!-- GD library not installed --&gt;&quot;;<br>    } <strong>else </strong>{<br>        <strong>echo </strong>&quot;&lt;!-- GD Library installed --&gt;&quot;;<br>    }<br>}<br>add_action( &#39;wp_footer&#39;, &#39;check_if_gd_installed&#39; );</pre><p>One you’ve installed the library and tested — remove this script and get on with regenerating those thumbnails!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f2949d781b7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rkd-digital/wordpress-regenerate-thumbnails-issue-php-gd-library-1f2949d781b7">WordPress Regenerate Thumbnails issue &amp; PHP GD Library</a> was originally published in <a href="https://medium.com/rkd-digital">RKD Digital</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>