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

[BUG] Dereferencer fails logging a property node that was deleted while still being referenced #4226

Closed
1 task done
stefan-korn opened this issue Jul 15, 2024 · 1 comment

Comments

@stefan-korn
Copy link
Contributor

stefan-korn commented Jul 15, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If the Dereferencer detects a property node that was deleted while still being referenced, a WSOD is spit out with

Warning: Undefined array key "value_referencer" in Drupal\Core\Logger\LoggerChannel->log()
followed by
Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'severity' cannot be null: INSERT INTO "watchdog"
This is because the deferencer is giving an illegal value for the log level in that case.

This line is causing problems: https://github.com/GetDKAN/dkan/blob/2.x/modules/metastore/src/Reference/Dereferencer.php#L171

Expected Behavior

A message like
Property publisher reference '0efd1a5c-ee7f-5b27-bdf6-f106e78865bb' not found
should be output in watchdog in this case and not WSOD.

Steps To Reproduce

  1. Create a dataset and a publisher
  2. delete that publisher
  3. try to edit the dataset or go to admin/dkan/datasets
  4. WSOD

Environment

Relevant log output

No response

Anything else?

No response

@stefan-korn
Copy link
Contributor Author

closed as duplicate of #4207 solved with #4217

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

No branches or pull requests

1 participant