• I’m developing a site locally using Wamp.

    When creating a Category I enter Name, Slug, Description and Image, choosing “Standard” as display type.

    When clicking “Add New Category” a message in Red appears at the top of the screen saying “Undefined”.

    The new category doesn’t appear until I navigate away from the page and click to view it again.

    I’ve looked around online and found this snippet of code which I added to the functions.php in my child theme –

    function woocommerceCategorySlug( $id ){
        $term = get_term_by('id', $id, 'product_cat', 'ARRAY_A');
        return $term['slug'];       
    }

    It hasn’t had any impact though, and I continue to get the “Undefined” message each time I create a category.

    Can anyone advise on this please? I’m running the latest version of WordPress 4.7.5 and latest version of WooCommerce 3.0.7

    • This topic was modified 7 years, 10 months ago by magicalwonders. Reason: Added info
Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter magicalwonders

    (@magicalwonders)

    I’ve done a bit more testing and it would seem to be an issue with my theme that is causing this problem.

    It’s obviously not an issue with the plugin, so I’m closing this thread and marking it resolved! ??

    Were you able to resolve this issue with your theme? Can you please let me know what exactly caused this?

    I am having the same issue, while using custom theme.

    Thread Starter magicalwonders

    (@magicalwonders)

    Hello Manishk,

    I’ve been using a bit of software called TemplateToaster to create themes, so I raised a support ticket with them a couple of weeks ago.

    Coincidentally they emailed me today to advise they have solved the issue in their latest build of the software. So if you’re using this is as well, just download the latest version of software and you should be ok. (I haven’t tested it yet!)

    If your theme came from somewhere else you’ll need to contact the developer of the theme. I don’t know what the actual coding issue was, so can’t provide a DIY solution. ??

    Hello magicalwonders,

    Thanks for the explanation over the issue. I am not using this software for the themes. So, probably I need to do some more research over the issue. But I believe, it may not be necessarily a theme issue then and there is a possibility that some plugin may be causing the issue. So, I believe, best option for me is to try disabling other plugins and also to try using default WP theme.

    Thanks for your reply though.

    Thread Starter magicalwonders

    (@magicalwonders)

    Hello Manishk,

    I already tried deactivating plugins etc., That had no impact on the issue, but switching theme to default WP and the problem went away. So definitely a theme issue of some kind.

    I just tried my new build of software, but it hasn’t solved the problem. So I’m throwing it back to the vendor!

    Good luck.

    ok Thanks.

    I will share here as soon as I am able to locate the issue.

    ok, I confirm that this is a theme issue, as switching to default twentyseventeen theme removes the error message and it works perfectly.

    So, I need to dig deeper within theme to find out more.

    Thread Starter magicalwonders

    (@magicalwonders)

    Hope you manage to find what is causing the problem. My php is too limited, and on this occasion Google let me down! Lol.

    Hy,

    I have the same issue but I changed the theme, just for test, and the “Undefined” message when creating Category do not dissapear.

    Any suggestion?

    Thanks

    RMR

    Hello @arqueraweb,

    I was not able to figure the solution for this and had to just leave this, as at that point we did not need to create more categories and this was not interfering with anything else. I would still be interested, if we can figure out a solution for this.

    I think in your case, since you already tried switching the theme (I assume to default wordpress theme), you can try disabling your plugins and see if that resolves the issue. So, ultimately we need to find out which plugin is causing the issue. Once we know that, we will be more closer to locating the issue. Please share whatever you find out.

    Thread Starter magicalwonders

    (@magicalwonders)

    My software vendor notified me a few days ago to say they have now fixed this issue in their latest release.

    I’ve only just had time to test the latest version, and I no longer get the “undefined” error!

    My vendor didn’t say what in the generated themes was causing the problem, but I’ll ask them and see what they say. They might not go into details, but it won’t hurt to ask!

    Hy @manishk and @magicalwonders

    1. I identified (in staging) the critic plugin… in my case: Really Simple SSL (The last one I desactived, of course)

    2. I desactived it and reactived again (in real), and now I can create categories again, witouth “undefined” missage.

    I hope it can be usefull for you.

    Thanks and good luck ??

    RMR

    So, you mean that just deactivating and activating it back made it working and resolved the issue. So, in reality nothing is changed and it now works?

    Thread Starter magicalwonders

    (@magicalwonders)

    Hello @arqueraweb and @manishk

    It looks like different issues can cause the same problem.

    In my case, it was the theme at fault. I’ll report back if I get an update from my vendor. ??

    Yes,

    Deactivating anys re-activating has been enough in my case… this time…

    And yes, sure… The issue can have diferent causes…

    RMR

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Undefined message when creating Category’ is closed to new replies.