No options in Text formats select box

Created on 4 November 2022, over 1 year ago
Updated 22 May 2023, about 1 year ago

Problem/Motivation

I can't properly set up Civic module because text formats don't load to select box. It's so for all field that have this feature. Text formats have been configured on "Text formats and editors" page but still the list of allowed formats is empty for all configuration pages in Civic module.
Drupal version is 8.9.20.

Proposed resolution

Configured text formats correctly appear in select box.

πŸ› Bug report
Status

Fixed

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡§United Kingdom robcarr Perthshire, Scotland

    I'm seeing this too: running Drupal 9.5.3 and PHP 8.1

    Worth noting that I do not have the default text formats (eg, Plain Text, Full HTML etc) running in my site.

    Have bumped this up to 'Major' because the module cannot be configured if the text format is not set. Therefore, this module is unusable in this instance.

  • πŸ‡¬πŸ‡§United Kingdom robcarr Perthshire, Scotland

    In civicccookiecontrol/src/Form/CookieControlFormElements/text_options.yml:

    '#format': 'full_html'
    

    I don't have 'full_html' available in my site. But even then all text format options should be available.

    I tried a quick hack to change all occurrences of 'full_html' to (in my case) 'wysiwyg' in the Yaml file in the hope that the form would load correctly. Bad assumption (even uninstalled and tried to re-install).

    Looked through civicccookiecontrol/src/Form/CivicCookieControlSettings.php but can't see anything in there to help

  • πŸ‡¬πŸ‡·Greece tper Athens

    The provided patch β†’ removes the restriction of "full_html" as the single allowed format in text_format fields.

  • Assigned to tper
  • Status changed to Needs review over 1 year ago
  • πŸ‡¬πŸ‡·Greece tper Athens
  • Status changed to Needs work over 1 year ago
  • πŸ‡¬πŸ‡§United Kingdom robcarr Perthshire, Scotland

    Thanks very much for the patch as it allowed me to enable and configure.

    However, the config doesn't store the text format, so when the config at /admin/config/system/cookiecontrol is re-loaded, all 4 of the text format dropdowns are empty - so all have to be re-selected, which also requires re-acknowledging the 'Change text format?' modal pop-up. 12 clicks on top of any config changes will soon become a bit tedious.

    Not quite sure how the form config works, but would have expected '#format' value for each of the 4 text fields to pulled from the module's config as the default value, rather than it being set to either 'full_html' or empty (if the patch at #4 is applied)

    • faa10405 committed on 4.4.10
      Issue #3319073: Setup default text format and editor
      
    • faa10405 committed on 3209090-translation-for-all-languages
      Issue #3319073: Setup default text format and editor
      
  • πŸ‡¬πŸ‡·Greece tper Athens
  • Status changed to Fixed about 1 year ago
  • πŸ‡¬πŸ‡·Greece tper Athens
Production build 0.69.0 2024