[deleted] Yes I did, but as I pointed out twice already, composer isn't the issue, frankly. Composer require works fine, and the module shows up in the administration section of my forum. Just the code that is in the extension doesn't seem to get executed, that's why I originally asked that one could look at it to see if I'm doing anything completely wrong (so wrongly that it doesn't cause any error to appear) instead of telling twice what I already read twice before opening this thread. (sorry if this is a bit harsh now, I appreciate the effort anyway ?)
[deleted] Thanks, Davis, but could you please point out what exactly is wrong? I mean I copy-pasted this from the github login extension and double-checked with another auth extension. (and I did run it through a lint check which didn't make up anything..... Thank you in advance
Davis [deleted] https://github.com/Cl1608Ho/flarum-ext-discord-webhook/blob/master/bootstrap.php#L7 should be: $events->subscribe(Cl11608Ho\DiscordWebhook\Controller::class); Same with line 8. And you'll want to remove line 3.
[deleted] Isn't that how the use works....? But yeah, probably I got this wrongly.... UPDATE: That didn't change anything with my code not getting executed.... Unfortunately
datitisev [deleted] Can you show us Flarum's composer.json and where you have the extension located? Example: - composer.json - workbench/ - author-flarum-ext-name/ - bootstrap.php - composer.json
Davis You should try going through and try putting echo "Test"; die(); in various places to see where it's not working. So I'd start by putting that in the bootstrap.php and continue from there.
[deleted] { "name": "flarum/flarum", "description": "Delightfully simple forum software.", "type": "project", "keywords": ["forum", "discussion"], "homepage": "http://flarum.org", "license": "MIT", "authors": [ { "name": "Toby Zerner", "email": "toby.zerner@gmail.com" }, { "name": "Franz Liedke", "email": "franz@develophp.org" } ], "support": { "issues": "https://github.com/flarum/core/issues", "source": "https://github.com/flarum/flarum", "docs": "http://flarum.org/docs" }, "require": { "flarum/core": "^0.1.0", "flarum/flarum-ext-akismet": "^0.1.0", "flarum/flarum-ext-approval": "^0.1.0", "flarum/flarum-ext-auth-facebook": "^0.1.0", "flarum/flarum-ext-auth-github": "^0.1.0", "flarum/flarum-ext-auth-twitter": "^0.1.0", "flarum/flarum-ext-bbcode": "^0.1.0", "flarum/flarum-ext-emoji": "^0.1.0", "flarum/flarum-ext-english": "^0.1.0", "flarum/flarum-ext-flags": "^0.1.0", "flarum/flarum-ext-likes": "^0.1.0", "flarum/flarum-ext-lock": "^0.1.0", "flarum/flarum-ext-markdown": "^0.1.0", "flarum/flarum-ext-mentions": "^0.1.0", "flarum/flarum-ext-pusher": "^0.1.0", "flarum/flarum-ext-sticky": "^0.1.0", "flarum/flarum-ext-subscriptions": "^0.1.0", "flarum/flarum-ext-suspend": "^0.1.0", "flarum/flarum-ext-tags": "^0.1.0", "Cl1608Ho/flarum-ext-discord-webhook": "^0.1.0@beta" }, "repositories": [ { "url": "/root/flarum-ext-discord-webhook", "type": "path" } ], "require-dev": { "franzl/studio": "^0.11.0" }, "config": { "preferred-install": "dist" }, "minimum-stability": "beta", "prefer-stable": true } And that's it, basically. The path is right and I double-checked that the code inside vendor/ is the same as under /root/flarum-ext-discord-webhook (I added the repository section and then did composer require I already tried the echo but will try adding die() too, not sure if that changes something. UPDATE: wherever I put it, it never gets executed.... As i stated in the very first post
datitisev [deleted] Some things: The repository may be formed incorrectly (in repositories[0]) or not accessible The version for Cl1608Ho/flarum-ext-discord-webhook in require needs to be *@dev
[deleted] Sorry, I realized it the moment you told me and i was going to tell you that I already double-checked the code and then I realized composer told me about symlinking.... Checked it and it was just how fact symlinked and it turned out to be a permissions problem, that although i was root when editing the source and when running composer require the Apache user wasn't able to read the source because it was just symlinked..... Fixed that, now I'm getting an error message which doesn't really makes sense to me, too..... Thanks for all the effort (and I am still wondering why nothing there complained about missing permissions......nowhere) Anyway, here is the problem: 06 08:55:09.380808 2017] [:error] [pid 28616] [client xxx.xxx.xxx.xxx:61xxx] PHP Fatal error: Uncaught ReflectionException: Class Cl1608Ho\\DiscordWebhook\\Listener\\AddClentAssets does not exist in /var/www/flarum.xxx.org/vendor/illuminate/container/Container.php:741 Stack trace: #0 /var/www/flarum.xxx.org/vendor/illuminate/container/Container.php(741): ReflectionClass->__construct('Cl1608Ho\\\\Discor...') #1 /var/www/flarum.xxx.org/vendor/illuminate/container/Container.php(631): Illuminate\\Container\\Container->build('Cl1608Ho\\\\Discor...', Array) #2 /var/www/flarum.xxx.org/vendor/flarum/core/src/Foundation/Application.php(513): Illuminate\\Container\\Container->make('Cl1608Ho\\\\Discor...', Array) #3 /var/www/flarum.xxx.org/vendor/illuminate/events/Dispatcher.php(149): Flarum\\Foundation\\Application->make('Cl1608Ho\\\\Discor...') #4 /var/www/flarum.xxx.org/vendor/illuminate/events/Dispatcher.php(135): Illuminate\\Events\\Dispatcher->resolveSubscriber('Cl1608Ho\\\\Discor...') #5 /var/www/flarum.xxx.org/flarum-ext-discord-webhook/bootstrap.php(7): Illuminate\\Events\\Dispatcher->subscribe('Cl in /var/www/flarum.xxx.org/vendor/illuminate/container/Container.php on line 741 I think some kind of wrong usage, but I don't know exactly where (source on github is a bit outdated that it doesn't have the changes with the use Cl1608Ho\DiscordWebhook that @Davis mentioned EDIT: due to wrong styling i didn't quite read the error message..... Just a typo. Another EDIT: now, could one answer my question whether it is possible to integrate tags into an extension, eg getting all tags in the whole forum or getting all tags of a certain discussion
luceos [deleted] Another EDIT: now, could one answer my question whether it is possible to integrate tags into an extension, eg getting all tags in the whole forum or getting all tags of a certain discussion Please create separate topics for each different unrelated issue, that helps others in assisting you