CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Cannot redeclare error problem when listing civevents
Pages: [1]

Author Topic: Cannot redeclare error problem when listing civevents  (Read 1047 times)

catya

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
Cannot redeclare error problem when listing civevents
May 29, 2008, 06:04:41 am
Hi folks,

Several months ago, I implemented http://wiki.civicrm.org/confluence/display/CRMDOC/List+of+Upcoming+CiviEvents+or+Feed+of+Events on www.cohousing.org.  We tuned/customized it a little, and eventually made three variants of the page, two of which were limited to particular event types.

When I did the copies initially, I got the "Fatal Error: Cannot redeclare [date variable]..." message, until I changed the date variable names so that they were unique per page.

Yesterday, the site editor asked me to look into a change to one of these pages (showing the end date as well as the start date).  I got it to work, but cron started throwing the redeclare error again.

So I undid my change... and it still threw the error. 

I reverted the page back to March, and it STILL threw the error.

I copied the code in from one of the other pages, changed the event type from 7 to 6, and changed the date name variable, and it's STILL throwing the error.

I have NOT tried resaving either of the other two pages to see if those start throwing errors also if i resave them to the database.

Any insights welcome.  It doesn't actually stop the page from rendering properly, but cron sure doesn't like it.

Thanks,

     - catya

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Cannot redeclare error problem when listing civevents
May 30, 2008, 07:09:38 am
Interesting that you bring this up as I have been having the same issue. The problem is with cmp_date function. It is getting declared elsewhere (as you already know). I also changed the name of this function a few months ago and stopped getting the error. Just a few days ago I searched for the word "techie" on my drupal site and got the dreaded white page. Checking my apache logs, I saw it was throwing that error again. I have searched my entire db on the drupal side for where I missed it, but it's nowhere to be found. I am assuming it's because the word techie is in one of my CiviEvents, but it's incredibly annoying because the error doesn't help much.

Code: [Select]
[Fri May 30 10:07:04 2008] [error] [client 65.184.142.119] PHP Fatal error:  Cannot redeclare cmp_date() (previously declared in /var/www/html/includes/common.inc(1352) : eval()'d code:3) in /var/www/html/includes/common.inc(1352) : eval()'d code on line 7, referer: http://www.mysite.org/
Is there a page in CiviEvent that calls cmp_date function that could trigger this error based on a drupal search?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Cannot redeclare error problem when listing civevents

This forum was archived on 2017-11-26.