shaarli / Shaarli

The personal, minimalist, super-fast, database free, bookmarking service - community repo
https://shaarli.readthedocs.io/
Other
3.44k stars 294 forks source link

Uncaught Error: Class 'Router' not found in /usr/share/nginx/html/shaarli/plugins/code_coloration/code_coloration.php:13 #1356

Closed Lucas-C closed 5 years ago

Lucas-C commented 5 years ago

After migrating to PHP7 and nginx/1.14.0, using shaarli code version https://github.com/shaarli/Shaarli/commit/188a99d, I face this error :

2019/08/22 19:26:23 [error] 31738#31738: *5885 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Class 'Router' n
ot found in /usr/share/nginx/html/shaarli/plugins/code_coloration/code_coloration.php:13
Stack trace:
#0 [internal function]: hook_code_coloration_render_includes(Array, Object(Shaarli\Config\ConfigManager))
#1 /usr/share/nginx/html/shaarli/application/plugin/PluginManager.php(115): call_user_func('hook_code_color...', Array, Object(Shaarli\
Config\ConfigManager))
#2 /usr/share/nginx/html/shaarli/index.php(572): Shaarli\Plugin\PluginManager->executeHooks('render_includes', Array, Array)
#3 /usr/share/nginx/html/shaarli/index.php(1951): renderPage(Object(Shaarli\Config\ConfigManager), Object(Shaarli\Plugin\PluginManager)
, Object(Shaarli\Bookmark\LinkDB), Object(Shaarli\History), Object(Shaarli\Security\SessionManager), Object(Shaarli\Security\LoginManag
er))
#4 {main}
  thrown in /usr/share/nginx/html/shaarli/plugins/code_coloration/code_coloration.php on line 13" while reading response header from up
stream, client: 10.0.3.101, server: chezsoi.org, request: "GET /shaarli/ HTTP/1.0", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.s
ock:", host: "chezsoi.org"

Would anyone have some advice please ? I do not really understand why this exception is raised

Lucas-C commented 5 years ago

Removing plugins/code_coloration solved my problem ! Is there any replacement for this plugin ? Shaarlinks snippets like this one use to be code-colored : https://chezsoi.org/shaarli/?aGVvNQ

ArthurHoaro commented 5 years ago

Please update your plugin : https://github.com/ArthurHoaro/code-coloration/releases