Problem/Motivation
Three views shipped by Commerce use format: basic_html for their empty-text area. basic_html is created by the Standard install profile only; sites
built on the Minimal profile or Drupal CMS do not have it. The views do not declare a dependency on filter.format.basic_html, so they install without error.
When the empty text renders, \Drupal\filter\Element\ProcessedText finds no format, logs Missing text format: basic_html at alert level and renders an
empty string. Customers with no orders see a blank space instead of "You have not placed any orders with us yet.", and every such page view adds an alert to the log.
Affected config:
modules/order/config/install/views.view.commerce_user_orders.ymlmodules/promotion/config/install/views.view.commerce_promotions.ymlmodules/promotion/config/install/views.view.commerce_promotion_coupons.yml
All three empty texts are a single plain sentence, so they need no HTML filtering.
Steps to reproduce
- Install Drupal with the Minimal profile (or Drupal CMS).
- Enable Commerce Order (and Commerce Promotion for the other two views).
- As a customer with no orders, visit
/user/{uid}/orders. - The empty text is missing, and the log has "Missing text format: basic_html".
Proposed resolution
Use plain_text in the three views. It is the fallback format and always exists.
Existing sites keep their installed views. A post-update could switch the format to plain_text only where basic_html does not exist, leaving
Standard-profile sites untouched. Maintainers to decide whether that is wanted.
Remaining tasks
- MR changing the three views to
plain_text. - Decide on the post-update for existing sites.
- Test: install the views on a site without
basic_htmland assert the empty text renders.
User interface changes
The empty texts render again on sites without basic_html.
API changes
None.
Data model changes
Config only: the empty-text format of three views.
Issue fork commerce-3372257
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
macsim commentedComment #3
macsim commentedComment #4
zaporylieRescoping: the coupons view is one of three Commerce views that hard-code the
basic_htmltext format, which only the Standard install profile creates.Minimal-profile sites and Drupal CMS have no such format.
All three use it for a plain-sentence empty text, and none declares a dependency on
filter.format.basic_html, so they install fine and break at render time.ProcessedTextlogs Missing text format: basic_html at alert level and renders an empty string, so customers see a blank space instead of the message:modules/order/config/install/views.view.commerce_user_orders.yml: "You have not placed any orders with us yet." on a customer's orders page.modules/promotion/config/install/views.view.commerce_promotions.ymlmodules/promotion/config/install/views.view.commerce_promotion_coupons.yml: the case reported here.These are the only
basic_htmlreferences in 3.x (config and code). Updated the title and summary to cover all three, and moved to 3.x-dev.Comment #6
zaporylieComment #7
macsim commentedThanks for the description update and MR
Code looks good to me, tests provided, no more error message on a fresh minimal install
RTBC
Comment #10
jsacksick commented