I already fix this error but, since it takes me the whole morning, so I reported it help other users in the same situation.
Description of the Bug:
I defined a custom contemplate for a particular node type. When I clean the search index and execute the cron, it crash without error in the log and it display a white page.
Explanation:
In my case, I was defining function in the contemplate. The first time it use it (i.e. indexing only 1 new node or generating the node), everything is fine. The error only occur when doing the indexation because the contemplate is called multiple time and the function can only be defined once.
Solution:
Using 'function_exists' before declaring any function in the template.
Example:
if (!function_exists('myfunction')) {
function myfunction() {
...
}
}
Comments