Fatal error after update WP and SUFFUSION

Reports about issues that you encounter in Suffusion
Forum rules
1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"

Fatal error after update WP and SUFFUSION

Postby Sisyphe » 13 Dec 2011, 00:39

Hello,

This morning I updated :

1/ WORDPRESS in V 3.3
2/ SUFFUSION in V 3.9.4

And now, I can't SAVE anything in suffusion option. When i try to SAVE, I get this error :

Fatal error: Call to undefined function suffusion_get_rotating_image() in /web/demarcalise/www/genearmee/wp-content/themes/suffusion/suffusion-css-generator.php on line 628

Many thanks for help.
Luc.
http://www.genearmee.com
Sisyphe
 
Posts: 10
Joined: 03 Oct 2011, 12:53
Location: Lyon in France

Re: Fatal error after update WP and SUFFUSION

Postby sayontan » 13 Dec 2011, 00:50

OK - my mistake. If you go to the file actions.php, you will find this code:
Code: Select all
/**
 * Based on the Image Rotator script by Matt Mullenweg > http://photomatt.net
 * Inspired by Dan Benjamin > http://hiveware.com/imagerotator.php
 * Latest version always at: http://photomatt.net/scripts/randomimage
 *
 * Make the folder the relative path to the images, like "../img" or "random/images/".
 *
 * Modifications by Sayontan Sinha, to dynamically pass the folder for images.
 * This cannot exist as a standalone file, because it loads outside the context of WP, so variables such as folder names cannot be fetched by the file automatically.
 *
 * @param $folder
 * @return string
 */
function suffusion_get_rotating_image($folder) {
   // Space seperated list of extensions, you probably won't have to change this.
   $exts = 'jpg jpeg png gif';

   $files = array(); $i = -1; // Initialize some variables
//   if ('' == $folder) $folder = './';
   $content_folder = WP_CONTENT_DIR."/".$folder;

   $handle = opendir($content_folder);
   $exts = explode(' ', $exts);
   while (false !== ($file = readdir($handle))) {
      foreach($exts as $ext) { // for each extension check the extension
         if (preg_match('/\.'.$ext.'$/i', $file, $test)) { // faster than ereg, case insensitive
            $files[] = $file; // it's good
            ++$i;
         }
      }
   }
   closedir($handle); // We're not using it anymore
   mt_srand((double)microtime()*1000000); // seed for PHP < 4.2
   $rand = mt_rand(0, $i); // $i was incremented as we went along
   return WP_CONTENT_URL."/".$folder."/".$files[$rand];
}


Copy it and delete it from actions.php. Then paste it near the end of functions.php, just before the closing "?>". If you save functions.php you should be fine.

If you are nervous about editing the file, you can disable the rotating header images for now - I will fix this for the next release.
Sayontan Sinha | http://mynethome.net/blog | http://www.aquoid.com/news
I don't do freelance work (for Suffusion or otherwise), so please don't contact me for quotes or offers.
sayontan
Site Admin
 
Posts: 10161
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas

Re: Fatal error after update WP and SUFFUSION

Postby regularGuy » 13 Dec 2011, 05:30

Not working for me, since I did what you told I can't even access to WP anymore. When ever I try to activate your theme, it'll crashes my server...
So I deleted WP and re-install it, load your theme and did the necessary changes, but got still the same issue, it'll crashes my server. Every other theme is working fine. I'm kinda up sad, took my 4 days (long nights incl.) to set up my site, all that was missing was the random pictures in the background header and now this :evil:

Any idea?
regularGuy
 
Posts: 1
Joined: 13 Dec 2011, 05:06

Re: Fatal error after update WP and SUFFUSION

Postby sayontan » 13 Dec 2011, 08:16

The code I have provided is fine. My guess is that you might not be changing it as per instructions. Give me a couple of hours - I will put up a patch for you to download. An official WP release will take time to get approved, so a patch will be quicker.
Sayontan Sinha | http://mynethome.net/blog | http://www.aquoid.com/news
I don't do freelance work (for Suffusion or otherwise), so please don't contact me for quotes or offers.
sayontan
Site Admin
 
Posts: 10161
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas

Re: Fatal error after update WP and SUFFUSION

Postby Sisyphe » 13 Dec 2011, 13:28

Thank a lot Sayonta,
I prefer waiting for the patch that to modify files...
Luc.
Sisyphe
 
Posts: 10
Joined: 03 Oct 2011, 12:53
Location: Lyon in France


Return to Bug Reports

Who is online

Users browsing this forum: Google [Bot], star2013 and 1 guest