• Hey guys, in the widgets section i got a message saying:

    Warning: Cannot use a scalar value as an array in/home/mysite/public_html/mysite.com/wp-content/themes/sitetheme/library/widgets.php on line 41

    This is what i have in line 41:

    $controls = &$wp_registered_widget_controls[$id];

    What is the problem? how can i fix it?

    Does it have to do with the fact that i made the theme with artisteer
    and i made the search button fancy and highlighted with an icon but
    now somehow the button is looking poor and not even close to how
    teh categories, archives and recent posts headlines look like?

    Please help me ut, thank you.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter kikibomb

    (@kikibomb)

    Can anyone here help me out with this issue???

    Hi Kikibomb,
    Are you using Artisteer to make your themes?

    Hi Kikibomb,
    I see that you have made this theme with Artisteer.
    Apparently it is a fault with Artisteer that will be fixed in the next update.
    For now I fixed it by clicking on the editor in my WordPress Dashboard and then clicking on the widget.php.

    I then went down to line 41 and replaced whatever was there with this: $controls[‘params’][] = array(‘id’=>$id);

    Then I went to line 71 and replaced what was there with this:
    $id = end($params); $id = $id[‘id’];

    Before I did this I copied and pasted whatever was at these two lines into a notepad file just in case it didn’t work I could always replace it.
    Anyway it worked for me.
    Once you have done that you can go to your Artisteer Files on your PC and do the same to the widgets php file so that future themes don’t have the same issues.
    Here is the intructions:
    Open up C:\Program Files\Artisteer 3\Library\Data\Templates\WordPress\Export\Files\library\widgets.php

    To disable the error go to line 41 and replace whatever is there with

    $controls[‘params’][] = array(‘id’=>$id);

    To make sure the extra option still works go to line 71 and replace it with

    $id = end($params); $id = $id[‘id’];

    Anyway hope this has helped.
    Regards
    Rick

    Hey Kikibomb,
    Here is what I had at those two lines.
    It might make it easier for you to find

    41= $controls[‘params’][0][‘id’]=$id;

    71= $id = $params[0][‘id’];

    Make sure that you count the empty spaces as lines also.

    Cheers

    Thread Starter kikibomb

    (@kikibomb)

    Thanks a lot for your help guys, i will try it right away??
    Is this maybe the reason why when i am adding ads on the sidebars they dont show up?

    Hi Kikibomb’
    I don’t know about the ads on your sidebars as mine have been working fine even when I had the error issue.

    What sort of ads are you trying to insert and how are you trying to insert them?

    Cheers
    Rick

    Thread Starter kikibomb

    (@kikibomb)

    I try to use the max banner ads plugin, and there are all kind of ads like javascript, adsense code and others.

    Hi Kikibomb,
    I have no problems putting in cpa banners by adding the text widget to the sidebar then dropping in the banner code there.

    I don’t use any banner plugins

    Rick

    Thread Starter kikibomb

    (@kikibomb)

    Another thing that i need help with is how to move my wp blog from my host to a new host?
    Is there a simple way or plugin to do that?

    I believe that you can go to your sites’ CPanel and do a backup and download it in zip format to your hard drive.
    Then you should be able to upload it to your new hosting account.

    That won’t work! Review Moving_WordPress.

    Thread Starter kikibomb

    (@kikibomb)

    Still cant find a way how to transfer my site to another host

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Help me with an widget.php error’ is closed to new replies.