Skip to content

Update widgetController.js #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 1, 2016
Merged

Update widgetController.js #62

merged 2 commits into from
May 1, 2016

Conversation

rfennell
Copy link
Contributor

Initially logged on CodePlex but this is a better home

I have attempted an upgrade of a multiblog instance backed by MS SQL of BlogEngine 3.2 to 3.3.

  1. I used the new codeplex binary distribution
  2. Ran the upgrade SQL scripts to alter the schema and the delete script to remove the old widgets
  3. Edited the web.config to point at my SQL DB for content, users and roles

I could access all my blogs, post etc. As expected there were no widgets show (as they have been deleted). So I....

  1. Login as an admin
  2. Added the widgets via drag and drop, they appear on the pages, but with default options

If I try to edit a widget to alter the settings the popup dialog is the right size but empty.

If I checked the server logs I see the error

The parameterized query '(@blogid nvarchar(36),@etype int,@eid nvarchar(4000))SELECT Sett' expects the parameter '@eid', which was not supplied.

I have had a look at the source for the widget editors controller and it seems the widget id is not being set on the Url as a query string entry. If I alter the line to

var customSrc = SiteVars.RelativeWebRoot + "Custom/Widgets/" + name + "/edit.cshtml?id="+ id;

It works, but I am not sure of any knock on effects, not sure if this is the real cause of the issue.

Added the widget id to be edited.
Realised by fix only sorted the editor, not the actual display of the widget as it was writing the ID twice into the DB row
@rfennell
Copy link
Contributor Author

Realised my fix only sorted editing, not display of widgets so edited it again

@rxtur
Copy link
Collaborator

rxtur commented Apr 30, 2016

For DB provider, you might need to remove widgets from the table like:
delete from be_DataStoreSettings where ExtensionType = 1
http://dnbe.net/docs/post/upgrading-blogengine-net-manually
I might need to update post with this, but have to check it first.
I don't have MySql installed now, but this probably same for other DB providers, will check with SQL server.

@rfennell
Copy link
Contributor Author

I am seeing the issue on MS SQL not My SQL.

Also to confirm I did run that command to delete the old extensiontype 1 data (from step 3 of the manual upgrade process) as instructed in the post you mention.

The problems I have seen (and this pull request tries to address) is after all this is done. Just looks like the load for the editor is not getting the extension ID to edit

@rxtur rxtur merged commit c172dfa into BlogEngine:master May 1, 2016
@rxtur
Copy link
Collaborator

rxtur commented May 1, 2016

Yep, indeed - this ajax call just to check if file exists and works fine with xml provider, but db actually runs all the way with executing sql and always returns error, thinking file doesn't exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants