friendsofflarum / drafts Goto Github PK
View Code? Open in Web Editor NEWEnables creation of discussion drafts
License: MIT License
Enables creation of discussion drafts
License: MIT License
Loading icon that inside of draft window is appearing when I click discard removing article.
Just an error found in the logs:
[2022-01-31 10:05:20] flarum.ERROR: TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /opt/flarum/vendor/fof/drafts/src/Command/UpdateDraftHandler.php:56
Stack trace:
#0 /opt/flarum/vendor/fof/drafts/src/Command/UpdateDraftHandler.php(56): array_key_exists()
#1 /opt/flarum/vendor/illuminate/bus/Dispatcher.php(122): FoF\Drafts\Command\UpdateDraftHandler->handle()
#2 /opt/flarum/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#3 /opt/flarum/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#4 /opt/flarum/vendor/illuminate/bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then()
#5 /opt/flarum/vendor/illuminate/bus/Dispatcher.php(78): Illuminate\Bus\Dispatcher->dispatchNow()
#6 /opt/flarum/vendor/fof/drafts/src/Api/Controller/UpdateDraftController.php(47): Illuminate\Bus\Dispatcher->dispatch()
#7 /opt/flarum/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(110): FoF\Drafts\Api\Controller\UpdateDraftController->data()
Environment
Current Behavior
schuled drafts do not published
Environment
Output of "php flarum info", run this in terminal in your Flarum directory.
https://user-images.githubusercontent.com/46409161/155394007-e22f7a5c-8d69-4d55-840b-ede130c68fa8.jpg
https://user-images.githubusercontent.com/46409161/155394477-37f56d9d-1c19-4484-a806-d1730fc8513f.jpg
my config is like below. schuled drafts do not post anything.
crontab;
* * * * * www-data cd /var/www/html && php flarum schedule:run >> /dev/null 2>&1
php flarum schedule:run command;
root@flarum:/var/www/html# php flarum schedule:run
[2022-02-23T17:53:17+00:00] Running scheduled command: Publish all scheduled drafts.
I wrote long article and I forget session time duration. I clicked to save draft then the editor was closed and flarum gave me error (Oops.. Somethings went wrong ... ) and success (Draft saved) notification together. But my article has gone because editor was closed. I could not save. Can we prevent closing of editor window. You can try this. Sign in to flarum which draft ext. is enabled and open two tabs. Then write sometings and sign out on second tab. After this save your post by draft. You will see.
Autosave should only fire when there is something to save
Current Behavior
TypeError drafts/./src/forum/index in equalRelationships
Cannot use 'in' operator to search for 'discussion' in undefined
Steps to Reproduce
Sadly I don't know.
Expected Behavior
No error
Environment
Additional Context
Found this error in Sentry.
Scenario:
1 - Open Compose Window
2 - Type Title and Content and start discussion
3- Then edit created first entry
Problem: Extension create a new draft without title of the realted entry if you edit.
Current Behavior
I made a video of my findings to better explain what is goin on:
https://www.youtube.com/watch?v=vfThk2LwFqw
Create a new draft, give it a title, some content and select 2 main tags, close it and navigate to a new tag and refresh the page.
Open up the draft and a few things can happen:
if you have fof/best-answer
installed. this error will pop up 3 times:
mount-redraw.jss:15 TypeError: Cannot read properties of undefined (reading 'isQnA')
at forum.js?v=b0cfa628:594:10305
at Array.some (<anonymous>)
at e.<anonymous> (forum.js?v=b0cfa628:594:10278)
at e.Mr.forEach.t.<computed> [as headerItems] (forum.js?v=b0cfa628:2:359707)
at e.n.view (forum.js?v=b0cfa628:2:200827)
at Function.a (forum.js?v=b0cfa628:2:140858)
at forum.js?v=b0cfa628:2:147298
at p (forum.js?v=b0cfa628:2:147685)
at f (forum.js?v=b0cfa628:2:145411)
at forum.js?v=b0cfa628:2:147195
after disabling that mod.
The other errors I encountered (see video):
index.jss:88 Uncaught TypeError: Cannot read properties of undefined (reading 'id')
at r (index.jss:88:50)
at Array.map (<anonymous>)
at h (fillRelationship.jss:1:59)
at d (index.jss:90:23)
at t.x.initializers.add.nt.changed (index.jss:102:14)
at t.<anonymous> (index.jss:203:14)
at t.Rr.forEach.t.<computed> [as preventExit] (extend.tss:86:24)
at t.e.close (ComposerState.jss:105:14)
at L.handleEvent (render.jss:888:55)
TagDiscussionModal.jss:72 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'canStartDiscussion')
at e.r.addTag (TagDiscussionModal.jss:72:14)
at Array.map (<anonymous>)
at TagDiscussionModal.jss:47:33
mount-redraw.jss:15 TypeError: Cannot read properties of null (reading 'type')
at Draft.jss:75:125
at Array.map (<anonymous>)
at h (fillRelationship.jss:1:59)
at Draft.jss:75:54
at Array.forEach (<anonymous>)
at e.loadRelationships (Draft.jss:70:34)
at e.type (Draft.jss:29:32)
at e.icon (Draft.jss:44:18)
at e.a.view (DraftsListItem.tsxx:33:23)
at Function.a (render.jss:30:16)
Environment
Flarum core 1.2.1
PHP version: 8.0.18
MySQL version: 10.5.15-MariaDB-1:10.5.15+maria~focal
Loaded extensions: Core, phpdbg_webhelper, date, libxml, pcre, zlib, filter, hash, json, readline, Reflection, SPL, session, ctype, curl, dom, fileinfo, gd, gmp, iconv, intl, mbstring, openssl, PDO, standard, tokenizer, xmlwriter, zip, exif, mysqlnd, Phar, pdo_mysql, apcu, Zend OPcache
+---------------------------------+---------+--------+
| Flarum Extensions | | |
+---------------------------------+---------+--------+
| ID | Version | Commit |
+---------------------------------+---------+--------+
| flarum-flags | v1.2.0 | |
| flarum-suspend | v1.2.0 | |
| flarum-approval | v1.2.0 | |
| fof-oauth | 1.2.0 | |
| flarum-subscriptions | v1.2.0 | |
| flarum-tags | v1.2.0 | |
| v17development-user-badges | v1.0.0 | |
| v17development-seo | v1.8.0 | |
| the-turk-diff | 1.1.1 | |
| sycho-profile-cover | v1.3.1 | |
| michaelbelgium-discussion-views | v7.1.3 | |
| fof-user-bio | 1.0.2 | |
| fof-upload | 1.1.0 | |
| fof-terms | 1.1.2 | |
| fof-subscribed | 1.1.0 | |
| fof-split | 1.0.1 | |
| fof-sitemap | 1.0.3 | |
| fof-secure-https | 1.0.1 | |
| fof-recaptcha | 1.1.0 | |
| fof-reactions | 1.1.0 | |
| fof-polls | 1.0.5 | |
| fof-pages | 1.0.4 | |
| fof-merge-discussions | 1.2.2 | |
| fof-masquerade | 2.1.0 | |
| fof-links | 1.0.3 | |
| fof-impersonate | 1.0.1 | |
| fof-formatting | 1.0.2 | |
| fof-follow-tags | 1.1.2 | |
| fof-drafts | 1.1.1 | |
| fof-disposable-emails | 1.0.0 | |
| fof-default-user-preferences | 1.0.0 | |
| fof-default-group | 1.0.1 | |
| fof-cookie-consent | 1.1.0 | |
| fof-ban-ips | 1.0.2 | |
| fof-analytics | 1.0.0 | |
| flarum-sticky | v1.2.0 | |
| flarum-statistics | v1.2.0 | |
| flarum-mentions | v1.2.0 | |
| flarum-markdown | v1.2.0 | |
| flarum-lock | v1.2.0 | |
| flarum-lang-english | v1.2.0 | |
| flarum-emoji | v1.2.0 | |
| flarum-bbcode | v1.2.0 | |
| clarkwinkelmann-status | 1.0.0 | |
| clarkwinkelmann-emojionearea | 1.0.0 | |
+---------------------------------+---------+--------+
Base URL: https://dicemakers.org
Queue driver: sync
Mail driver: mailgun
Debug mode: off
Additional Context
I have a feeling this is just due to the 2nd tag being unloaded when I refresh the page. Just a hunch
Say we start a post, and are working on a draft. autosave is saving along (#9). Then we decide to scrap it and shut everything down. We end up with a draft that has absolutely no content, which is useless and kinda annoying. Potential ways to handle this:
"You do not have permission to do that." error pops up when I try to start a thread from a tag page.
I've translated every key from the plugin to Spanish but this one seems not to be translatable. Could it be related with this literal I found in the code? https://github.com/FriendsOfFlarum/drafts/blob/master/js/src/forum/addDraftsDropdown.js#L21
Just two quick suggestions for features, though they may not be on the roadmap (apologies if these are partial duplicates, I just spotted lots of activity in the pull requests section around UX - amazing!):
This could also allow disabling the little 'save draft' floppydisk icon, which might save a little clutter in the compose interface.
Current Behavior
The Scheduler didn't work
Steps to Reproduce
Expected Behavior
I would expect it to publish the Post at the correct time
Possible solution(s)
Just include the instructions for crontab in the README
At the moment, it appears that if I set message recipients via byōbu when drafting a message, those recipients are not preserved with the message when saving as a draft. It'd be great to see support added for that, so folks don't inadvertently publicly publish what they think to have already privatized. Thanks!
If you save a draft and then immediately close the composer, you are asked the standard question when closing the composer with content in it: 'You have not posted your discussion / reply. Do you wish to discard it?'. That should be replaced with a less confusing question: 'You don't want to post your discussion / reply right now?'
It's even more confusing if you open an existing draft, make some changes, save the draft again and then close the composer. You are confronted with the question "Discard changes to the draft?", which you have to answer with OK, even if you do not want to discard your last changes. Moreover, the changes are actually saved, only the changes made after the last save are discarded.
Expected behaviour in both cases: If no changes are made after the last saving of the draft, the composer should be closed without confirmation or at least with a less confusing formulation.
As the title says, login as a user without permission to create drafts. Notice the autosave options are still present in their profile.
I believe this should only be displayed if a user has the permission to use drafts, otherwise could be misleading.
Is your feature request related to a problem? Please describe.
The current draft extension does not support saving drafts on the writing page of the v17development/flarum-blog extension at all. Writing long articles really requires a draft function!
Describe the solution you'd like
I request that the draft extension provide support for the v17 development/flarum-blog extension, including a manual save button like a normal topic post and an auto-save function, thank you very much!
Describe alternatives you've considered
Provides draft support for Blog extensions via an enableable option.
If users close the composer and there are unsaved changes, they are prompted: "Discard changes to draft? In this case, wouldn't it make sense to automatically save the draft once more without asking the user?
If people are used to autosafe, they don't understand why they are sometimes asked to discard changes, and sometimes not, if by chance the last autosafe happened just before they decided to close the composer.
A PR to core and byobu (and tags) needs to be submitted so that the onsubmit methods of the composers return promises. Then, we can extend that to add a .then
, which will allow us to only delete on successful submit.
Similar to #1:
If a discussion with a poll is saved as a draft the poll part is not saved.
Do we want this?
Just an error found in the logs:
[2022-01-31 10:05:20] flarum.ERROR: ErrorException: Undefined array key "attributes" in /opt/flarum/vendor/fof/drafts/src/Command/UpdateDraftHandler.php:56
Stack trace:
#0 /opt/flarum/vendor/fof/drafts/src/Command/UpdateDraftHandler.php(56): FoF\Sentry\SentryServiceProvider->handleError()
#1 /opt/flarum/vendor/illuminate/bus/Dispatcher.php(122): FoF\Drafts\Command\UpdateDraftHandler->handle()
Environment
Currently, the "Save" button does not show up on mobile. This isn't that good: in fact, the majority of times someone would want to save something would probably be on mobile. Furthermore, while #7 is great on desktop, not so much on mobile. So, options on mobile:
Users could schedule when their draft should be published. A cron-based / laravel scheduler-based system would publish drafts as appropriate, setting post time to the scheduled time.
Do we want this?
Is your feature request related to a problem? Please describe.
If a post is edited no draft are saved.
Sometimes exist also long edits and will be useful have a draft saved.
If a post is edited, currently no draft are saved.
Current Behavior
Flarum encountered a boot error after enable this plugin
Steps to Reproduce
Expected Behavior
Plugin can work well
Environment
Flarum core: 1.8.1
PHP version: 7.4.3-4ubuntu2.18
MySQL version: 10.11.3-MariaDB
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, session, standard, sodium, gmp, mysqlnd, PDO, xml, bcmath, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, json, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
+--------------------------------------+---------+--------+
| Flarum Extensions | | |
+--------------------------------------+---------+--------+
| ID | Version | Commit |
+--------------------------------------+---------+--------+
| flarum-flags | v1.8.0 | |
| flarum-approval | v1.8.0 | |
| flarum-likes | v1.8.0 | |
| flarum-subscriptions | v1.8.0 | |
| flarum-tags | v1.8.0 | |
| clarkwinkelmann-likes-received | 1.0.2 | |
| fof-follow-tags | 1.1.7 | |
| yannisme-oxotheme | 2.1.5 | |
| justoverclock-user-statistics | 0.1.9 | |
| imshuzai-aplayer-metingjs-for-flarum | 1.1.5 | |
| ianm-no-meta-title | 1.1.0 | |
| ianm-follow-users | 1.3.0 | |
| fof-polls | 1.3.0 | |
| fof-nightmode | 1.5.2 | |
| fof-drafts | 1.2.2 | |
| flarum-suspend | v1.8.0 | |
| flarum-sticky | v1.8.0 | |
| flarum-statistics | v1.8.0 | |
| flarum-mentions | v1.8.0 | |
| flarum-markdown | v1.8.0 | |
| flarum-lock | v1.8.0 | |
| flarum-lang-english | v1.8.0 | |
| flarum-lang-chinese-traditional | v1.12.1 | |
| flarum-lang-chinese-simplified | v1.3.0 | |
| flarum-emoji | v1.8.0 | |
| flarum-bbcode | v1.8.0 | |
| datlechin-usercard-uid | v0.1.1 | |
| askvortsov-pwa | v3.3.3 | |
+--------------------------------------+---------+--------+
Base URL: https://board.yang-qwq.ml
Installation path: /var/www/flarum
Queue driver: redis
Session driver: redis (Code override. Configured to file)
Scheduler status: Active
Mail driver: smtp
Debug mode: off
Possible solution(s)
Update packages
composer dump-autoload
Reset plugin
modify extend.php
Additional Context
Here is my flarum logs and apache error logs
[2023-06-13 11:58:52] flarum.ERROR: Error: Class 'FoF\Drafts\Console\PublishSchedule' not found in /var/www/flarum/vendor/fof/drafts/extend.php:47
Stack trace:
#0 /var/www/flarum/vendor/flarum/core/src/Extension/Extension.php(373): require()
#1 /var/www/flarum/vendor/flarum/core/src/Extension/Extension.php(388): Flarum\Extension\Extension->getExtenders()
#2 /var/www/flarum/vendor/flarum/core/src/Extension/Extension.php(303): Flarum\Extension\Extension->getLifecycleExtenders()
#3 /var/www/flarum/vendor/flarum/core/src/Extension/ExtensionManager.php(216): Flarum\Extension\Extension->enable()
#4 /var/www/flarum/vendor/flarum/core/src/Extension/Command/ToggleExtensionHandler.php(36): Flarum\Extension\ExtensionManager->enable()
#5 /var/www/flarum/vendor/illuminate/bus/Dispatcher.php(122): Flarum\Extension\Command\ToggleExtensionHandler->handle()
#6 /var/www/flarum/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#7 /var/www/flarum/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#8 /var/www/flarum/vendor/illuminate/bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then()
#9 /var/www/flarum/vendor/illuminate/bus/Dispatcher.php(78): Illuminate\Bus\Dispatcher->dispatchNow()
#10 /var/www/flarum/vendor/flarum/core/src/Api/Controller/UpdateExtensionController.php(43): Illuminate\Bus\Dispatcher->dispatch()
#11 /var/www/flarum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Api\Controller\UpdateExtensionController->handle()
#12 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#13 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ExecuteRoute->process()
#14 /var/www/flarum/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle()
#15 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\ThrottleApi->process()
#16 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(44): Laminas\Stratigility\Next->handle()
#17 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\CheckCsrfToken->process()
#18 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(69): Laminas\Stratigility\Next->handle()
#19 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ResolveRoute->process()
#20 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle()
#21 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\SetLocale->process()
#22 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(58): Laminas\Stratigility\Next->handle()
#23 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithHeader->process()
#24 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle()
#25 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithSession->process()
#26 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle()
#27 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\RememberFromCookie->process()
#28 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#29 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\StartSession->process()
#30 /var/www/flarum/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle()
#31 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\FakeHttpMethods->process()
#32 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#33 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ParseJsonBody->process()
#34 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#35 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\HandleErrors->process()
#36 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle()
#37 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\InjectActorReference->process()
#38 /var/www/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle()
#39 /var/www/flarum/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#40 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\RequestHandler->process()
#41 /var/www/flarum/vendor/middlewares/base-path-router/src/BasePathRouter.php(101): Laminas\Stratigility\Next->handle()
#42 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePathRouter->process()
#43 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle()
#44 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Laminas\Stratigility\Middleware\OriginalMessages->process()
#45 /var/www/flarum/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle()
#46 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePath->process()
#47 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle()
#48 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ProcessIp->process()
#49 /var/www/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle()
#50 /var/www/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(64): Laminas\Stratigility\MiddlewarePipe->process()
#51 /var/www/flarum/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle()
#52 /var/www/flarum/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#53 /var/www/flarum/public/index.php(26): Flarum\Http\Server->listen()
#54 {main}
Current Behavior
Yesterday I finally figured out what was causing that, since a few days ago the scheduled discussions of the users were not being published, I thought it was some problem with the cron job but everything was exactly the same and working. It turns out that a user scheduled a draft of a reply (not a discussion as normally), this caused all scheduled drafts to be blocked from posting for days. It was only until the scheduling of this reply was removed that all scheduled messages that had failed to post were published all at once.
I have run the same scenario again on purpose to confirm this and consistently the same thing happens.
Steps to Reproduce
Current Behavior
I edited a draft and tried to switch to another draft while saving, now i can't load my drafts anymore:
Flarum core: 1.8.3
PHP version: 8.0.30
MySQL version: 8.0.33
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, bcmath, bz2, calendar, ctype, dba, dom, hash, fileinfo, filter, ftp, gettext, gmp, SPL, iconv, session, json, mbstring, pcntl, standard, posix, Reflection, imap, shmop, SimpleXML, soap, sockets, Phar, exif, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlwriter, zip, mysqlnd, imagick, curl, gd, mysqli, PDO, pdo_mysql, xsl, sqlite3, intl, sodium, ldap, tidy, pdo_pgsql, pdo_sqlite, igbinary, redis, Zend OPcache
+----------------------------------+---------+--------+
| Flarum Extensions | | |
+----------------------------------+---------+--------+
| ID | Version | Commit |
+----------------------------------+---------+--------+
| flarum-flags | v1.8.0 | |
| flarum-approval | v1.8.0 | |
| flarum-suspend | v1.8.1 | |
| flarum-subscriptions | v1.8.0 | |
| flarum-tags | v1.8.0 | |
| askvortsov-auto-moderator | v0.1.3 | |
| afrux-forum-widgets-core | v0.1.7 | |
| fof-pages | 1.0.7 | |
| ianm-level-ranks | 1.1.0 | |
| fof-user-directory | 1.3.2 | |
| fof-follow-tags | 1.2.2 | |
| flarum-markdown | v1.8.0 | |
| webbinaro-age-check | 0.0.7 | |
| v17development-user-badges | v1.1.0 | |
| v17development-seo | v1.8.0 | |
| the-turk-flamoji | 1.0.4 | |
| sycho-profile-cover | v1.3.5 | |
| nearata-discord-widget | v1.0.1 | |
| katosdev-signature | 1.3 | |
| justoverclock-hot-discussions | 0.1.2 | |
| justoverclock-custom-html-widget | 0.1.4 | |
| fof-webhooks | 1.2.2 | |
| fof-username-request | 1.2.1 | |
| fof-user-bio | 1.3.0 | |
| fof-upload | 1.4.4 | |
| fof-terms | 1.3.0 | |
| fof-spamblock | 1.1.0 | |
| fof-socialprofile | 1.1.5 | |
| fof-sitemap | 2.2.0 | |
| fof-share-social | 1.1.2 | |
| fof-reactions | 1.3.2 | |
| fof-profile-image-crop | 1.1.6 | |
| fof-polls | 1.4.2 | |
| fof-oauth | 1.5.3 | |
| fof-merge-discussions | 1.4.1 | |
| fof-links | 1.2.0 | |
| fof-impersonate | 1.1.1 | |
| fof-ignore-users | 1.2.0 | |
| fof-forum-statistics-widget | 1.1.0 | |
| fof-formatting | 1.0.3 | |
| fof-drafts | 1.2.8 | |
| fof-doorman | 1.1.3 | |
| fof-cookie-consent | 1.1.1 | |
| fof-best-answer | 1.3.3 | |
| fof-analytics | 1.1.0 | |
| flarumite-simple-spoilers | 1.0.0 | |
| flarum-sticky | v1.8.0 | |
| flarum-statistics | v1.8.0 | |
| flarum-mentions | v1.8.2 | |
| flarum-lock | v1.8.0 | |
| flarum-likes | v1.8.0 | |
| flarum-lang-german | 1.8.3 | |
| flarum-lang-english | v1.8.0 | |
| flarum-emoji | v1.8.0 | |
| flarum-bbcode | v1.8.0 | |
| datlechin-link-preview | v1.4.0 | |
| datlechin-bbcode-hide-content | v0.1.5 | |
| datitisev-post-galleries | 1.1.1 | |
| clarkwinkelmann-group-invitation | 1.0.2 | |
| askvortsov-rich-text | v2.1.7 | |
| afrux-online-users-widget | v0.1.6 | |
+----------------------------------+---------+--------+
Queue driver: sync
Session driver: file
Scheduler status: Inaktiv
Mail driver: smtp
Debug mode: off
Current Behavior
Draft schedule can be set but it does not post automatically at the set time and date.
Steps to Reproduce
In Builder.php line 517:
No query results for model [Flarum\Discussion\Discussion].
drafts:publish
Expected Behavior
The scheduled post is supposed to go live at the scheduled time
Screenshots
None.
Environment
Output of "php flarum info", run this in terminal in your Flarum directory.
Flarum core 1.0.4
PHP version: 8.0.8
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv, json, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, mbstring, tokenizer, xml, i360, bcmath, dba, dom, enchant, fileinfo, gd, igbinary, imap, intl, ldap, exif, memcache, memcached, mysqli, mysqlnd, odbc, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, xmlreader, xmlwriter, xsl, zip, Zend OPcache
+-------------------------------------+--------------+--------+
| Flarum Extensions | | |
+-------------------------------------+--------------+--------+
| ID | Version | Commit |
+-------------------------------------+--------------+--------+
| flarum-flags | v1.0.0 | |
| flarum-suspend | v1.0.0 | |
| flarum-subscriptions | v1.0.0 | |
| flarum-tags | v1.0.3 | |
| flarum-lock | v1.0.0 | |
| fof-impersonate | 1.0.0 | |
| fof-oauth | 1.0.1 | |
| fof-spamblock | 1.0.0 | |
| flarum-approval | v1.0.0 | |
| fof-user-directory | 1.0.2 | |
| fof-follow-tags | 1.0.1 | |
| askvortsov-markdown-tables | v1.2.1 | |
| fof-gamification | 1.0.0 | |
| fof-drafts | 1.0.1 | |
| flarum-pusher | v1.0.0 | |
| blomstra-database-queue | 0.1-beta.1 | |
| fof-ignore-users | 1.0.0 | |
| the-turk-diff | 1.1.1 | |
| ianm-syndication | 1.0.2 | |
| clarkwinkelmann-mailing | 1.0.0 | |
| askvortsov-pwa | v3.0.3 | |
| clarkwinkelmann-group-list | 1.0.0 | |
| extiverse-mercury | 0.1.3 | |
| flarum-markdown | v1.0.1 | |
| malago-ads | 0.3.2 | |
| fof-merge-discussions | 1.0.0 | |
| clarkwinkelmann-circle-groups | 1.0.0 | |
| justoverclock-keywords | 1.9.1 | |
| ianm-html-head | 1.0.0 | |
| phenomlab-scrolltotop | 0.1.6 | |
| justoverclock-guestengagement | 1.0.0 | |
| fof-subscribed | 1.0.0 | |
| v17development-blog | v0.4.0 | |
| flarumite-simple-spoilers | 1.0.0 | |
| fof-bbcode-details | 1.0.0 | |
| fof-default-group | 1.0.0 | |
| fof-doorman | 1.0.0 | |
| fof-moderator-notes | 1.0.0 | |
| fof-profile-image-crop | 1.0.0 | |
| fof-sitemap | 1.0.0 | |
| fof-username-request | 1.0.0 | |
| sycho-profile-cover | v1.3.0 | |
| flarum-statistics | v1.0.0 | |
| flarum-lang-english | v1.0.0 | |
| flarum-emoji | v1.0.0 | |
| flarum-sticky | v1.0.0 | |
| v17development-seo | v1.8.0 | |
| askvortsov-moderator-warnings | v0.6.0 | |
| fof-recaptcha | 1.0.0 | |
| fof-user-bio | 1.0.0 | |
| fof-socialprofile | 1.0.0 | |
| fof-share-social | 1.0.0 | |
| fof-reactions | 1.0.0 | |
| fof-pages | 1.0.1 | |
| fof-nightmode | 1.0.0 | |
| fof-links | 1.0.0 | |
| fof-geoip | 1.0.0 | |
| fof-default-user-preferences | 1.0.0 | |
| fof-analytics | 1.0.0 | |
| flarum-embed | v1.0.0 | |
| fof-upload | 1.0.1 | |
| fof-bbcode-tabs | 1.0.0 | |
| fof-custom-footer | 1.0.0 | |
| flarum-likes | v1.0.0 | |
| sycho-advanced-extension-categories | v0.1.3 | |
| fof-frontpage | 1.0.0 | |
| fof-split | 1.0.0 | |
| clarkwinkelmann-shadow-ban | 1.0.1 | |
| fof-stopforumspam | 1.0.0 | |
| clarkwinkelmann-post-bookmarks | 1.0.0 | |
| flarum-mentions | v1.0.0 | |
| glowingblue-password-strength | 3.0.0 | |
| flarum-bbcode | v1.0.0 | |
| fof-byobu | 1.0.0-beta.7 | |
| fof-formatting | 1.0.0 | |
| fof-polls | 1.0.3 | |
| fof-pretty-mail | 1.0.1 | |
| zerosonesfun-featured-card | 1.0.3 | |
| fof-best-answer | 1.0.1 | |
| noriods-auto-more | v1.0.0 | |
| malago-achievements | 0.4.3 | |
| flarumite-simple-discussion-views | 1.0.3 | |
| acpl-mobile-tab | 1.0.3 | |
| askvortsov-categories | v3.0.0 | |
| ianm-follow-users | 1.0.2 | |
+-------------------------------------+--------------+--------+
Base URL: https://www.kobocity.com
Installation path: /home/kobocity/flarum
Debug mode: off
**Possible solution(s)**
<!--- Only if you have suggestions or a fix for the bug -->
**Additional Context**
NA
It doesn't work well sometime,and it's hard to say,so I have a video,please check it
the video
My Flarum info
Flarum core 1.0.4 PHP version: 7.4.22 Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, ctype, curl, dom, filter, ftp, gd, gettext, hash, iconv, intl, json, mbstring, SPL, session, pcntl, standard, PDO, mysqlnd, pdo_sqlite, Phar, posix, Reflection, pdo_mysql, shmop, SimpleXML, soap, sockets, sodium, mysqli, sysvsem, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, fileinfo, redis, exif, bt_safe, bt_filter, Zend OPcache +--------------------------------------+-------------+--------+ | Flarum Extensions | | | +--------------------------------------+-------------+--------+ | ID | Version | Commit | +--------------------------------------+-------------+--------+ | flarum-flags | v1.0.0 | | | flarum-subscriptions | v1.0.0 | | | flarum-tags | v1.0.3 | | | flarum-markdown | v1.0.1 | | | flarum-approval | v1.0.0 | | | afrux-forum-widgets-core | v0.1.5 | | | flarum-likes | v1.0.0 | | | fof-oauth | 1.0.1 | | | flarum-suspend | v1.0.0 | | | fof-follow-tags | 1.0.1 | | | flarum-bbcode | v1.0.0 | | | fof-drafts | 1.0.1 | | | fof-analytics | 1.0.0 | | | askvortsov-rich-text | v2.1.0 | | | sycho-discussion-canonical-url | v0.1.0 | | | fof-pwned-passwords | 1.0.0 | | | clarkwinkelmann-emojionearea | 1.0.0 | | | afrux-asirem | v0.1.3 | | | justoverclock-simple-calendar-widget | 0.1.0 | | | zequeen-acgembed-remastered | v1.1.2 | | | noriods-auto-more | v1.0.0 | | | askvortsov-moderator-warnings | v0.6.0 | | | afrux-news-widget | v0.1.0 | | | fof-cookie-consent | 1.0.0 | | | michaelbelgium-discussion-views | v7.0.0 | | | nearata-copy-code-to-clipboard | v2.0.0 | | | fof-forum-statistics-widget | 1.0.1 | | | fof-ignore-users | 1.0.0 | | | fof-nightmode | 1.0.0 | | | fof-pages | 1.0.1 | | | fof-profile-image-crop | 1.0.0 | | | fof-upload | 1.0.2 | | | fof-username-request | 1.0.0 | | | malago-linkpreview | 0.1.0 | | | antoinefr-money | v1.1.0 | | | justoverclock-readmore | 1.0.4 | | | askvortsov-categories | v3.0.0 | | | ramesh-dada-gui-image-and-link | 1.0 | | | acpl-mobile-tab | 1.0.5 | | | flarum-lang-malaysian | v0.1.0 | | | flarum-statistics | v1.0.0 | | | flarum-emoji | v1.0.0 | | | flarum-lang-english | v1.0.0 | | | flarum-lock | v1.0.0 | | | flarum-mentions | v1.0.0 | | | flarum-pusher | v1.0.0 | | | ffans-lang-simplified-chinese | v1.0.4.0810 | | | fof-linguist | 1.0.0 | | | flarumtr-mobile-search | v1.2 | | | ramesh-dada-realtime | 100.1 | | | dem13n-topic-starter-label | 0.1.7 | | | phenomlab-scrolltotop | 0.1.6 | | | sycho-profile-cover | v1.3.0 | | | starsriver-mathplus | 0.3.2 | | | justoverclock-guestengagement | 1.0.2 | | | fof-recaptcha | 1.0.0 | | | fof-user-bio | 1.0.0 | | | fof-terms | 1.0.0 | | | fof-polls | 1.0.3 | | | fof-links | 1.0.0 | | | fof-frontpage | 1.0.0 | | | malago-ads | 0.3.2 | | | zerosonesfun-direct-links | 2.2 | | | fof-best-answer | 1.1.2 | | | fof-default-user-preferences | 1.0.0 | | | afrux-top-posters-widget | v0.1.3 | | | afrux-online-users-widget | v0.1.5 | | | flarum-sticky | v1.0.0 | | | nearata-signup-confirm-password | v3.0.0 | | | nearata-embed-video | v3.0.0 | | | fof-formatting | 1.0.0 | | | clarkwinkelmann-circle-groups | 1.0.0 | | | fof-impersonate | 1.0.0 | | | fof-geoip | 1.0.0 | | | justoverclock-welcomebox | 1.2.9 | | | malago-achievements | 0.5.0 | | | fof-realtimelogin | 1.0.0 | | | fof-user-directory | 1.0.2 | | | phenomlab-fancybox-wrapper | 0.8 | | | miniflar-bbcode-progress-bars | 1.0.0 | | | the-turk-diff | 1.1.1 | | +--------------------------------------+-------------+--------+ Base URL: https:
Hi, drafts looks great and is really useful functionality, thanks for this and all the excellent work of FoF! I wanted to share a small potential bug report.
To reproduce: Set up a clean instance, install draft via composer, and save a draft as an admin user.
When now logging in as a member (if members don't have permission to use drafts), or as a non-registered user, whenever you refresh the page (browser control-r refresh), it pops up with the following error message: "You do not have permission to do that."
Have copy-pasted the debug report below:
`GET http://www.example.com/discuss/api/drafts
{
"errors": [
{
"status": "403",
"code": "permission_denied",
"detail": "Flarum\User\Exception\PermissionDeniedException in /home/www/discuss/vendor/flarum/core/src/User/AssertPermissionTrait.php:31\nStack trace:\n#0 /home/www/discuss/vendor/flarum/core/src/User/AssertPermissionTrait.php(61): FoF\Drafts\Api\Controller\ListDraftsController->assertPermission()\n#1 /home/www/discuss/vendor/fof/drafts/src/Api/Controller/ListDraftsController.php(44): FoF\Drafts\Api\Controller\ListDraftsController->assertCan()\n#2 /home/www/discuss/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(96): FoF\Drafts\Api\Controller\ListDraftsController->data()\n#3 /home/www/discuss/vendor/flarum/core/src/Http/RouteHandlerFactory.php(38): Flarum\Api\Controller\AbstractSerializeController->handle()\n#4 /home/www/discuss/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(65): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()\n#5 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\DispatchRoute->process()\n#6 /home/www/discuss/vendor/flarum/core/src/Http/Middleware/SetLocale.php(50): Laminas\Stratigility\Next->handle()\n#7 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\SetLocale->process()\n#8 /home/www/discuss/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(37): Laminas\Stratigility\Next->handle()\n#9 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\CheckCsrfToken->process()\n#10 /home/www/discuss/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(55): Laminas\Stratigility\Next->handle()\n#11 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithHeader->process()\n#12 /home/www/discuss/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(32): Laminas\Stratigility\Next->handle()\n#13 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithSession->process()\n#14 /home/www/discuss/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(51): Laminas\Stratigility\Next->handle()\n#15 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\RememberFromCookie->process()\n#16 /home/www/discuss/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()\n#17 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\StartSession->process()\n#18 /home/www/discuss/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle()\n#19 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Api\Middleware\FakeHttpMethods->process()\n#20 /home/www/discuss/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()\n#21 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ParseJsonBody->process()\n#22 /home/www/discuss/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()\n#23 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\HandleErrors->process()\n#24 /home/www/discuss/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle()\n#25 /home/www/discuss/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()\n#26 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\RequestHandler->process()\n#27 /home/www/discuss/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Laminas\Stratigility\Next->handle()\n#28 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePathRouter->process()\n#29 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(42): Laminas\Stratigility\Next->handle()\n#30 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Laminas\Stratigility\Middleware\OriginalMessages->process()\n#31 /home/www/discuss/vendor/middlewares/base-path/src/BasePath.php(53): Laminas\Stratigility\Next->handle()\n#32 /home/www/discuss/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePath->process()\n#33 /home/www/discuss/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle()\n#34 /home/www/discuss/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(73): Laminas\Stratigility\MiddlewarePipe->process()\n#35 /home/www/discuss/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle()\n#36 /home/www/discuss/vendor/flarum/core/src/Http/Server.php(42): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()\n#37 /home/www/discuss/index.php(26): Flarum\Http\Server->listen()\n#38 {main}"
}
]
}`
How about asking the user to continue with an existing draft within the current discussion, when they simply click "Reply" or quote another post? In case of a quote and the decision to continue with an existing draft, the quote could be added at the end of the draft.
Current Behavior
Title not restored from auto-save
Steps to Reproduce
Expected Behavior
Title should be restored as well, not only content. It seems like it is saved, as in the drafts dropdown one can see it even after reloading the page.
Environment
Flarum core 1.4.1
PHP version: 8.0.22
MySQL version: 10.7.4-MariaDB-1:10.7.4+maria~focal
Loaded extensions: Core, date, libxml, pcre, zlib, filter, hash, json, readline, Reflection, SPL, session, ctype, curl, dom, fileinfo, gd, gmp, iconv, mbstring, openssl, pcntl, PDO, posix, standard, SimpleXML, sodium, tokenizer, xml, xmlwriter, zip, exif, mysqlnd, Phar, xmlreader, pdo_mysql, igbinary, redis, Zend OPcache, xdebug
+----------------------+---------+--------+
| Flarum Extensions | | |
+----------------------+---------+--------+
| ID | Version | Commit |
+----------------------+---------+--------+
| flarum-flags | v1.4.0 | |
| fof-drafts | 1.1.2 | |
| flarum-tags | v1.4.0 | |
| flarum-suspend | v1.4.0 | |
| flarum-subscriptions | v1.4.0 | |
| flarum-sticky | v1.4.0 | |
| flarum-statistics | v1.4.1 | |
| flarum-mentions | v1.4.0 | |
| flarum-markdown | v1.4.0 | |
| flarum-lock | v1.4.0 | |
| flarum-likes | v1.4.0 | |
| flarum-lang-english | v1.4.0 | |
| flarum-emoji | v1.4.0 | |
| flarum-bbcode | v1.4.0 | |
| flarum-approval | v1.4.0 | |
+----------------------+---------+--------+
Base URL: http://localhost:8888
Installation path: /opt/flarum
Queue driver: sync
Mail driver: mail
Debug mode: ON
You only can pick data, no time.
Hi, on Beta 14 seems many draft are created testing the extension creating post, navigate the forum.
Even after removed a draft in some minutes the draft return back.
Tested on two different Beta 14 communities.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.