Showing taxonomy description in “Taxonomy term” view in Drupal 7

Now that took some time to solve.  When viewing taxonomy term in Drupal 7, by default both term description and all matching nodes are shown.  However as soon as you enable   “Taxonomy term” view (in views 7.x-3.3 in my case), the description is gone. Getting it back is not very straightforward, but fortunately doable without any custom PHP code.

The answer was found here although it’s even simpler than rt_davies posted:

  1. Create a new view:
    • Name: Taxonomy description (or whatever you like)
    • DescriptionA view to display taxonomy description in taxonomy term view (if you want)
    • Show: Taxonomy terms
    • Click Continue & Edit
    • Fields > AddTaxonomy term: Term description (feel free to remove Taxonomy term: Name, if you like)
    • Advanced > Contextual filters > AddTaxonomy term: Term ID
  2. Edit the existing Taxonomy term view:
    • Header > AddGlobal: View area
      • View to insert: View: taxonomy_description – Display: default
      • Inherit contextual filters: check
    • Click Save (to save updated Taxonomy term view)

Phusion Passenger with Apache on RHEL 6 / CentOS 6 / SL 6 with SELinux

A brief guide:

  1. Install ruby and passenger dependencies
    yum -y install ruby zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel
  2. Install gem
    wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.17.tgz
    tar zxvf rubygems-1.8.17.tgz
    cd rubygems-1.8.17
    ruby setup.rb
  3. Install and build a Passenger for Apache
    gem install passenger
    passenger-install-apache2-module
  4. Create passenger.conf file in /etc/httpd/conf.d
    LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
    PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11
    PassengerRuby /usr/bin/ruby
  5. Create conf file for your Rails application
  6. Temporarily go into SELinux permissive mode
    setenforce 0
  7. Restart Apache
    /sbin/service httpd restart
  8. Start using your Rails application
  9. Walk through SELinux log and generate new SELinux policy module
    grep httpd /var/log/audit/audit.log | audit2allow -M passenger
  10. Install newly created SELinux module
    semodule -i passenger.pp
  11. Switch SELinux back into enforcing mode
    setenforce 1

Payment problems in Magento Paypal Standard with IPN after upgrade from 1.3.x to 1.4.0.1

Those who, after a seemingly successful upgrade from Magento 1.3.x to Magento 1.4.0.1, have problems with Magento acknowledging PayPal payments (changing order status from Pending Payment to Processing) and sending out New Order emails to their clients should do/check the following things:

  1. In PayPal: Go to My Account -> Profiles -> More Options -> Instant Payment Notification Preferences -> Edit Settings and change instant payment notification (IPN) URL in PayPal IPN settings from:
    http://www.yoursite.com/paypal/standard/ipn/

    to:

    http://www.yoursite.com/paypal/ipn/standard/
  2. In Magento admin panel: Go to Systems -> Configuration -> Payment Methods -> PayPal Website Payments Standard and check that Payment Action is set to Sale and New Order status to Processing
  3. In Magento code: In file Ipn.php located in app/code/core/Mage/Paypal/Model/Ipn.php find function:
    public function getIpnFormData($key = null)

    comment out line:

    //return isset($this->_ipnFormData[$key]) ? $this->_ipnFormData[$key] : null;

    and add the following line immediately after it:

    return isset($this->_ipnFormData[$key]) ? urldecode($this->_ipnFormData[$key]) : null;

This should do it.  Your order status should be changing from Pending Payment to Processing and emails should work also.

Установка 1С:Предприятия 8.1 на Red Hat Enterprise Linux 5 (RHEL 5, CentOS 5)

Для установки сервера 1С:Предприятия 8.1 (без Web Services) и PostgresSQL 8.2 понадобятся следующие пакеты:

  • 1C_Enterprise-server
  • 1C_Enterprise-server-nls
  • 1C_Enterprise-common
  • 1C_Enterprise-common-nls
  • postgresql
  • postgresql-server
  • postgresql-contrib
  • postgresql-libs

