-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Removing a poll requires a page refresh #32
Comments
I think that the last comma at line 53 shouldn't be there (?) polls/src/Api/Controllers/DeletePollController.php Lines 51 to 54 in fb10129
Not a PHP developer, but my forum reports error at line 54 (unexpected "(") |
@CWKevo The comma would cause a syntax error before Flarum loaded, that's not the issue I'm pretty sure. It's probably caused by the EDIT: just saw your ref, it might be syntax then, interesting |
What PHP version do you use @CWKevo ? For me, using 7.4.11, this is fine, but it may cause issues on (I think 7.2) |
I couldn't reproduce this on localhost!? EDIT: Issue persists, but no errors. |
We're using PHP 7.2, might be that |
I've just pushed the removal of the extra Are you able to try |
Yes, that fixed the issue, thank you |
Shouldn't make any difference tbh |
🤷♂️ We might look into updating PHP too, if that's the issue. But there's nothing after the comma, so what's there to continue? It's similar to JSON syntax, for example:
I am not a PHP dev, but it did make a difference for some reason. Perhaps the syntax changed in PHP ^7.2, so it's less strict now about these kind of issues. |
There are some performance gains to be had from PHP 7.4, that's for sure. |
Anyways, thank you for the quick fix :) |
You're welcome 👍 |
Well, still the remove/refresh persists... oof Ian was quick 😂 |
Well, not on my side 😂 Just in case, here's php flarum info of our beta forum, I think that it might help:
Feel free to go there and test it, if you need |
The reason the poll doesn't disappear from the first post upon removal is because the post subtree retrainer prevents all redraws. This will be fixed in my PR #35 that adds a subtree check rule for Polls. |
Fixed in versions 0.3.3 for beta 15 and 0.4.0 for beta 16 |
When removing a poll, after selecting 'Remove poll', the poll remains visible in the post until a page refresh is performed
beta 15 / Polls 0.3.0
The text was updated successfully, but these errors were encountered: