Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 525 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wordpress widgets are disappearing in admin area

#1
My company is being paid to optimize a Wordpress site, I am trying to make some modifications that should be showing up in the widgets section (forms, testimonials etc).

With their custom theme, in the widgets section, on the right hand side where it lists all the sidebars, if I expand any, they are empty. If I drag a text widget over and add "Test", and then Save, it will show up on the front end, but once the widgets page refreshes, if I expand the sidebar again, it shows empty. The widgets show up under inactive widgets but not to the right where I should be able to edit them.

I have tried this using the default theme and the widgets show up as expected. I don't know enough about Wordpress to know where to look to fix the widgets disappearing from the admin sidebar section.
Reply

#2
I got the same issue after I changed the sidebars ids (in register_sidebar)

The sidebars show in admin part, I can change their content, which is reflected in front end, but refreshing admin page displays empty sidebars (and saving reflects empty sidebars in front end)

I could solve it by removing the sidebars (remove the calls to register_sidebar), updating admin page, which suddenly showed all the widgets in inactive widgets list (a lot of them since I put new widgets many times before solving the issue), and re-activating the calls to register_sidebar.

Reply

#3
this is the solution.

we just need to change the id of sidebar. id should be only in small letters. Caps are not allowed. if we use cap id in any of the sidebar, the problem occurs in the same sidebar or any other sidebar of automatically removing widgets on refresh.

I am just mentioning an example below.

This is the Wrong Pattern -

register_sidebar( array(
'name' => __( 'Main Sidebar', ),
'id' => 'Sidebar-1',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => "</aside>",
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );

This is the right pattern. Note i just changed the id to correctly configure the widgets saving.

register_sidebar( array(
'name' => __( 'Main Sidebar', ),
'id' => 'sidebar-1',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => "</aside>",
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );

Secondaly, wordpress has not mentioned anywhere, that id should be in small letters, this is another bug by wordpress. But in such big cms, these things are bound to happen.
Reply

#4
I had the same issue and solved it by modifying the name of the widget to lower case as per the best solution here. i experienced this issue on 3.6
Reply

#5
I had the same problem. I had the wrong quotation mark. Try to change from >"< into >'<

FROM:

'id'=> "sidebar-1",

TO:

'id'=> 'sidebar-1',
Reply

#6
I've had the same issue and have dealt with it a couple of days, it all came from the ids - I changes them to no caps and no spaces and it magically worked ! Finally! Good luck!
Reply

#7
I had the same problem and solved uninstalling the plugin Google Analyticator. Check if you have that plugin installed or another one of google analytics.
Reply

#8
I had a similar problem but mine was due to the id being a number. I had selected 404 and the widgets disappeared on refresh. I renamed the id to fourohfour and it resolved the problem.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through