Пошаговые инструкции:

  1. Устанавливаем сервер 1С:Предприятия 8.1
    rpm -ivh 1C_Enterprise-common-8.1.11-67.i386.rpm 1C_Enterprise-common-nls-8.1.11-67.i386.rpm 1C_Enterprise-server-8.1.11-67.i386.rpm 1C_Enterprise-server-nls-8.1.11-67.i386.rpm
  1. Устанавливаем PostgresSQL 8.2
    rpm -ivh postgresql-8.2.4-6.1C.i386.rpm postgresql-contrib-8.2.4-6.1C.i386.rpm postgresql-server-8.2.4-6.1C.i386.rpm postgresql-libs-8.2.4-6.1C.i386.rpm
  1. Инициализируем кластер PostgresSQL с локалью ru_RU.utf8 для русского языка или uk_UA.utf8для украинского:
    su - postgres -c 'initdb --locale=uk_UA.utf8 -D /var/lib/pgsql/data/'
  1. Отключаем пароли на подключение к PostgresSQL, заменяя в файле /var/lib/pgsql/data/pg_hba.conf строку
    host   all     all    0.0.0.0/0    md5

    на

    host   all     all    0.0.0.0/0    trust
  2. Запускаем PostgresSQL
    /sbin/service postgresql start
  3. Подключаемся к PostgresSQL
    psql -h localhost postgres postgres

    меняем пароль пользователя postgres

    ALTER USER postgres PASSWORD 'new_password';

    и выходим \q

  4. Включаем пароли на подключение к PostgresSQL, заменяя в файле /var/lib/pgsql/data/pg_hba.confстроку
    host   all     all    0.0.0.0/0    trust

    на

    host   all     all    0.0.0.0/0    md5
  5. Перезапускаем PostgresSQL
    /sbin/service postgresql restart

Если у Вас установлен Apache и возникают проблемы с библиотеками при замене родного системного PostgresSQL 8.1 на 8.2 – читаем Installing the PostgreSQL 8.2 RPMs on RHEL 5/CentOS 5

Вкратце, при апгрейде postgresql-libs с версии 8.1 до версии 8.2, библиотека libpq.so.4 заменяется на libpq.so.5. Однако libpq.so.4 необходима для системного httpd Apache и после апгрейда postgresql-libs с версии 8.1 до версии 8.2, httpd Apache станет не работоспособным.

Для решения проблемы достаточно установить compat-postgresql-libs (compat-postgresql-libs-4-1PGDG.rhel5.i686.rpm) с опцией замены файлов

rpm -iv --replacefiles compat-postgresql-libs-4-1PGDG.rhel5.i686.rpm

compat-postgresql-libs также содержит libpq.so.4 и после его установки апгрейд postgresql-libs с версии 8.1 до версии 8.2 становится возможным, так как с удалением postgresql-libs версии 8.1, libpq.so.4 поставляется пакетом compat-postgresql-libs.

Скачать compat-postgresql-libs можно здесь: http://www.postgresql.org/ftp/binary/v8.2.7/linux/rpms/redhat/rhel-5-i386/

SELinux and Samba

Those who installed Samba on RHEL or any other SELinux enabled distribution may have faced the problem when they actually cannot access any Samba shares from their Windows machines. Samba logs in /var/samba/log may show lots of such messages:

[2007/07/03 16:37:44, 0] smbd/service.c:make_connection_snum(911)  '/opt/blah' does not exist or permission denied when connecting to [blah]   Error was Permission denied

This is probably an SELinux problem and to fix it you’ll need to execute:

chcon -t system_u:object_r:samba_share_t /opt

or, in order to survive relabel:

  • add these lines to /etc/selinux/targeted/contexts/files/file_contexts.local file (if you are using targeted policy):
    /opt(/.*)?  system_u:object_r:samba_share_t:s0
  • probably, reboot
  • execute:
    restorecon -R /opt/

This will set appropriate SELinux context on all files in /opt directory and SELinux won’t prevent Samba access anymore.

To allow Samba to share your home directories with SELinux execute the following:

setsebool -P samba_enable_home_dirs 1

Fedora Legacy Shutdown

Fedora Legacy project announced shutdown on February 9th, 2007. It is definitely bad news for Fedora unless Fedora people understand what they do and do this on purpose. They just dropped Server spin from Fedora 7 release and now there is no way to get security updates beyond 18 month period for older Fedora releases.

We have several servers running Fedora and this means that now we must be thinking about either upgrading them to the most recent release of Fedora every 18 months or consider changing the Linux distribution we rely on. An upgrade every 18 months may not sound that bad for a workstation, but for a fully configured server it is definitely a hassle, taking into account many issues that can arise.

I do hope Fedora guys reconsider their support policy for maintenance distributions. However it is quite possible that Red Hat endorsed Fedora Legacy shutdown to drive more people toward Red Hat Enterprise Linux, in which case the chances for reconsideration are quite low.

Google July 27

On July 27, exactly one month after June 27, one of our larger web sites Multiplex Systems Store regained its position for all competitive sets of keywords. What exactly caused the problem still remains a question, but this is something that is referred to as “data refresh” by Matt Cutts.

As a preventive measure for future, we are launching a static web site GSM Modem devoted exclusively to GSM modems, including GSM/GPRS/EDGE modules, terminals, PC cards and other equipment. The content is not there yet (just the domain) but we plan to add it soon. Initially it will be in Russian, but we may add Ukrainian and English content.