Drupal 4.5.x or older
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
- Search for duplicate(s) module folder thats triggering the error. In my case I search for a duplicate
systemfolder. - I found two folders with the same name
system. The first one is located undermodules/system. And the second one is located undermodules/modules/system - To fix this delete the duplicate folder(s). In my case I delete the
systemfolder located undermodules/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_alterFix:
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_formPossible 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:
- Do a global search for the function name thats triggering the error.
- 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.
What does the % sign mean in -- node/%node/outline
Hi
What does the percentage sign mean in:
node/%node/outline
Is it a wildcard symbol?
Kind Regards,
Adrian Smith
