thecyberworld/TheCyberHUB

[BUG] Number of created blogs stays at 0 in public profile page

Closed this issue ยท 20 comments

Describe the bug

When a user creates a new blog post, the total number of created blogs does not update in the public profile dashboard. Even after creating multiple blog posts, the count remains at 0.

To Reproduce

Log in to the application.
Navigate to the public user profile .
Create a new blog post.
Verify that the blog post is successfully created.
Return to the user .
Note that the total number of created blogs remains at 0.

Expected Behavior

After creating a blog post, the total number of created blogs in the public profile dashboard should increase to reflect the newly created post.

Screenshot/ Video

image
image

Code of Conduct

  • I agree to follow this project's Code of Conduct

It's great having you contribute to this project

๐ŸŒŸ Welcome to the community ๐ŸŒŸ

  • If you would like to continue contributing to open source and would like to do it with an awesome inclusive community.
  • You should join our Discord chat and our GitHub Organisation.
  • We help and encourage each other to contribute to open source little and often ๐Ÿ˜„.
  • Any questions let us know.

@Saifmagouri Thanks for raising this issue, would you like to work on it?

yes i would like to @ArkadiK94

@Saifmagouri if you have any questions you are welcome to ask :)

@ArkadiK94 where can i find the path of the backend in the project ?

src/features/blogs/blogSlice.js

Redux of blogs

when you save the blog is there a database in the local host ? and is every blog saved with the api or with the backend that is integrated in the local ? @ArkadiK94

@Saifmagouri frontend connected to backend with restful api . We get the data and store in redux.

Can you send the backend that you have in your server because i want to change the code in backend . @ArkadiK94

@Saifmagouri nope, you can't have access to the backend. If the issue require a backend changes you can say what you want and we will change accordingly.

image

AccessDenied Access Denied YJQ258Y7SMTRAC6V sEZBgs2btjtnto2etZ88gar0Ymu6bdW0XqMmoOW/e5a5Pt4rPFeABxKTaZrz44IETZCBS7OEdys= this is the error that i faced i want to discover what is inside the backend to fix it

can u share access denied screenshot with req/response? @Saifmagouri

no backend required, there is small mistake in logic
in blogs : blogCount

u can check out that

everytime i add a blog in my profile it doesnt change
image

image
this is another problem regarding the image
@kabir0x23

image this is another problem regarding the image @kabir0x23

can u send full screenshot, from where u are getting access deined

image
image

why is the variable blogcount changed from 38 to 0 . that is the problem
@kabir0x23

console log blog data nd userdetail, u will see there is not username in blog


u can check common thing in blog and userdetials and change iit in blog cout, it will work.

i have fixed, example. u can fix and push cahnge
image

what do you mean by check common or if you can just send me the code line of the problem @kabir0x23 thank you

@Saifmagouri thanks for raising the issue, @kabir0x23 will push the changes as he solved it.
if you would like to work on different issue you are welcome.