Drupal modules weights - để quản lý and execution order

Drupal modules weights - để quản lý and execution order

One of the good features that Drupal offers to the developer is the module execution order. Out of the box, Drupal has a mechanism to allow it to execute module's hooks in predefined order based on modules weight (order). If you check your Drupal installation's database, there will be a table in your database called system, in this table Drupal stores all the modules and themes (core and contributed) information, including their execution order which is visible in the weight column.

Drupal modules weights - để quản lý and execution order

Most of you developers, found your selves in a situation where some of you custom code is not working. Well, most of the time this issue is caused by some other module overriding what you did, or that your module is not executing in the "layer" it should.

To solve this issue, I used to just go directly to my MySQL client and update the module's weight in the systemtable. But..... What if you don’t have access to the database? What if you do want a nicer way to see the order in which modules are executed?

To solve this issue you might consider using Modules Weight module, this module allows the admins or the webmaster with privilege to access the administration page of this module and modify the modules weight as he/she wishes with a drag-drop feature.

Note: This module by default doesn't display the core modules, that's because displaying core modules in the configuration form will reorder the system core modules execution even if you didn't change them! And as some might notice all core modules has to have 0 weight value by default.

Bạn thấy bài viết này như thế nào?: 
No votes yet
Ảnh của Tommy Tran

Tommy owner Express Magazine

Drupal Developer having 9+ year experience, implementation and having strong knowledge of technical specifications, workflow development. Ability to perform effectively and efficiently in team and individually. Always enthusiastic and interseted to study new technologies

  • Skype ID: tthanhthuy

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
bkav.com.vn có lượt truy vấn DNS nhiều hơn cả Facebook lẫn Google

bkav.com.vn có lượt truy vấn DNS nhiều hơn cả Facebook lẫn Google

Tại buổi ra mắt BKAV 2013 hôm nay 7/5, hãng bảo mật cho biết bkav.com.vn có lượt truy vấn DNS nhiều hơn cả Facebook lẫn Google làm mọi người ngỡ ngàng. Tại sao như vậy?

Phần 1: Apache Solr - Hướng dẫn Creating Custom Fields

This is the first of two blog posts. In this one I will show you how to create a custom search index in Apache Solr

New iPad lại trục trặc với kết nối Wi-Fi

New iPad lại trục trặc với kết nối Wi-Fi

Một số khách hàng đã phàn nàn rằng iPad mới kết nối Wi-Fi kém hơn nhiều so với những mẫu iPad trước đây của Apple.

Công ty diệt chuột T&C

 

Diet con trung