Support » Fixing WordPress » receiving error on widget.php

  • Hi,

    I am supposed to update a wordpress site which was made in 2009.

    I have created a new theme based on twentyeleven on my local server and it is working well on my machine. (I changed some html/css only) then I uploaded only the theme to the server in the theme folder. I was expecting to activate the new theme and be able to see it on the site. when I activated the new theme, it gave me error in something with widget.php.

    So, once I compared the old widget.php with my new widget.php, I noticed they MIGHT BE slightly different.

    So, I switched the old widget.php with my new one. Still the site is giving me error with widget.php. So, I switched it back to old widget.php and still not working. when I type the url it gives me this error:Fatal error:
    Call to undefined function add_theme_support() in /home/wilmax1/public_html/wordpress/wp-includes/widgets.php on line 561

    Does anybody knows how to solve this issue please?
    Hope I have explained it OK. If need more info, let me know.

    I’d really appreciate it.

Viewing 15 replies - 1 through 15 (of 25 total)
  • http://codex.wordpress.org/Function_Reference/add_theme_support

    Support for something like widgets should be done in functions.php

    Thread Starter Helen-kh

    (@helen-kh)

    Thanks for response.
    I am really not familiar with php and how the files connected. I basically put the files back as it was and it is not working. Can it be broken just by deleting and uploading the files?

    I just need to get it back to what it was. And then work away from there. The site is down now.

    Remove that function from widgets.php and place it into functions.php

    Did you actually upgrade wp? This thread shows your version as 2.8.5.

    Thread Starter Helen-kh

    (@helen-kh)

    I haven’t upgrade it. It is still old. I have undone uploading the new theme and new widget.php.

    I am not sure what I have to replace here. I need to know why now that everything is back as it was, it is still not working.

    Twentyeleven won’t run on a 2009 WordPress.

    What is the url?

    Thread Starter Helen-kh

    (@helen-kh)

    Well, that is good to know. But I have deleted the new theme. What is causing problem still?

    Url is wilmax.ca

    Download a fresh copy of 2.8.5 here, http://wordpress.org/download/release-archive/

    Extract the widgets.php and upload it to the server. There is nothing on line 561 in that version.

    You are trying to use a WP 3 function (add_theme_support) to a WP 2.8.5 site. In short – your site is too old to support this function.

    Thread Starter Helen-kh

    (@helen-kh)

    I have the widget.php from the version that is old. I am using the right widget.php for my version I think, because I didn’t changes it.

    I am not trying to add any function. I am just wondering why the old version with its old widget.php is not working anymore.

    By the way, I am not sure which version the old site was on. Is there any file that has this information that I can look up?

    Thanks a lot

    Thread Starter Helen-kh

    (@helen-kh)

    Oh, by the way, I checked the widget.php and it doesn’t have anything in regard to that function in it, even on line 561.
    even in function.php, there is no such thing!!

    It is bizarre!

    You cannot use add_theme_support() on a 2.8.5 WP install. The problem is in your theme.

    Thread Starter Helen-kh

    (@helen-kh)

    Which theme, the old one or new one? The new one is removed later.

    I am using the right widget.php for my version I think, because I didn’t changes it.

    I don’t think so. The version of widget.php you are using has add_theme_support('widgets'); Version 2.8.5 did not support that so you must have the wrong file.

    By the way, I am not sure which version the old site was on. Is there any file that has this information that I can look up?

    wp-includes/version.php

    Thread Starter Helen-kh

    (@helen-kh)

    So, the version is 2.8.4, that is for sure 🙂

    I am sure I have put the right version of widget.php and when I looked for that function in it, there is nothing there.

    I know I have put the old widget.php, because I had copied it already and I used the copy to upload it again.

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘receiving error on widget.php’ is closed to new replies.