Warning When Activating 3.9.5

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?"

Warning When Activating 3.9.5

Postby metal450 » 19 Dec 2011, 00:24

Interesting. When swapping from 3.9.2 to 3.9.5 (as soon as I click "Activate" on the themes admin page), it dumps this a bunch of times:

Warning: Missing argument 1 for suffusion_get_formatted_page_array(), called in /home/wordpress/wp-content/themes/suffusion.3.9.5/admin/theme-options-visual-effects.php on line 224 and defined in /home/wordpress/wp-content/themes/suffusion.3.9.2/functions.php on line 385
metal450
 
Posts: 85
Joined: 06 Feb 2010, 21:00

Re: Warning When Activating 3.9.5

Postby sayontan » 19 Dec 2011, 00:39

Though I have never faced this, I know what is causing it, and you can ignore it. And it is probably the last time you will see it too, unless you are switching back and forth from 3.9.2 in this manner. Moreover, this is more of a bug with 3.9.2 as opposed to 3.9.5.

If you are interested, here is the rationale. Starting from 3.7.4 to 3.9.2 there was a mechanism I had to put in place due to my usage of WP's Settings API. Basically the option in which all settings go is "suffusion_options". I had a different variable that merged the contents of suffusion_options with the defaults from different theme files, which was stored in suffusion_unified_options. Now, I couldn't save both in one call, so I hooked the saving of suffusion_unified_options to the update_option hook. Now, probably due to a WP bug, there were issues in telling the update_option hook to update suffusion_unified_options only if the suffusion_options variable was being saved. However, with a clever mix of coding I got around this obstacle, with a small catch. Any time that any option was saved, the suffusion_unified_options would get regenerated.

Finally in 3.9.3/3.9.4 I figured out how to get rid of this. In this process I also streamlined some arguments of some function calls. Now, if you directly updated from 3.9.2 to 3.9.5 via the auto-update mechanism, you wouldn't see this because your template directory etc would remain unchanged. But since you are trying to switch from a theme in one folder to the same theme in another folder, that is causing an option to save (the template directory option), and that tries to execute the older update_option hook with the newer code. Hence you get the warning.

This is a bit of a maze to understand (it was definitely quirky for me to figure out), so I won't be surprised if it sounds confusing.
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: 10159
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas

Re: Warning When Activating 3.9.5

Postby metal450 » 19 Dec 2011, 01:57

Cool, gotcha - I'd actually been wondering why there were two separate options arrays in the database, so I guess that answers it! :)
metal450
 
Posts: 85
Joined: 06 Feb 2010, 21:00


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests