- Issue created by @rhovland
- πΊπΈUnited States rhovland Oregon
Encountered a problem when creating the view. The product review entity had a data_table definition, but the entity was not translatable.
This was preventing the ability to choose the rendered entity option due to a mismatch in the table name being checked for in Views::fetchPluginNames().
data_table should only be used on translatable entities.I'm guessing this was a side effect of the product entity code being copied to start development of this module.
I removed the data_table definition from commerce_product_review entity and wrote an update hook to ensure existing data is migrated correctly. There should not be anything to migrate because the data field table was never created by the translation system. This update hook needs to be tested on an install with lots of reviews because I'm uncertain if it needs to be batched since no data is actually updated and it's really just the entity definition being updated (but the update system insists on running a data migration).
- πΊπΈUnited States rhovland Oregon
Here's a look at the view as installed in a new default Drupal 11 site. It's displaying the rendered entity, so any changes to the template file is reflected here on the individual reviews and field ordering and other stuff is still configured on the entity type display page.
- πΊπΈUnited States rhovland Oregon
Tested the update hook on a site with 10k reviews. Apparently using
hook_update_N(&$sandbox)
causes drupal to automatically batch the updates to avoid timeouts.With that question answered I think this is good to go. Just needs a code review.
-
rhovland β
committed 5085e129 on 2.x
Issue #3533823 by rhovland: Review pages view
-
rhovland β
committed 5085e129 on 2.x