• I am building a new website using the Twenty Twentyfour theme. I added Roboto and Robot Slab to replace the default fonts (Inter/Jost). I also added a few custom colors.

    In the block editor when I click the wrench icon to open the Create Block Theme menu and then click “Save Changes to Theme” > Save Changes, I get an error.

    Request Data

    URL: /wp-json/create-block-theme/v1/save?_locale=user
    Method: POST
    Data:

    • localizeImages: false
    • localizeText: false
    • processOnlySavedTemplates: true
    • removeNavRefs: false
    • saveFonts: true
    • saveStyle: true
    • saveTemplates: true

    Response Data

    • “code”: “internal_server_error”,
    • “message”: “There has been a critical error on this website. Learn more about troubleshooting WordPress.“,
    • “data”: {
      • “status”: 500,
      • “error”: {
        • “type”: 1,
        • “message”: “Uncaught TypeError: basename(): Argument #1 ($path) must be of type string, array given in \wp-content\plugins\create-block-theme\admin\create-theme\theme-fonts.php:117
          Stack trace:
          #0 \wp-content\plugins\create-block-theme\admin\create-theme\theme-fonts.php(117): basename(Array)
          #1 \wp-content\plugins\create-block-theme\admin\create-theme\theme-fonts.php(11): Theme_Fonts::remove_deactivated_fonts_from_theme()
          #2 \wp-content\plugins\create-block-theme\includes\class-create-block-theme-api.php(444): Theme_Fonts::persist_font_settings()
          #3 \wp-includes\rest-api\class-wp-rest-server.php(1230): Create_Block_Theme_API->rest_save_theme(Object(WP_REST_Request))
          #4 \wp-includes\rest-api\class-wp-rest-server.php(1063): WP_REST_Server->respond_to_request(Object(WP_REST_Request), ‘/create-block-t…’, Array, NULL)
          #5 \wp-includes\rest-api\class-wp-rest-server.php(439): WP_REST_Server->dispatch(Object(WP_REST_Request))
          #6 \wp-includes\rest-api.php(428): WP_REST_Server->serve_request(‘/create-block-t…’)
          #7 \wp-includes\class-wp-hook.php(324): rest_api_loaded(Object(WP))
          #8 \wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
          #9 \wp-includes\plugin.php(565): WP_Hook->do_action(Array)
          #10 \wp-includes\class-wp.php(418): do_action_ref_array(‘parse_request’, Array)
          #11 \wp-includes\class-wp.php(813): WP->parse_request(”)
          #12 \wp-includes\functions.php(1336): WP->main(”)
          #13 \wp-blog-header.php(16): wp()
          #14 \index.php(17): require(‘C:\\laragon\\www\\…’)
          #15 {main}
          thrown”,
        • “file”: “\wp-content\plugins\create-block-theme\admin\create-theme\theme-fonts.php”,
        • “line”: 117
      • }
    • },
    • “additional_errors”: []

    I’m not sure if this is something I can fix, so I thought I would report it here.

    The fonts I have loaded are:

    • Roboto (8 variants)
    • Roboto Slab (4 variants)
    • System sans-serif (1 variant)
    • System serif (1 variant)

    Other plugins loaded:

    • Advanced custom fields pro
    • SVG Block
    • Git Updater
Viewing 1 replies (of 1 total)
  • Plugin Author Jason Crist

    (@pbking)

    Thank you for the report @radgh. We released a new version just a short bit after you reported this. Would you mind trying again on the newest version? I’m not sure that anything font-related (as the error response seems to point to) was tinkered with, but something related may have fixed the issue.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.