Skip to content
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

Categories not persisting correctly when added from Post screen. #29

Closed
4imble opened this issue Jan 15, 2016 · 7 comments
Closed

Categories not persisting correctly when added from Post screen. #29

4imble opened this issue Jan 15, 2016 · 7 comments

Comments

@4imble
Copy link

4imble commented Jan 15, 2016

Potentially relevant background:

SQL Server persistance
MultiBlog

Steps to reproduce

  1. Go into admin
  2. Click content, posts
  3. Click existing post
  4. Click + in the RIGHT hand menu for categories
  5. Add a category

Result

This category will not be in the database.
Attempting to delete this category will fail.
Attempting to save this post with this category will work but toast an error
Refreshing the app pool will result in the category disappearing.

Expected Result

It should persist in the same way that it does when you add a category via the LEFT menu under Content / Categories

@rxtur
Copy link
Collaborator

rxtur commented Jan 15, 2016

Is this DB related? I just did this in test site (http://zoo.azurewebsites.net) which uses XML provider and it seems to work as expected.

@4imble
Copy link
Author

4imble commented Jan 15, 2016

Yes I am using SQL server. I am pretty sure its related to this persistence
type.
On 15 Jan 2016 5:04 pm, "rxtur" notifications@github.com wrote:

Is this DB related? I just did this in test site (
http://zoo.azurewebsites.net) which uses XML provider and it seems to
work as expected.


Reply to this email directly or view it on GitHub
#29 (comment)
.

@rxtur
Copy link
Collaborator

rxtur commented Jan 15, 2016

Actually, I don't have this issue with SQL Server either - followed your steps, all worked fine. Did you upgrade? I used fresh install to test.

@4imble
Copy link
Author

4imble commented Jan 15, 2016

This was a fresh install. I will try and reproduce on my home machine
tomorrow.
On 15 Jan 2016 11:00 pm, "rxtur" notifications@github.com wrote:

Actually, I don't have this issue with SQL Server either - followed your
steps, all worked fine. Did you upgrade? I used fresh install to test.


Reply to this email directly or view it on GitHub
#29 (comment)
.

@4imble
Copy link
Author

4imble commented Jan 18, 2016

I just tried this on another machine and I had the same problem. I used the ready published version of the blog, rather than getting the code and publishing my own. If I get chance this week, i'll have a look at the code and see if I can reproduce it there and if so then look at a fix. For now I will simply avoid making categories this way.

@rxtur
Copy link
Collaborator

rxtur commented Mar 9, 2016

Not able to recreate this.

@rxtur rxtur closed this as completed Mar 9, 2016
@iGanja
Copy link

iGanja commented Nov 22, 2017

I have this exact same issue at this time.
I am using version 3.3.5, and am running from the source code version.
I do not know if this has been fixed in some other area in the Core, but my fix was to fix the call from the angular controller used by the widget (posteditorController.js) which did NOT initialize $scope.category to { "IsChecked": false, "Id": null, "Parent": null, "Title": "", "Description": "", "Count": 0 }; as categoryContoller.js does. Instead it would only set $scope.category values as the bound fields were updated in the UI. Hence a saveCategory() call might send a payload to the api controller of {Title: "newTitle"} without all the other properties set to default values. This call would return a success from the api service, but would NOT update the database.
Hope this helps someone.

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

No branches or pull requests

3 participants