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

Scheduled Post Permalink Leads to error #6515

Open
ArchBlood opened this issue Aug 16, 2023 · 8 comments
Open

Scheduled Post Permalink Leads to error #6515

ArchBlood opened this issue Aug 16, 2023 · 8 comments
Assignees
Labels
Milestone

Comments

@ArchBlood
Copy link
Contributor

What steps will reproduce the problem?

  • Create a scheduled Post
  • Open the drop-down on the post and select permalink and go to the post

Screenshot_20230816-073211.jpg

Screenshot_20230816-073153.png

What is the expected result?

Should show the scheduled Post or a mention of the post not being available till a scheduled date.

What do you get instead?

Oops something went wrong

Additional info

Q A
HumHub version Community site
PHP version Community site
Operating system Community site

Note: Also provide the full error stacks from Administration --> Information --> Logging and errors from your browser console if possible.
Note: Please use the community site for any questions on customizing HumHub.

@luke- luke- added the Kind:BUG label Aug 16, 2023
@yurabakhtin yurabakhtin self-assigned this Sep 7, 2023
@yurabakhtin yurabakhtin linked a pull request Sep 7, 2023 that will close this issue
3 tasks
@yurabakhtin
Copy link
Contributor

@luke- Fixed in PR #6540.

@yurabakhtin
Copy link
Contributor

We should use the approach from PR #6005 instead of #6540.

@luke- luke- added this to the v1.16 milestone Sep 13, 2023
@ArchBlood
Copy link
Contributor Author

Seems to also throw this error for notifications if you're following someone that schedules a post, this affects all versions of 1.15.

@yurabakhtin
Copy link
Contributor

@ArchBlood Do you mean user recieves a notification about scheduled post?

If yes, I am not sure it is possible because here https://github.com/humhub/humhub/blob/master/protected/humhub/modules/content/models/Content.php#L277-L280 we restrict this:

if (!$this->getStateService()->isPublished()) {
    // Don't notify about not published Content
    return;
}

Could you show what error you have and how to reproduce this if you know? Thanks.

@ArchBlood
Copy link
Contributor Author

@ArchBlood Do you mean user recieves a notification about scheduled post?

If yes, I am not sure it is possible because here https://github.com/humhub/humhub/blob/master/protected/humhub/modules/content/models/Content.php#L277-L280 we restrict this:

if (!$this->getStateService()->isPublished()) {
    // Don't notify about not published Content
    return;
}

Could you show what error you have and how to reproduce this if you know? Thanks.

I'd have to ask my client about this, as I can confirm in their instance that a notification was sent to followers of the user about the scheduled post then the error popped up, I'll try getting a test instance up and try recreating this for the error logs. 🤔

@ArchBlood
Copy link
Contributor Author

@ArchBlood Do you mean user recieves a notification about scheduled post?
If yes, I am not sure it is possible because here https://github.com/humhub/humhub/blob/master/protected/humhub/modules/content/models/Content.php#L277-L280 we restrict this:

if (!$this->getStateService()->isPublished()) {
    // Don't notify about not published Content
    return;
}

Could you show what error you have and how to reproduce this if you know? Thanks.

I'd have to ask my client about this, as I can confirm in their instance that a notification was sent to followers of the user about the scheduled post then the error popped up, I'll try getting a test instance up and try recreating this for the error logs. 🤔

Okay, I'm not able to recreate the issue for the notifications, but the viewing the scheduled post as myself or another user through the permalink does as this issue was meant for, I've also confirmed that viewing a draft through permalink also causes the same issue as this one, no error logs happen for either of these issues.

@yurabakhtin
Copy link
Contributor

@ArchBlood

but the viewing the scheduled post as myself or another user through the permalink does as this issue was meant for, I've also confirmed that viewing a draft through permalink also causes the same issue as this one, no error logs happen for either of these issues.

As I undestand you mean the "Permalink" is visible for Scheduled and Draft posts but when we click then we see only "Oooops... It looks like you may have taken the wrong turn." instead of expected post content.
Yes, I agree we have the same bug.

@luke- I see the bug was fixed in the PR #6005 as I wrote here #6515 (comment) but the PR is not merged yet and I think it would be good to merge it into master instead of next, what do you think?

@luke-
Copy link
Contributor

luke- commented Jan 15, 2024

@yurabakhtin Thanks for the info. It's not that critical, I think v1.16 is ok.

@luke- luke- modified the milestones: v1.16, v1.17 Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants