Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   [SOLVED] Errors: Invalid argument supplied for foreach() Call to undefined function (http://forum.bytesforall.com/showthread.php?t=1902)

skyline Jun 3, 2009 10:41 PM

[SOLVED] Errors: Invalid argument supplied for foreach() Call to undefined function
 
This all started when I was going to add a function in functions.php and something didnt work, so I put it back like it was. But that did not fix the errors. I even replaced the functions.php file with a clean copy that had not been edited at all. Here are the two errors I am getting (on Ver 3.3.3):
Code:

Warning: Invalid argument supplied for foreach() in  ... /wp-content/themes/atahualpa333/functions/bfa_get_options.php on line 13
Fatal error: Call to undefined function bodyclasses() in  ... wp-content/themes/atahualpa333/header.php on line 841

I have a backup from a day and a half ago, but many, many, many changes have been made since then. I didnt really want to have to redo all of them. I imagine I could edit the database if I new what I need to look for in the tables. From the rows I looked at in the options table, I didnt see anything that looked different. However, with over a 1000 rows in that one table alone, any help would be a plus. Have you seen these errors before? If so, do you recall how you resolved them? :confused:

skyline Jun 4, 2009 12:41 AM

;)Well ... I think the issue was or is related to WP Super-Cache. It never was working correctly and continued to give erroneous information. So, I had decided to delete the plugin. When I deleted it I was prompted to delete several files. Because all the files were in the WP Super Cache directory, I said yes and I believe I deleted the cache as well. One thing that led me to looking at this plugin as a cause of my problem was because this plugin continued to register that Safe Mode was On; when in fact I had turned it off. It was shortly after that when the errors occurred. However, I had also attempted to add a function and thought errors were somehow related to some error in my function ... which, turned out not to be the case.

All that said, I tried a couple of other options to address these errors. I deactivated and/or deleted a number of plugins I had recently activated, to see if any of them were causing the problem. I also tried to change themes; and was able to switch to a few other themes without any problem. However, when I came back to Atahualpa 3.3.3 I would get the same errors. Then, I changed the theme to an earlier 3.? version of this theme. Whoops ... that was a mistake. After that slight blunder, I was unable to switch themes at all. Every time I would try to preview another theme, I was taken to my home page. So, having had theme issues in the past, I knew that deleting the entire theme from my server would give me back WP functionality. So, I deleted the earlier version and was able to change theme again. However, I still got the same errors on 3.3.3 ... so, I decided to delete the 3.3.3 theme entirely and start with a fresh install. Then, the next step was to upload it again. After uploading it again, I was able to reactivate it and it worked fine. However, I decided to try uploading and reactivating the WP-Super Cache plugin. This only created problems again. Any changes I would make to the theme would not get posted. So, I deactivated WP Super Cache and then the ability to make changes to the theme, returned.

The culprit seems to be WP Super Cache. :)


All times are GMT -6. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.