Jump to content


Photo
- - - - -
Resolved

Pagelines Customize Error



  • Please log in to reply
3 replies to this topic

#1 btnfv

btnfv

    Newbie

  • Members

  • 9 posts
  • Country: Country Flag

Posted 28 October 2012 - 11:58 PM

I wanted to add social media info to the barnding section. When I added a hook for just the twitter follow button I tested it and it was fine. I added the hook for a facebook like button and it gave me the following error:

Fatal error: Cannot redeclare follow_twitter() (previously declared in /home/content/30/10005630/html/db/wp-content/plugins/pagelines-customize/functions.php:49) in /home/content/30/10005630/html/db/wp-content/plugins/pagelines-customize/functions.php on line 57

The entire site crashed and I had to remove Customize plugin by ftp. Line 57 delared "fb-like()" not "twitter_follow()" as the error shows. I used WP editor to make the changes. Did I do something wrong or is this a fluke?

Thanks

#2 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 29 October 2012 - 12:25 AM

In php you can only declare a function once then use it as many times as you like. Looks like your declaring a function twice. When making custom functions always use a unique name don't just copy and paste.

#3 btnfv

btnfv

    Newbie

  • Members

  • 9 posts
  • Country: Country Flag

Posted 29 October 2012 - 06:31 AM

I thought I pretty much declared two serate functions with unique names. Maybe follow_twitter is declared somewhere else and I do not know it. I will make the function names very unique from now nd see how that goes.

#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 16313 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 29 October 2012 - 09:32 AM

The topic was marked as resolved, if you require additional support, please reply and we can re-open the topic.





Also tagged with one or more of these keywords: Resolved