@luceos I have had this issue for a while now. I thought it was permissions issues.
Whenever I try enable or try to uninstall a extension I get a 500 error. When I refresh the browser it resolves itself.
Here is an example of trying to uninstall Davis HTTPS extension.
Console log:
POST https://keys-daggers.org/api/extensions/davis-securehttps 500 ()
createXhr @ admin-0bbd76c5.js:594
ajax @ admin-0bbd76c5.js:596
m.request @ admin-0bbd76c5.js:623
request @ admin-0bbd76c5.js:1905
onclick @ admin-0bbd76c5.js:1936
(anonymous) @ admin-0bbd76c5.js:309
Nginx log:
2018/03/28 22:24:12 [error] 23606#23606: *22 FastCGI sent in stderr: "PHP message: PHP Warning: array_key_exists(): The first argument should be either a string or an integer in /var/www/keysndaggers/vendor/illuminate/support/Collection.php on line 1032
PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Flarum\Extension\ExtensionManager::migrateDown() must be an instance of Flarum\Extension\Extension, null given, called in /var/www/keysndaggers/vendor/flarum/core/src/Extension/ExtensionManager.php on line 171 and defined in /var/www/keysndaggers/vendor/flarum/core/src/Extension/ExtensionManager.php:250
Stack trace:
#0 /var/www/keysndaggers/vendor/flarum/core/src/Extension/ExtensionManager.php(171): Flarum\Extension\ExtensionManager->migrateDown(NULL)
#1 /var/www/keysndaggers/vendor/flarum/core/src/Api/Controller/UninstallExtensionController.php(44): Flarum\Extension\ExtensionManager->uninstall(Object(Flarum\Extension\Extension))
#2 /var/www/keysndaggers/vendor/flarum/core/src/Api/Controller/AbstractDeleteController.php(25): Flarum\Api\Controller\UninstallExtensionController->delete(Object(Zend\Stratigility\Http\Request))
#3 /var/www/keysndaggers/vendor/flarum/core/src/Http/Handler/ControllerRouteHandler.php(53): Flarum\Api\Controller" while reading response header from upstream, client: 73.202.21.26, server: keys-daggers.org, request: "POST /api/extensions/davis-securehttps HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.1-fpm.sock:", host: "keys-daggers.org", referrer: "https://keys-daggers.org/admin"
php flarum info:
Flarum core 0.1.0-beta.7
PHP 7.1.15-1+ubuntu16.04.1+deb.sury.org+2
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, session, standard, mysqlnd, PDO, xml, bcmath, bz2, calendar, ctype, curl, dba, dom, enchant, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imap, interbase, intl, json, ldap, exif, mcrypt, msgpack, mysqli, odbc, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, shmop, SimpleXML, snmp, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, memcached, Zend OPcache
EXT flarum-akismet v0.1.0-beta.6
EXT flagrow-analytics 0.5.0
EXT flarum-approval v0.1.0-beta.7
EXT s9e-autoimage 1.0.2
EXT s9e-autovideo 1.0.0
EXT flarum-bbcode v0.1.0-beta.5
EXT oe800-bbcode-alerts 0.1.6
EXT oe800-bbcode-cards 0.1.4
EXT antoinefr-bbcode-fa v0.1.1
EXT oe800-bbcode-logo dev-master
EXT oe800-bbcode-pastebin 0.1.2
EXT oe800-bbcode-bars 0.1.5
EXT oe800-bbcode-signature 0.1.3
EXT oe800-bbcode-special 0.1.5
EXT oe800-bbcode-tables 0.1.0
EXT wiwatsrt-best-answer v0.1.0-beta.11
EXT clarkwinkelmann-comicsans v0.1.0
EXT michaelbelgium-discussion-views v0.1.0-beta.7-3.1
EXT flarum-embed v0.1.0-beta.4
EXT flarum-emoji v0.1.0-beta.6
EXT clarkwinkelmann-emojionearea 0.1.2
EXT flarum-english v0.1.0-beta.7
EXT flagrow-byobu 0.1.2
EXT flagrow-masquerade 0.1.4
EXT flagrow-user-directory 0.1.0
EXT flarum-flags v0.1.0-beta.7
EXT flarum-auth-github v0.1.0-beta.6
EXT johnhearfield-oauth-google v0.1.0-beta.8.1
EXT sijad-recaptcha 0.0.2
EXT johnhearfield-landing-page v0.1.0-beta.2
EXT sijad-links 0.1.0-beta.6
EXT flarum-lock v0.1.0-beta.7
EXT flarum-markdown v0.1.0-beta.5
EXT s9e-mediaembed 0.3.2
EXT flarum-mentions v0.1.0-beta.7
EXT antoinefr-money 0.4.0
EXT antoinefr-online 0.2.0
EXT sijad-pages dev-master (2ee22c1ef3139335ad78606dfc6fee375d6d9a2e)
EXT wiseclock-profile-image-crop 0.1.1
EXT reflar-gamification 1.3.0
EXT ganuonglachanh-search 0.2
EXT davis-socialprofile 0.2.3
EXT flarum-sticky v0.1.0-beta.7
EXT flarum-subscriptions v0.1.0-beta.6
EXT jordanjay29-summaries 0.2.0
EXT flarum-suspend v0.1.0-beta.7
EXT flarum-tags v0.1.0-beta.8
EXT issyrocks12-users-list 0.2.2.1
Base URL: https://keys-daggers.org
Installation path: /var/www/keysndaggers