Closed (fixed)
Project:
Drupal core
Version:
8.9.x-dev
Component:
taxonomy.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jun 2019 at 15:30 UTC
Updated:
12 Mar 2020 at 21:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
b_sharpe commentedComment #3
tatarbjEven the patch seems quite straight forward, I've tried to reproduce the issue on a new 8.7.x drupal standard site, enabling layout_builder, but whenever I create a new taxonomy term, using the shipped Tags one, I always get the same page where it's indicated the new term is created and available under its link - when I click it, I have no issues (layout_builder is in use for this taxonomy).
Could you give a bit more step-by-step reproduction to the issue itself?
Bests,
Balazs.
Comment #4
b_sharpe commentedSteps to reproduce:
This is due to Layout Builder attempting to generate "preview" data, which creates a New Taxonomy Term entity to be rendered that triggers the code fixed in the patch.
Comment #5
jérôme dehorterHi,
Patch works for me to solve "Rendered entity" choice for taxonomy term with custom fields.
I am on Drupal 8.7.4.
Comment #6
jonraedeke commentedThis patch works for me as well. I was using Layout Builder for a term page and attempting to add the "Entity view (Taxonomy term)" block. This threw an AJAX error similar to the issue description. After saving the Layout Builder settings, that LB edit page threw a similar fatal error.
Comment #7
sker101 commentedThe patch works for me. I'm using another view in one of my view as "entity view" in the layout builder and it's throwing the error since the entity in the entity view is not an existing entity.
Comment #9
b_sharpe commentedReroll for 8.8, trying to look into how to build a test around this, but interestingly enough there doesn't seem to be any test coverage around unsaved nodes or terms that i can find, so for now just leaving the patch for those who need.
Comment #10
b_sharpe commentedOK I lied, here is a test to confirm issue and combined patch to confirm fixed.
Comment #12
b_sharpe commentedNo functional changes, just fixing missing method visibility.
Comment #14
b_sharpe commentedComment #15
b_sharpe commentedComment #16
aaronchristian commentedLooks good to me. Tested with 8.8.1 & 8.9.x-dev.
Marking as RTBC, thanks for fixing this annoying core bug!
Before:
After:
Comment #17
aaronchristian commentedComment #19
b_sharpe commentedFailed test seems unrelated, triggering again, also bumping to major given this takes minimal steps to reproduce and is a FATAL from core.
Comment #20
b_sharpe commentedAs expected test fail unrelated, back to RTBC
Comment #24
webchickNice catch! Thanks for the fix, and for the helpful screenshots showing the fix in action!
Committed and pushed to 9.0.x, 8.9.x, and 8.8.x. Thanks!