I upgraded to the 5.x-3.0-beta version today and with the module enabled, I receive the following error in the Apache error log and am unable to navigate my site without getting a white screen.

[Thu Feb 21 19:41:36 2008] [error] [client 192.168.1.5] PHP Fatal error:  Cannot redeclare phptemplate_username() (previously declared in /usr/local/apache2/htdocs/drupal/sites/all/modules/activity/activity.module:548) in /usr/local/apache2/htdocs/drupal/themes/newsflash/template.php on line 181

Comments

sirkitree’s picture

Status: Active » Needs review
StatusFileSize
new2.21 KB

Yeah, I think I'm going to take this out of the 5.x-3 branch. Seems to be causing more problems then it is worth. I'll but it back in if someone comes up with a better way to implement. Thought I'm surprised that it gives you this considering it does a check if (!function_exists('phptemplate_username') {... so this might be the first implementation in the module order of things. In any case, I'll mark this as fixed as soon as beta 2 is released.

WISEOZ’s picture

Thank you! The patch worked for that one error.

I am now getting this error on the activity screen. Do you want me to log this as a separate issue?

   * warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "activity_targets" does not exist in /usr/local/apache2/htdocs/drupal/includes/database.pgsql.inc on line 125.
    * user warning: query: SELECT COUNT(*) FROM activity_targets at INNER JOIN activity a ON a.aid = at.aid WHERE at.target_uid = -1 in /usr/local/apache2/htdocs/drupal/includes/database.pgsql.inc on line 144.
    * warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "activity_targets" does not exist in /usr/local/apache2/htdocs/drupal/includes/database.pgsql.inc on line 125.
    * user warning: query: SELECT a.*, at.target_uid, at.target_role FROM activity_targets at INNER JOIN activity a ON a.aid = at.aid WHERE at.target_uid = -1 ORDER BY a.created DESC LIMIT 20 OFFSET 0 in /usr/local/apache2/htdocs/drupal/includes/database.pgsql.inc on line 144.
webappl’s picture

I'm using template.php in my theme and your code

if (!function_exists('phptemplate_username')) {
  ...
}

is not working for me. But

if (!is_callable('phptemplate_username', true)) {
  ...
}

does the trick.

jaydub’s picture

Status: Needs review » Closed (fixed)

No longer applies