• Resolved andy82

    (@andy82)


    Hi, i’m new to building websites. Everything was going smoothly, then I got numerous messages stating the same thing:

    key “name” in?/home/intimat2/theperfectladies.com/wp-content/plugins/woocommerce/src/Internal/ComingSoon/ComingSoonRequestHandler.php?on line?188

    It wont allow me to deactivate Woocommerce (its not highlighted) and it is up to date.

    Ive had a look through the treads but my specific issue has not been answered.

    Im looking for a step by step solution please if someone is kind enough to help

    Many thanks

    Andy

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Rajesh K. (woo-hc)

    (@rajeshml)

    Hello @andy82,

    Thank you for reaching out to WooCommerce Support.

    This kind of problem is usually caused by a conflict with your theme or with another plugin. The best way to determine this is by running a conflict test.

    To test, you’ll first want to change the theme on your site to Storefront, then check to see if the issue is still present. If that resolves the issue, you’ll want to get in touch with your theme’s developer and see if they have an update or fix for you.

    If changing the theme doesn’t help, you’ll want to deactivate all plugins except for WooCommerce and take a look. If that fixes the problem, re-enable the other plugins one by one (gradually), checking after each, to see where the issue is coming from.

    Be sure you have a good backup in place of your full site and database. You can ask your host for backup functionality or you can consider using a service like Jetpack. If something goes wrong, you will be able to restore it.

    I hope that helps! Let us know once you have done a conflict test!

    Hey,

    I just encountered this error on our website–it was significantly slowing down the WooCommerce store. I haven’t looked too deeply into the cause yet, but for us, changing line 188 from:

    if ( $font['name'] === $font_to_add['name'] ) {

    To:

    if ( $font['fontFamily'] === $font_to_add['name'] ) {

    Fixed the error. It seems the entries within the $font_data that the containing function collects, lack a “name” element; but the “fontFamily” key represents the same thing, so it seems to be a valid substitute. I’ll have to check to see if our theme is causing the loss of the “name” key, or if it was never there to begin with.

    Okay, so as @rajeshml mentioned, the issue was with our theme–which was immediately seen upon switching to the standard 2024 theme.

    To fix the issue, open up your theme.json file within your theme wp-content/themes/whatever-theme/theme.json. Under settings > typography > fontFamilies there will be a number of font-object elements (the first key seems to always be “fontFace”).

    After each “fontFace” key you probably (like we did) only have “fontFamily” and “slug” keys. So you will need to add the “name” key to each font–which will probably contain the same (or nearly the same) text as the “fontFamily” key.

    As an example (for the Noto Serif font), the old entry might look something like this:

     {
    "fontFace": [
    {
    "fontFamily": "Noto Serif",
    "fontStyle": "normal",
    "fontWeight": "100",
    "src": [
    "file:./assets/fonts/noto-serif/noto-serif_normal_100.ttf"
    ]
    },
    ...
    ...
    "fontFamily": "Noto Serif",
    "slug": "noto-serif"
    },

    But it needs to have the “name” key added like so (notice the second-last line):

     {
    "fontFace": [
    {
    "fontFamily": "Noto Serif",
    "fontStyle": "normal",
    "fontWeight": "100",
    "src": [
    "file:./assets/fonts/noto-serif/noto-serif_normal_100.ttf"
    ]
    },
    ...
    "fontFamily": "Noto Serif",
    "name": "Noto Serif",
    "slug": "noto-serif"
    },

    I’m not sure if the cause of this issue is in WordPress not generating the right keys, or if our theme was just carrying over some really old data. But either way, this should solve your problem.

    Hey, @wellwateredmaple!

    I’m glad to hear you were able to solve the issue! ??

    Thank you for sharing the solution here and contributing to the WooCommerce Community. This might help other users in the future.

    Have a wonderful day!

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