- This topic is empty.
-
AuthorPosts
-
November 30, 2013 at 7:15 pm #157470
cybershot
Participantfor some reason that I cannot explain, I am getting a white page on my WordPress install that says
Fatal error: Cannot redeclare column1() (previously declared in /wp-content/themes/RitualHealing/functions.php:615) in /RitualHealing/inc/aq_resizer.php on line 617
column1() is a shortcode in the functions.php file and the aq_resizer.php is an image resize script that has nothing to do with column1. It says that line 617 of aq_resizer.php and there is only 150 lines of code in that script. How can this be an issue? Why would the two scripts be interfering with eachother? Is there a cause for this that I am not aware of? In php sometimes having a blank space can cause an issue. I was wondering if this could be the same kind of thing?
November 30, 2013 at 9:33 pm #157473__
Participantcolumn1() is a shortcode in the functions.php file and the aq_resizer.php
Well, that’s the reason right there. You cannot use the same name for two different functions. You’ll have to rename one of them.
Why would the two scripts be interfering with eachother?
Because you’re running both scripts at the same time.
November 30, 2013 at 9:44 pm #157475cybershot
Participantif only it were that simple. This error is a php error. Meaning it’s not my coding The aq_resizer is a resize script that DOES not have column1 in it. There isn’t even that many number of lines. It turned out to be a blank space that was causing the issue. I went into the aq_resizer.php script and added the closing “?>” php tag and tried to delete any invisible spaces and that seems to have fixed it.
December 1, 2013 at 1:24 am #157485__
ParticipantI read your original post as stating that there were indeed two
column1()
functions. Sorry for the confusion!I’m not sure how whitespace could have been the culprit, here. In fact, leaving the closing
?>
off is recommended best practice in php-only files (i.e., any time the file ends inside a php block). I can imagine that there might have been some odd characters that you deleted along with the whitespace… maybe? Still, the error message wouldn’t make much sense. It would be interesting to investigate, if it were reproducible.In any case, I’m glad to hear you got it fixed. : )
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.