Darkle that's odd, that class was not subject to any change and still exists.
You could try running composer dump-autoload
to re-create the list of know namespaces/classes.
Darkle that's odd, that class was not subject to any change and still exists.
You could try running composer dump-autoload
to re-create the list of know namespaces/classes.
clarkwinkelmann After running that command and restarting the server services, it seems to be fixed.
I guess it's only for rare cases but is it recommended to use composer dump-autoload
after install/update extensions? I haven't used it before, but I think I'm going to write it down for future cases so I keep expanding the list of things to check when something goes wrong.
Darkle Composer is supposed to do it automatically.
Something I'm not super sure is that our official Flarum update instructions use the Composer -a
flag, which creates an authoritative classmap file. I'm not sure what happens if subsequent commands are run without the -a
flag.
With the various a
, o
and other files Composer might generate a file that contains the definitive list of all classes that exist. But apparently there might be situations where Composer doesn't update it yet continues to use it. I'm really not certain.
Personally I generally only use Composer without any of these flags. It might not be the most performant to run in production, but it's the least likely to break.
clarkwinkelmann Composer always generates autoloader from scratch, so it does not matter which flags were used in the past, only last command that generated autoloader matters.
Darkle I guess it's only for rare cases but is it recommended to use composer dump-autoload after install/update extensions?
Both composer install
and composer update
generates autoloader, so composer dump-autoload
should not be needed.
When I created the poll after updating the extension and migrating, I received the following error:
Column not found: 1054 Unknown column 'image_url' in 'field list'
I have to create the column image_url
in poll_options
table with NULL value to solve the problem.
Cactus1805 make sure you run php flarum migrate
or disable and re-enable the extension.
If you have manually created the column, it's likely to lead to errors once the actual database migration run. You should delete the manually created column and let Flarum create it through the migration.
clarkwinkelmann Thank you very much. As you suggested, I removed the column that I had manually added and disabled the extension. When I re-enabled the extension, the column appeared, and the extension functioned normally.
Today I've run a scheduled update in terminal, there was only fof/polls update, migrated database, cleared cache. But my forum crashed, no webaccess at all.
Disabled polls extension using the recommendation jordanjay29
No changes, forum doesn't response.
Debug output:
ParseError
syntax error, unexpected ''/home/my.site' (T_ENCAPSED_AND_WHITESPACE)
Description field:
/home/my.site/flarum/storage/less/lessphp_a6b0du0tvz4g04goowcookwsgggcssg.lesscache
<?php return Array(0 => new Less_Tree_Comment('// Variables',true,13, Array('entryPath' => '/home/my.site/flarum/vendor/flar
Vadim_RUNN OK. Cured by deleting all files in /storage/less directory...
Hello.
I want to add a poll in a post. Is it possible to do? Because it's a shame to only be able to do it in our first post of a discussion
Wlork no, this extension only adds zero or one poll to the discussion itself.
And it can be improved in the future? Because I would love to be able to put this poll in a post
This could be a sponsored feature, to be negotiated with any of the FriendsOfFlarum developers.
While technically the poll and vote option could be re-used, this would still require significant refactoring and require a bunch of new permissions.
Hi, sorry... HOW do I start a Poll?
There`s nothing in the Edit window to do so in the 1st Post.
Updated everything and logged in as Admin:
ThX in advance... ️
I made a pull request for this : Add poll in a post