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

[Bug] Error 500 after attempting to create poll #1586

Closed
piratkongen opened this issue Jan 10, 2021 · 2 comments
Closed

[Bug] Error 500 after attempting to create poll #1586

piratkongen opened this issue Jan 10, 2021 · 2 comments
Assignees
Labels

Comments

@piratkongen
Copy link

Describe the bug
When in Staff Area > Polls, Trying to create a new poll (the first one) with any text and and 2 answers, then clicking CREATE.
(Not multiple choice checked),
It returns error 500 at address:
/dashboard/polls/store

No Laravel log are recorded. (For the first time for an error 500)

Expected behavior
To create poll.

UNIT3D (please complete the following information):

  • UNIT3D Version: v5.1
  • Laravel Version: Ver. 8.21.0
  • PHP Version: php8.0.0
  • Database Driver & Version: 8.0.22-0
  • Web Server Driver & Version: ubuntu0.20.04.3

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Google Chrome
  • Version: 87.0.4280
@HDVinnie
Copy link
Collaborator

You'll need to provide the error. Make sure your perms are correct. Run sudo chown -R www-data: storage bootstrap public config && sudo find . -type d -exec chmod 0775 '{}' + -or -type f -exec chmod 0644 '{}' + from project root and then try to create a poll. If fails check log.

@piratkongen
Copy link
Author

Aight.

The error was:

3 arguments are required, 2 given {"userId":3,"exception":"[object] (ArgumentCountError(code: 0): 3 arguments are required, 2 given at /var/www/html/app/Models/Poll.php:124) | Stack
-- | --

And I was able to solve it by changing
\sprintf('%%s%', $slug)
to
\sprintf('%%s%%', $slug)
on line 124 in /app/Models/Poll.php

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

No branches or pull requests

2 participants