This project is read-only.

Cant change/move/remove widgets

Topics: ASP.NET 2.0, Controls
Dec 28, 2012 at 1:11 AM

Hello all.

On my instance of BE, everything is loading fine. I can add/edit/save setting on the admin pages. I just cant make any changes to the widgets.

It seems to just do a partial post-back when i click on any of the icons on the top right of the widget.



Feb 24, 2013 at 7:51 PM
Anyone have any idea why I can't edit/add/remove widgets?

Thank you!
Feb 25, 2013 at 12:21 AM
Sometimes widget settings saved as XML files get corrupted and cause issue like this. Backup app_data/datastore/widgets and remove all from this directory to force refresh. If this won't help, it can be JavaScript errors to cause an issue, you can check JS errors with tool like FireBug.
Feb 25, 2013 at 8:20 PM
Thank you rtur,

I deleted everything from the datastore/widgets folder. Restarted the app. tried to use the widget to add them back but it wouldnt add them.
Below is the code from the firebug page source for the admin widget as an example. Should the href for the edit buttons be "#"? Not sure if that is normal or if that points to the problem? Also not sure how to debug further with firebug.....
<div class="widget administration" id="widget42fcbe7c-2c9c-440a-bad9-65a94472fccc"> <a class="delete" href="#" onclick="BlogEngine.widgetAdmin.removeWidget('42fcbe7c-2c9c-440a-bad9-65a94472fccc');return false" title="Delete widget"><span class="widgetImg imgDelete">&nbsp;</span></a><a class="edit" href="#" onclick="BlogEngine.widgetAdmin.editWidget('Administration', '42fcbe7c-2c9c-440a-bad9-65a94472fccc');return false" title="Edit widget"><span class="widgetImg imgEdit">&nbsp;</span></a><a class="move" href="#" onclick="BlogEngine.widgetAdmin.initiateMoveWidget('42fcbe7c-2c9c-440a-bad9-65a94472fccc');return false" title="Move widget"><span class="widgetImg imgMove">&nbsp;</span></a> <h4> Administration</h4> <div class="content"> <ul id="ctl00_widgetContainer42fcbe7c2c9c440abad965a94472fccc_42fcbe7c2c9c440abad965a94472fccc_uxMenu_ulMenu" class="toprounded"><li><a href="/rs/admin/default.cshtml"><span>Dashboard</span></a></li><li><a href="/rs/admin/Blogs.aspx"><span>Blogs</span></a></li><li><a href="/rs/admin/Posts/Posts.aspx"><span>Posts</span></a></li><li><a href="/rs/admin/Comments/Approved.aspx"><span>Comments</span></a></li><li><a href="/rs/admin/Pages/Pages.aspx"><span>Pages</span></a></li><li><a href="/rs/admin/Tracking/Pingbacks.aspx"><span>Tracking</span></a></li><li><a href="/rs/admin/Widgets/Blogroll.aspx"><span>Controls</span></a></li><li><a href="/rs/admin/Extensions/default.cshtml"><span>Appearance</span></a></li><li><a href="/rs/admin/Users/Users.aspx"><span>Users</span></a></li><li><a href="/rs/admin/Settings/Main.aspx"><span>Settings</span></a></li><li><a href="/rs/admin/Users/Profile.aspx?id=RS_Admin"><span>My Profile</span></a></li><li><a href="/rs/Account/change-password.aspx"><span>Change password</span></a></li></ul> </div> </div>
Feb 25, 2013 at 9:38 PM
So do you have any JS errors in FireBug? Try to open FireBug, go to "console" and refresh page, You should see no errors. Same for "Net" tab - enable it if disabled and refresh page, you should see all resources, including scripts, loaded with no errors.
Also I don't know anything about where you run your blog - is this IIS or something else, new install or upgrade, local or remote, BE version etc. Often when upgraded old JS file might conflict with new scripts, but I'm not sure what your situation is... If you have public URL to look at that might help too. More details you provide, easier it is to spot the problem.
Feb 26, 2013 at 11:41 AM
Thank you. Here is what I got from Firebug

SyntaxError: syntax error
...Style=P.get("color")}T();return s}})());<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML ...

IIS7 on GoDaddy. BE Upgrade, merged with YetAnotherForum. Remote install.
Feb 26, 2013 at 5:06 PM
You have 2 jQuery loaded which definitely can break lots of JS code. The "/scripts/jquery.min.js" probably loaded by parent app (YAF). BE loads jQuery as part of combined and compressed script at "/rs/Scripts/Header/js".
Feb 26, 2013 at 5:19 PM
I have removed jquery.min.js from the scripts directory. Same problem persists....
Feb 26, 2013 at 5:31 PM
"NetworkError: 500 Internal Server Error - http://www.renewed"
TypeError: BlogEngine.widgetAdmin is undefined

so..... what causes this??
Feb 26, 2013 at 8:43 PM
Looks like there are errors in compressing JS, you can try to uncheck "enable optimization" in admin -> settings -> advanced. This will stop bundling and compression of JS ans CSS and might fix this problem.
Feb 27, 2013 at 3:43 AM
That did the trick! With "enable optimization" disabled, the widgets work perfectly. Now how can I go about finding & fixing the actual problem so that I can re-enable the optimization?
Feb 27, 2013 at 5:25 PM
You would need to remove all scripts from "/scripts" folder and add them one by one, until you run into script that can't be optimized and causes an error on the page. Reason it can't be optimized is that it uses syntax that optimization DLL does not understand, so you would need to modify JS. Sometimes it is just non-standard formatting and easy to fix, so good luck.