lemmon / kirby-portfolio-theme

🎡 Free minimalistic and customizable portfolio theme for Kirby CMS.
https://themes.lemmonjuice.com/portfolio/
MIT License
26 stars 4 forks source link

Argument 2 passed to Kirby\Cms\App::trigger() must be of the type array, object given #2

Closed HanGhoul closed 4 years ago

HanGhoul commented 4 years ago

Fresh install of this fine theme. Panel works, rest of the page throws the error mentioned in the title, see below for full error message. I can't trace this back to any possible local configuration mistake.

System information:

# uname -a
Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
# cat /etc/debian_version 
10.4
# apache2 -v
Server version: Apache/2.4.38 (Debian)
Server built:   2019-10-15T19:53:42
# php-fpm7.4 -v
PHP 7.4.7 (fpm-fcgi) (built: Jun 12 2020 07:47:45)
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.7, Copyright (c), by Zend Technologies

composer install finished successful:

/var/www/domain.tld/kirby  #  sudo -u www-data composer install
Cannot create cache directory /var/www/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /var/www/.composer/cache/files/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 17 installs, 0 updates, 0 removals
  - Installing getkirby/composer-installer (1.1.4): Downloading (100%)
  - Installing laminas/laminas-zendframework-bridge (1.0.4): Downloading (100%)
  - Installing laminas/laminas-escaper (2.6.1): Downloading (100%)
  - Installing symfony/polyfill-mbstring (v1.17.1): Downloading (100%)
  - Installing true/punycode (v2.1.1): Downloading (100%)
  - Installing psr/log (1.1.3): Downloading (100%)
  - Installing filp/whoops (2.7.2): Downloading (100%)
  - Installing phpmailer/phpmailer (v6.1.6): Downloading (100%)
  - Installing league/color-extractor (0.3.2): Downloading (100%)
  - Installing claviska/simpleimage (3.3.4): Downloading (100%)
  - Installing michelf/php-smartypants (1.8.1): Downloading (100%)
  - Installing mustangostang/spyc (0.6.3): Downloading (100%)
  - Installing getkirby/cms (3.4.0): Downloading (100%)
  - Installing symfony/polyfill-ctype (v1.17.1): Downloading (100%)
  - Installing twig/twig (v3.0.4): Downloading (100%)
  - Installing symfony/polyfill-php80 (v1.17.1): Downloading (100%)
  - Installing symfony/var-dumper (v5.1.2): Downloading (100%)
filp/whoops suggests installing whoops/soap (Formats errors as SOAP responses)
phpmailer/phpmailer suggests installing league/oauth2-google (Needed for Google XOAUTH2 authentication)
phpmailer/phpmailer suggests installing hayageek/oauth2-yahoo (Needed for Yahoo XOAUTH2 authentication)
phpmailer/phpmailer suggests installing stevenmaguire/oauth2-microsoft (Needed for Microsoft XOAUTH2 authentication)
symfony/var-dumper suggests installing symfony/console (To use the ServerDumpCommand and/or the bin/var-dump-server script)
Writing lock file
Generating optimized autoload files

Info from debug page

Full error message

TypeError thrown with message "Argument 2 passed to Kirby\Cms\App::trigger() must be of the type array, object given, called in /var/www/domain.tld/kirby/site/plugins/twig/index.php on line 50"

Stacktrace:

10 TypeError in /var/www/domain.tld/kirby/kirby/src/Cms/App.php:1399

9 Kirby\Cms\App:trigger in /var/www/domain.tld/kirby/site/plugins/twig/index.php:50

8 twig in /var/www/domain.tld/kirby/site/templates/default.php:3

7 include in /var/www/domain.tld/kirby/kirby/src/Toolkit/F.php:400

6 Kirby\Toolkit\F:loadIsolated in /var/www/domain.tld/kirby/kirby/src/Toolkit/F.php:377

5 Kirby\Toolkit\F:load in /var/www/domain.tld/kirby/kirby/src/Toolkit/Tpl.php:35

4 Kirby\Toolkit\Tpl:load in /var/www/domain.tld/kirby/kirby/src/Cms/Template.php:167

3 Kirby\Cms\Template:render in /var/www/domain.tld/kirby/kirby/src/Cms/Page.php:1200

2 Kirby\Cms\Page:render in /var/www/domain.tld/kirby/kirby/src/Cms/App.php:655

1 Kirby\Cms\App:io in /var/www/domain.tld/kirby/kirby/src/Cms/App.php:1004

0 Kirby\Cms\App:render in /var/www/domain.tld/kirby/index.php:6

Environment & details: Server/Request Data -
USER "www-data"
HOME "/var/www"
SCRIPT_NAME "/index.php"
REQUEST_URI "/"
QUERY_STRING ""
REQUEST_METHOD "GET"
SERVER_PROTOCOL "HTTP/2.0"
GATEWAY_INTERFACE "CGI/1.1"
REMOTE_PORT "48554"
SCRIPT_FILENAME "/var/www/domain.tld/kirby/index.php"
SERVER_ADMIN "hostmaster@domain.tld"
CONTEXT_DOCUMENT_ROOT "/var/www/domain.tld/kirby"
CONTEXT_PREFIX ""
REQUEST_SCHEME "https"
DOCUMENT_ROOT "/var/www/domain.tld/kirby"
REMOTE_ADDR "4.3.2.1"
SERVER_PORT "443"
SERVER_ADDR "1.2.3.4"
SERVER_NAME "domain.tld"
SERVER_SOFTWARE "Apache"
SERVER_SIGNATURE ""
PATH "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
HTTP_X_FORWARDED_PROTO "https"
HTTP_HOST "domain.tld"
HTTP_ACCEPT_LANGUAGE "de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7"
HTTP_ACCEPT_ENCODING "gzip, deflate, br"
HTTP_SEC_FETCH_DEST "document"
HTTP_SEC_FETCH_USER "?1"
HTTP_SEC_FETCH_MODE "navigate"
HTTP_SEC_FETCH_SITE "none"
HTTP_ACCEPT "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9"
HTTP_USER_AGENT "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.119 Safari/537.36"
HTTP_UPGRADE_INSECURE_REQUESTS "1"
HTTP_DNT "1"
HTTP_CACHE_CONTROL "max-age=0"
proxy-nokeepalive "1"
SSL_TLS_SNI "domain.tld"
HTTPS "on"
H2_STREAM_TAG "80-1"
H2_STREAM_ID "1"
H2_PUSHED_ON ""
H2_PUSHED ""
H2_PUSH "on"
H2PUSH "on"
HTTP2 "on"
HTTP_AUTHORIZATION ""
FCGI_ROLE "RESPONDER"
PHP_SELF "/index.php"
REQUEST_TIME_FLOAT 1594556053.4335
REQUEST_TIME 1594556053
Registered Handlers -
0. Whoops\Handler\PrettyPageHandler
lemmon commented 4 years ago

This has became a problem since release of Kirby 3.4.0. For some reason they only allow to pass an array as an argument for a custom hook.

Since this hook is never used in this template I have just dropped it (for now, perhaps). This issue should be resolved with template v0.4.2.

Thanks for your input!