Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPM errors from blueprints are not logged #2505

Closed
OleVik opened this issue May 15, 2019 · 1 comment
Closed

GPM errors from blueprints are not logged #2505

OleVik opened this issue May 15, 2019 · 1 comment
Assignees

Comments

@OleVik
Copy link
Contributor

OleVik commented May 15, 2019

An error popped up because of a forgotten reference to a class in a method, but that error never made its way to logs/grav.log or the console. This was only visible in Admin, because the method is called statically by a blueprint.

The error is present in v1.7.1-beta.1 of the Presentation-plugin, when blueprint.yaml calls the getRevealThemes()-method. That is, it tries to include_once Utilities.php, which at this point has been moved into /classes. The error is a normal PHP Fatal error: Uncaught Error: Class 'Grav\Plugin\PresentationPlugin\Utilities' not found in C:\Users\Ole\GitHub\grav-plugin-presentation\presentation.php, revealed by running php bin/gpm index.

Replication

Environment:

  • Core v1.6.9
  • Admin v1.9.4
  • Email v3.0.2
  • Error v1.6.2
  • Form v3.0.3
  • Login v3.0.2
  • Markdown Notices v1.0.1
  • Presentation v1.7.1-beta.1
  • Presentation Deckset v1.2.0
  • Problems v2.0.3
  • Shortcode Core v4.1.1

System.yaml:

absolute_urls: false

home:
  alias: '/home'

pages:
  theme: quark
  markdown:
    extra: false
  process:
    markdown: true
    twig: false

cache:
  enabled: false
  check:
    method: file
  driver: auto
  prefix: 'g'

twig:
  cache: false
  debug: true
  auto_reload: true
  autoescape: false

assets:
  css_pipeline: false
  css_minify: true
  css_rewrite: true
  js_pipeline: false
  js_minify: true

errors:
  display: true
  log: true

debugger:
  enabled: true
  twig: true
  shutdown:
    close_connection: true
gpm:
  releases: stable
  verify_peer: true
  1. Install environment
  2. Visit /admin/plugins
  3. Observe that no plugin-information loads, and no errors are logged to console or grav.log

For an easy diff between the working version of the plugin, and the broke version, consider: OleVik/grav-plugin-presentation@v1.7.0-beta.1...v1.7.1-beta.1

The problem was resolved in v1.7.1-beta.4 of the plugin, but the error should still persist in Admin.

@mahagr mahagr transferred this issue from getgrav/grav-plugin-admin May 16, 2019
@mahagr
Copy link
Member

mahagr commented May 16, 2019

@OleVik New version should both log the error and display it inside the debug bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants