<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="http://tech.saigonist.com/taxonomy/term/2/all" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Drupal</title>
    <link>http://tech.saigonist.com/taxonomy/term/2/all</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Solving Error: Cannot use * as String because &#039;String&#039; is a special class name</title>
    <link>http://tech.saigonist.com/b/drupal/solving-error-cannot-use-string-because-string-special-class-name</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 25, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/drupal-8&quot;&gt;drupal 8&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/php-7&quot;&gt;php 7&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/oop&quot;&gt;oop&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;If you&#039;ve ever seen an error message in your PHP 7 website about &#039;String&#039; being a special class name, e.g. &lt;code&gt;Error: Cannot use Drupal\Component\Utility\String as String because &#039;String&#039; is a special class name in /Users/jesus/drush/commands/core/watchdog.drush.inc, line 4&lt;/code&gt;, the reason is that String is now a reserved class name as of PHP 7. So your code that worked fine on PHP 5.7 and earlier will now be broken. This affects Drupal but could affect any old PHP site with a class called String.&lt;/p&gt;

&lt;p&gt;This is a problem with Drupal 8 which moved to an OOP-everywhere approach, so...&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Fri, 25 Mar 2016 14:58:00 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">85 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>Drupal 8: Get the current Node&#039;s NID </title>
    <link>http://tech.saigonist.com/b/drupal/drupal-8-get-current-nodes-nid</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 19, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/php&quot;&gt;php&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Theming Drupal can be like working with layers of an onion. There are layers and layers and sometimes cutting through makes you cry. Besides not knowing what theme function or template file one must use (Drupal 8 helps with the knowing part with html comments) there is the big problem of global state and context, and the theme layer you&#039;re trying to use might be missing some context. The major example is that you want some block to be aware of the node on the page. (This is a problem which React.js helps deal with by passing state from parent to child component via props.)&lt;/p&gt;

&lt;p&gt;But...&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Sat, 19 Mar 2016 07:56:12 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">82 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>Solve mysterious Drupal initial page load delay with cron</title>
    <link>http://tech.saigonist.com/b/drupal/solve-mysterious-drupal-initial-page-load-delay-cron</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 17, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/cron&quot;&gt;cron&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/crontab&quot;&gt;crontab&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/unix&quot;&gt;unix&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Sometimes you&#039;ll visit your Drupal site in the morning, or after logging in as admin for the first time in awhile, and the page will take forever to load, more than 30 seconds, even longer. (First, if you&#039;re using Cloudflare CDN, it could be a problem with their servers not sending the end of the page html when it&#039;s finished and thus causing the browser to hang for a long time.)&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;main cause&lt;/em&gt; of this kind of page load lag is Drupal&#039;s &lt;em&gt;cron task&lt;/em&gt;! There are two ways that Drupal will run cron. The first is when you trigger it externally (by pinging the cron.php url,...&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Thu, 17 Mar 2016 05:54:00 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">76 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>The .htaccess file in Drupal 7 / Drupal 8</title>
    <link>http://tech.saigonist.com/b/drupal/htaccess-file-drupal-7-drupal-8</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 17, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/htaccess&quot;&gt;htaccess&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/apache&quot;&gt;apache&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;An &quot;htaccess&quot; file is a configuration file read and used by the Apache web server to configure settings local to your website or even just a subdirectory in the website. These are local settings as opposed to what you would configure in .conf files in Apache&#039;s conf directory.&lt;/p&gt;

&lt;p&gt;There should be a dot in the filename: &lt;code&gt;.htaccess&lt;/code&gt; - and so the file will often be hidden or invisible in directory listings unless you specify that hidden or system files should appear. But the file should exist in any Drupal installation in the top-most directory of Drupal (next to the README and...&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Thu, 17 Mar 2016 04:18:37 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">74 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>Installing Drupal 8 (with differences between Drupal 7) on your web host</title>
    <link>http://tech.saigonist.com/b/drupal/installing-drupal-8-differences-between-drupal-7-your-web-host</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 16, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/drush&quot;&gt;drush&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Drupal 8 is out and many of the necessary modules have been ported to version 8. Drupal 8 is quite different under the hood from Drupal 7. But it&#039;s also fun to play with straight out of the box so let&#039;s spin up a new Drupal 8 demo installation. All of this assumes you have shell access, even if you don&#039;t normally use the command line, but should be applicable whether ssh&#039;ed to a remote Linux server or testing locally on your Mac OS X laptop. To install Drupal 8 then:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;&lt;p&gt;Download Drupal 8 (.tar.gz) and untar it in your web root. (As of publication, the most recent version is&lt;/p&gt;&lt;/li&gt;...&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Wed, 16 Mar 2016 09:04:00 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">72 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>Drupal SEO in 2016: URLs</title>
    <link>http://tech.saigonist.com/b/drupal/drupal-seo-2016-urls</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 7, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/seo&quot;&gt;seo&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/301-redirect&quot;&gt;301 redirect&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/htaccess&quot;&gt;htaccess&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/google-webmaster-tools&quot;&gt;google webmaster tools&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;SEO is a moving target. For blackhat SEOs, it&#039;s a constant back and forth cat-and-mouse game between them and Google. And the potential penalties by Google against sites employing blackhat tactics should be enough to encourage you as a site owner to focus your efforts on whitehat SEO. Drupal has a lot of tools which can help site builders format their content to be easily understood and categorized by search engines. And one of those factors which Google uses is the page&#039;s URL.&lt;/p&gt;

&lt;p&gt;So it&#039;s important to pay attention to a few things related to URLs in your Drupal config.&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;&lt;/li&gt;...&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Mon, 07 Mar 2016 10:09:00 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">59 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>How to  Use Drupal 7 Views to Count Content</title>
    <link>http://tech.saigonist.com/b/drupal/how-use-drupal-7-views-count-content</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 5, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/views&quot;&gt;views&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Here&#039;s how to quickly use Views UI to count content in your Drupal database. You can then display the counts as Blocks or even pages or just use them internally as site admin. The only prerequisite is to have Views and VIews UI enabled.&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;Create a new view of content (aka nodes). Leave out sorting! (Sorting/ordering won&#039;t be visible in the count anyways but can prevent counting from working.)&lt;/li&gt;
&lt;li&gt;Under &lt;code&gt;Advanced&lt;/code&gt; settings, enable &lt;code&gt;Use aggregation&lt;/code&gt; to Yes.&lt;/li&gt;
&lt;li&gt;Under &lt;code&gt;FIELDS&lt;/code&gt;, only use one main field, such as a title or nid. There should&lt;/li&gt;...&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Sat, 05 Mar 2016 07:58:34 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">58 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>Querying the database in Drupal 7 using db_select</title>
    <link>http://tech.saigonist.com/b/drupal/querying-database-drupal-7-using-dbselect</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 4, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/sql&quot;&gt;sql&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/mysql&quot;&gt;mysql&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/php&quot;&gt;php&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/database&quot;&gt;database&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Drupal, unlike plain old blog software, gives you the ability to create custom content object types with backing storage in the database as custom tables, doing all this without requiring any programming knowledge. When you create a new custom Content Type and add fields to it, in effect, you are creating a new database table for those fields.&lt;/p&gt;

&lt;p&gt;Drupal also gives you ways to access and query the data without writing code. The most powerful form of this is Views, which every Drupal site should install as soon as starting. In the Views UI, you can select which fields (database columns...&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Fri, 04 Mar 2016 04:11:00 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">55 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>Adding Facebook sharing/liking buttons to Drupal 7 content</title>
    <link>http://tech.saigonist.com/b/drupal/adding-facebook-sharingliking-buttons-drupal-7-content</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;November 30, 2015&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/facebook&quot;&gt;facebook&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;h1&gt;Drupal 7 Facebook Sharing Widget Module Decision Workflow:&lt;/h1&gt;

&lt;ol&gt;&lt;li&gt;Do you just want Facebook or do you want every social media service under the sun (Twitter, Pinterest, Reddit, Google+, LinkedIn, etc.). There are a number of smaller services which are like Facebook for a niche. Some countries have their own, especially China. Other major social networks like YouTube or Instagram aren&#039;t places to share general blog content. &lt;/li&gt;
&lt;li&gt;Do you want to add a Like button or a Share button? People tend to Like things more than they Share. Likes across Facebook are aggregated/added&lt;/li&gt;...&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Mon, 30 Nov 2015 15:47:00 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">16 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>Set up free hosting for Drupal 7 on OpenShift Online</title>
    <link>http://tech.saigonist.com/b/drupal/set-free-hosting-drupal-7-openshift-online</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;October 24, 2015&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/openshift&quot;&gt;openshift&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/drupal&quot;&gt;drupal&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;If you&#039;re reading this, it means OpenShift is working. It means Drupal is set up using a free tier &quot;gear&quot; on RedHat&#039;s OpenShift PaaS. It&#039;s actually not completely easy for those of you used to a real VPS for hosting, and it&#039;s not any easier for those who are used to FTP-only shared hosting either. But you won&#039;t have to bother installing an OS, or installing Apache, PHP, and MySQL. On the other hand, you won&#039;t have much control over which version of those you run unless you code your own OpenShift &quot;cartridges&quot; which is much more work than simply installing packages on a server. ...&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Sat, 24 Oct 2015 15:21:00 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">6 at http://tech.saigonist.com</guid>
  </item>
  </channel>
</rss>
