Giter VIP home page Giter VIP logo

drafts's People

Contributors

askvortsov1 avatar corydozen avatar davwheat avatar dependabot[bot] avatar dsevillamartin avatar flarum-bot avatar imorland avatar ipurpl3x avatar karaok491 avatar kyrnedev avatar nxta avatar stylecibot avatar the-turk avatar wloot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

drafts's Issues

TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given

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

  • Flarum version: 1.0.4
  • Extension version: 1.0.3

it doesn't post schuled drafts..

Current Behavior
schuled drafts do not published

Environment

  • Flarum version: 1.20
  • Extension version: 1.0.3
  • Website URL: http://example.com
  • Webserver: apache2
  • Hosting environment: vps
  • PHP version: 7.4
  • Browser: chrome 98.0.4758.102
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.

This plugin has permission bugs

When this plug-in is turned on and you are not logged in to access, a pop-up window will display "You do not have permission to do that."

image

This api returns

{"errors":[{"status":"403","code":"permission_denied"}]}

Gives success notification after session time ends

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.

Opening draft outside of tag cause a few errors to pop up and some odd behavior

Bug Report

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

  • Webserver: nginx
  • Browser: Chrome Version 100.0.4896.127 (Official Build) (64-bit)
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

What to do with empty drafts

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:

  • When autosaving / manually saving, if we are saving an empty draft (a draft instance is attached to the composer, but every composer field is empty), just delete it. (should the UI change, perhaps to a trash icon instead of a save icon)
  • When closing an empty composer, if there is a draft attached, show a prompt "Discard this empty draft? Yes or no"

Tooltips won't disappear

Bug Report

Current Behavior
Tooltips won't disappear when you click "Delete draft" or "Delete all drafts" button.

Screenshots

Environment

  • Flarum version: 1.0.2
  • Extension version: 1.0.0
  • Browser: Firefox 89.0.1

Possible solution(s)
Set showOnFocus to false for Tooltip components.

Feature request: Allow auto-save & saving drafts of replies?

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!):

  1. It might be nice for drafts to autosave drafts every 5-X seconds or so (if a change has been made to the text), and to also automatically save whenever minimizing the compose popup. I know it pops up a warning whenever you refresh the page that you might lose your draft, but for many users it might be expected behaviour for it to autosave.

This could also allow disabling the little 'save draft' floppydisk icon, which might save a little clutter in the compose interface.

  1. Auto-saving of draft replies might also be nice (though it might require some re-architecting). But it would be helpful, since the average user might expect that their (perhaps lengthy) forum replies should also get saved as drafts, rather than just new posts.

Include Scheduler installation instructions

Bug Report

Current Behavior
The Scheduler didn't work

Steps to Reproduce

  1. Install the extension
  2. Schedule a Post
  3. Wait for it to post
  4. It doesn't happen

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

Preserve recipients set via byōbu

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!

Closing the composer after saving a draft is confusing

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.

Request draft support for v17development/flarum-blog extension

Feature Request

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.

Don't prompt the user to safe changes made after the last autosafe

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.

Draft should only be deleted if post is successful.

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.

Undefined array key "attributes"

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

  • Flarum version: 1.0.4
  • Extension version: 1.0.3

What to do with mobile?

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:

  • Addng it next to the x or next to the 'start discussion' paper plane icon. The saving/saved text would probably not work there though.
  • Adding a row beneath the header like the tags selector does. This takes up a lot of room however
  • Placing it in the bottom toolbar. It would probably blend in with irrelevant stuff though
  • Adding a row beneath the bottom toolbar dedicated to the save button + the saving/saved text. This is probably my preferred option, with putting it up top coming in close second.

Drafts scheduling

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?

Save a draft even when a post is edited

Feature Request

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.

Flarum encountered a boot error after enable plugin (Please Delete)

Bug Report

Current Behavior
Flarum encountered a boot error after enable this plugin

Steps to Reproduce

  1. composer require fof/drafts:"*"
  2. Go to admin dashboard
  3. Enable plugin, then reload
  4. Error happened

Expected Behavior
Plugin can work well

Screenshots
Snipaste_2023-06-13_20-07-10

Environment

  • Flarum version: 1.8.1
  • Extension version: 1.2.2
  • Webserver: apache2
  • Hosting environment: self-hosted ubuntu
  • PHP version: 7.4.3
  • Browser: msedge 114.0.1823.43 (x64)
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}

Scheduling a draft reply blocks all scheduled drafts

Bug Report

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

  1. Schedule a draft reply within a discussion.
  2. Schedule one or more discussion drafts for a few minutes after the scheduled reply.
  3. You can see how the scheduled draft reply never gets published and the scheduled discussions never get published either.
  4. Unschedule the scheduled reply.
  5. After about 1 minute all scheduled discussions that had failed to do so will be published.

Cant load my Drafts (TypeError: t is null loadRelationships/</e.loadedRelationships[t]< Draft.js:77)

Bug Report

Current Behavior
I edited a draft and tried to switch to another draft while saving, now i can't load my drafts anymore:

grafik

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

Schedule post not working

Bug Report

Current Behavior
Draft schedule can be set but it does not post automatically at the set time and date.

Steps to Reproduce

  1. Create a draft
  2. Schedule it to autopost at a future date and time
  3. Check if it post when the time passed
  4. See error:
    Starting...

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

  • Flarum version: 1.0.4
  • Extension version: 1.0.1
  • Website URL: https://www.kobocity.com
  • Webserver: [e.g. apache]
  • Hosting environment: [e.g. shared]
  • PHP version: 8
  • Browser: [all]
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

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:

"You do not have permission to do that" when refreshing page as non-member

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}"
}
]
}`

When users reply, remind them of existing drafts

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.

Title not restored from auto-save

Bug Report

Current Behavior
Title not restored from auto-save

Steps to Reproduce

  1. Enable auto-save in user settings
  2. Start a discussion
  3. Don't input any title
  4. Write some content
  5. Wait for auto-save
  6. Reload the page
  7. Restore auto-saved draft into composer
  8. Add a title
  9. Wait for auto-save
  10. Reload the page
  11. Restore auto-saved draft into composer
  12. See that title is missing!

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 version: 1.4.1
  • Extension version: 1.1.2
  • PHP version: 8.0
php flarum info
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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.