Drupal

Tagged content

By Selwyn Polit, Wed, 08/25/2021 - 08:05

Using Drupal 7, I needed to programattically add a useragent field (webform calls these components) and a url field to my webform nid 7477.  The url field is a hidden field of type: Hidden element (less secure, changeable via JavaScript.)  If you leave off the extra array in the url definition, it will be the normal hidden type.  You can see this when you click the edit button for this component.  I hope someone finds this useful.

By Selwyn Polit, Wed, 08/25/2021 - 08:05

 

When you use homebrew to install php 7.1 it will cleverly install php-fpm which listens on port 9000.  This is the default port for xdebug, so if you want to debug php scripts in a lando container, you will have some challenges.

TL;DR

If you've installed php 7.1 with homebrew, it listens on port 9000 so you will need to change the containers php.ini port specification to another port.  e.g.

xdebug.remote_port=9001

Then tell phpstorm to listen on port 9001

By Selwyn Polit, Wed, 08/25/2021 - 08:05

Recently I suspected I had a problem in my mysql databases on my webserver, so I ran the following command:

mysqlcheck -u root -p'put-your-database-password-here' --all-databases

I got a neat list of databases and tables and messages saying some tables are OK and some not. Notice that I cleverly replaced my database root password with the phrase put-your-database-password-here, so you should replace that with your password if you want to try this.  BTW it seems you can ignore the warnings about client using or not closing tables.

By Selwyn Polit, Wed, 08/25/2021 - 08:05

I've been noticing these messages lately on some of my Drupal 6 sites. These popped up any time I saved any content.

warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /var/www/polycotassociates.com/modules/node/node.module on line 814.

By Selwyn Polit, Wed, 08/25/2021 - 08:05

When making a copy of a drupal 7 site, I often need to disable outgoing emails.  I found a useful module called maillog that does the job well.  It also logs all emails so you can easily see what the site is sending out.  You can find it at http://drupal.org/project/maillog

After enabling the module, you can configure it at admin/config/development/maillog

You can disable all email by unclicking the checkbox : Allow the e-mails to be sent.

By Selwyn Polit, Wed, 08/25/2021 - 08:05

Panels tabs are (like so many things in Drupal) pretty easy once you know the exact steps.  Using Drupal 7.20, Panels version 7.x-3.3, Ctools 7.x-1.2.  you can make a page that has horizontal tabs along the top.  It doesn't require any additional modules.

 

By Selwyn Polit, Wed, 08/25/2021 - 08:05

On Drupal 7 sites I always spend time in the content view.  That is the one at admin/content.  I usually install the views bulk operation module so I get these cool new views that I can easily tweak.  What a pleasure!  Recently I was on a site that had the administration views module installed.  This replaces the default views for content and comment (and more.)  Unfortunately the link for editing the view that is

By Selwyn Polit, Wed, 08/25/2021 - 08:05

If you check Drupal 7 module updates and you get messages indicating no available releases found for modules that you know are legitimate.  It usually looks something like this.  The URL is ../admin/reports/updates  There is a quick fix: