WordPress.org

Ready to get started?Download WordPress

Forums

2.8 Crashed My Site!!! Using Options theme. (19 posts)

  1. Jon Alba
    Member
    Posted 4 years ago #

    My site, http://www.sportsfullcircle.com, recently upgraded to 2.8. The second we did so, the ENTIRE SITE CRASHED.

    We now get a white screen with the message:

    Fatal error: Cannot use object of type WP_Error as array in /home1/sportsfu/public_html/wp-content/themes/options/app/options.php on line 13

    I noticed tons of people were having similar problems, and this is a huge issue for myself as well. We average many views, and it is necessary this be solved.

  2. Jon Alba
    Member
    Posted 4 years ago #

    The apparent infected code is:

    $all_cats[$key] = get_cat_name($all_cats[$key]);

    Does anyone have a clue on what I can do?

  3. Kim Parsell
    Volunteer Moderator
    Posted 4 years ago #

    From the error message, it appears to be a problem with the theme you are using. You should contact the theme author and work with them to resolve the issue.

    In the meantime, try switching to the default theme to see if the error goes away. If so, then at least your site will be functional until you can resolve the issue.

  4. Jon Alba
    Member
    Posted 4 years ago #

    The problem is however, we can't even log in! Any suggestions?

  5. Kim Parsell
    Volunteer Moderator
    Posted 4 years ago #

    Access your server via FTP and go to wp-content/themes/ and rename the folder for your current theme. That will make WordPress automatically revert to using the default theme, as it believes that the other theme is broken.

    You should then be able to log into the admin section.

  6. Jon Alba
    Member
    Posted 4 years ago #

    Thanks, got it!

  7. pnaw10
    Member
    Posted 4 years ago #

    @Jon - It looks like we're both using themes created by Justin Tadlock. You have Options, and I am using Structure. (I recognized Options in the error message because I considered using it before I settled on Structure.) My website at http://www.cnyradio.com also experienced the same error upon upgrading to 2.8.

    Even though we're using different themes, Tadlock used the same line of code in both of them. He probably has it in several other themes too. Unfortunately, he doesn't seem to be aware of the problem, and his latest and greatest theme site -- which still has themes for free -- now requires a $25 membership to access the support forums.

    $all_cats[$key] = get_cat_name($all_cats[$key]);

    Something in that line of code must have "hooked" into something in the WordPress engine or the SQL database. WP must have renamed it in 2.8 -- but which thing? $all_cats? $key? get_cat_name?

    And what did they change it to? I know enough about PHP and programming in general to know answering these 2 questions and making the necessary corrections will solve the problem. But I don't know enough to figure out what those answers are.

    Ugh... it's great to have improvements and progress, but it sucks when an update renders the entire site useless thanks to one line of theme code that became obsolete. WP is great in many ways, but backwards compatibility apparently isn't among their top priorities.

    If this one little thing caused my site to go down, I just can't wait to see how many of my plugins are now useless.

  8. pnaw10
    Member
    Posted 4 years ago #

    More bad news:

    http://themehybrid.com/themes/options
    http://themehybrid.com/themes/structure

    Both pages say the themes are no longer available for download. In other words, he's not going to be providing any updates. We're left to fend for ourselves... I wasn't planning to be up all night tinkering with PHP code... arrrrgh!!

  9. Justin Tadlock
    Member
    Posted 4 years ago #

    This issue was addressed nearly a year ago with a change in code. I'm sorry you guys missed the last two updates, but the themes have been discontinued and you can no longer get those updates.

    There has been a solution posted on the themes' support forums:
    http://themehybrid.com/support

  10. gl
    Member
    Posted 4 years ago #

    Justin, I can't find the solution you mentioned. Could you be more specific? Also, how do you downgrade back from 2.8 to 2.7? Thank you!

  11. gl
    Member
    Posted 4 years ago #

    I see a recommendation to change a line in the code. That was for the Option theme. I use Structure (Aura). Same?

  12. sam_m
    Member
    Posted 4 years ago #

    See if this helps:

    Change that 'op_all_cats() function you have in app/options.php to this:

    function op_all_cats() {
    	$all_cats = get_all_category_ids();
    	foreach($all_cats as $key => $value) :
    		$all_cats[$key] = get_cat_name($all_cats[$key]);
    		$all_cats[$key] = str_replace("&", "&", $all_cats[$key]);
    		$all_cats[$key] = str_replace("&","&", $all_cats[$key]);
    	endforeach;
    	$all_cats['none'] = false;
    	return $all_cats;
    }

    Hope it helps!

  13. fr33think3r
    Member
    Posted 4 years ago #

    What is the one line change that needs to be done? I made the above change for structure 1.2.1, but that doesn't help.

    In case of structure 1.3, the sidebar doesn't show up.

  14. fr33think3r
    Member
    Posted 4 years ago #

    In the above suggested code changes,

    $all_cats[$key] = str_replace("&", "&", $all_cats[$key]);
    $all_cats[$key] = str_replace("&","&", $all_cats[$key]);

    Aren't these two identical other than the white space?

  15. Daniel Thompson
    Member
    Posted 4 years ago #

    I see lots of people here can someone help me with my issue?

    Parse error: parse error in wp-config.php on line 77

    This is a new local install , I,m trying to get it to work for the first time.

    I saw the other blog that said there was lines outside of the <? ?> in the wp-config.php
    Not mine.
    I followed the directions to the letter.

    PLEASE

  16. ptvguy
    Member
    Posted 4 years ago #

    I wouldn't give up on the Options theme just yet. I have it working just fine in WP 2.8. (http://www2.soptv.org/) Only the WP Security Scan plugin gave me trouble in the upgrade.

  17. MattV
    Member
    Posted 4 years ago #

    Only version 1.2 of Options Theme will break when upgrading to WordPress 2.8 - version 1.3 works just fine

    Here´s an official fix for v1.2 provided by Justin in the Hybrid Forums:

    Change this code in /app/options.php:

    function op_all_cats() {
    	$all_cats = get_all_category_ids();
    	foreach($all_cats as $key => $value) :
    		$all_cats[$key] = get_cat_name($all_cats[$key]);
    		$all_cats[$key] = str_replace("&", "&", $all_cats[$key]);
    		$all_cats[$key] = str_replace("&","&", $all_cats[$key]);
    	endforeach;
    	$all_cats['none'] = false;
    	return $all_cats;
    }

    To:

    function op_all_cats() {
    	$cats = get_categories();
    	foreach ( $cats as $cat ) :
    		$return[] = $cat-> name;
    	endforeach;
    	$return[] = false;
    	return $return;
    }

    Be aware that Options Theme has been discontinued, so sooner or later it just won´t work anymore as WP keeps on rolling out new features.

    Consider joining the Hybrid Theme club. It´s a great theme and has a very active support community: http://themehybrid.com/

  18. debbiez
    Member
    Posted 4 years ago #

    Being a novice,I attempted to create a floating header for an ad, but got the following error:

    "Fatal error: Class 'floatad' not found in /home/debbiez/public_html/wp-content/themes/adstyle/header.php on line 25"

    Now I cant get past this error screen to open my site an removed the offending code. I don't see a way above to fix this specific problem, but I was hoping that someone out there knows what to do?

  19. ptvguy
    Member
    Posted 4 years ago #

    Not really the topic for this discussion, but go back to your original header.php file (without your recent changes) and reupload it over the current broken one.

Topic Closed

This topic has been closed to new replies.

About this Topic