Drupal 4.7.x

A few tricks for translation managers

For speed-up your work with a huge *.po files You always can do some optimization

Clearing untranslated messages (especially if Your file greater than 2M 8))

msgattrib -s --no-location --translated huge.po > clean_file_for_import.po

very usefull tip - remove duplicates

msguniq -u --no-location --strict with_duplicates.po > clean_file_for_import.po

Good luck!

Possible Cause: Duplicate module folder

Possible Cause:
There is one or multiple copies of the same module folder.

Fix:
For example in my case the error returns Fatal error: Cannot redeclare system_requirements() (previously declared in /modules/system/system.install:12) in /modules/modules/system/system.install on line 299

    1. Search for duplicate(s) module folder thats triggering the error. In my case I search for a duplicate system folder.
    2. I found two folders with the same name system. The first one is located under modules/system. And the second one is located under modules/modules/system
    3. To fix this delete the duplicate folder(s). In my case I delete the system folder located under modules/modules/system

If above fix isn't working try the same above steps but search for duplicate(s) inside the other modules folder located under sites/all/modules

Possible Cause: A function got declared inside of another function

Possible Cause:
A function got declared inside of another function (i.e. “}” in the wrong place)

function listing_form_alter($form_id, &$form){
  if($form_id == 'listing_node_form'){
    //do stuff
  }

function listing_form(){
//do stuff
}//end listing_form

}//end listing_form_alter

Fix:
Move the function.

function listing_form_alter($form_id, &$form){
  if($form_id == 'listing_node_form'){
   //do stuff
  }
}//end listing_form_alter

function listing_form(){
//do stuff
}//end listing_form

Possible Cause: Module and theme use same name

Possible cause:
An installed module conflicts with an installed theme, (i.e. they both have the same name).

Fix:
Rename one of them.

Possible Cause: Two modules bundle the same third party library

Possible Cause:
Duplicate includes of third party libraries (i.e. when two modules bundle the same third party library) could also trigger this.

Fix:
Do the find-in-files to identify the problem, and inquire with the respective module projects.

Possible Cause: Two functions with the same name

Possible Cause:
Because, EVERY file in themes/*/*.module and themes/*/*.theme is evaluated once, if a module is created by copying an existing module, and the module developer did not rename every function inside the module directory structure, you could have two functions (albeit in separate locations) with the same name.
The first function will be evaluated, and the second will throw an error.

Fix:

  1. Do a global search for the function name thats triggering the error.
  2. Rename or remove the duplicate function

Note: All files of the form *.module will be evaluated. Utilize an alternate extension like *.module.bak to prevent drupal from scanning the old file.

Syndicate content
 
 

Drupal is a registered trademark of Dries Buytaert.