• Resolved craigs85

    (@craigs85)


    Hi there,
    I’m just about to upgrade the version that I have. I had the free version for a while when the store was new, but since the start, there are now 5500+ categories in my store.

    This seems to be causing me issues when I try and edit the existing google feed I have, or create a new one.

    On the Add/Edit feed page, the right side that should show my categories shows a Server error message.

    Can you suggest anything?

    Thanks,
    Craig

    • This topic was modified 6 years, 10 months ago by craigs85.
Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hi Craig,

    Wow, 5500+ are a lot of categories. What does the error message say?

    Thread Starter craigs85

    (@craigs85)

    Haha I know! I have to manage it :(.

    Ok, so when I try to edit feed, it takes a LONG time.
    Then it loads just the left side where I select the name and feed type.

    The error log returns:

    mod_fcgid: stderr: PHP Warning: Invalid argument supplied for foreach() in /home/weburl/public_html/wp-includes/class-wp-hook.php on line 277, referer: https://weburl/wp-admin/admin.php?page=wp-product-feed-manager

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Craig,

    I’m a bit confused about what is causing this error. The function I use to fill the categories list is a formal WooCommerce function (get_categories). This function contains a filter and it seems to be the filter that is causing the error message.

    Do you by any chance use a plugin that alters or manages the categories? If so, what happens when you switch off this plugin?

    Also, if possible could you try to temporary switch off as many plugins as you can and see if the issues disappears?

    Thread Starter craigs85

    (@craigs85)

    Hi Michel.
    Thanks for your reply.
    I will give it a go once I can get a good time to disable the plug ins.

    I’ll report back here with my findings.
    Thanks.
    Craig

    Thread Starter craigs85

    (@craigs85)

    Hi Michel,
    I’ve disabled most plugins now and tried again.

    SImilar thing but this error in error file:

    mod_fcgid: stderr: PHP Fatal error: Maximum execution time of 300 seconds exceeded in /home/weburl/public_html/wp-includes/taxonomy.php on line 1438, referer: https://weburl/wp-admin/admin.php?page=wp-product-feed-manager

    Any suggestions?

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Yes, the wierd thing is that I use the same code as WooCommerce is using to display its category list. The error message does seem to point to the fact that it takes to long to get the category list data. But then I would expect you would get the same message when you open the Product -> Categories list.

    I will have to think a bit more about a solution for this one.

    Thread Starter craigs85

    (@craigs85)

    In my 5000+ categories, I have 10 or so that are top level, the rest are children.

    What would work for me is if I could identify one or more of these top level categories by their ID, and then included in the product feed is all products belonging to this top level category, or any of the children within it.

    This would mean a long list wouldn’t need to load maybe?

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Might be, but as long as you only see an error message in the category mapping, it’s not possible to select any category. So I would not know (at the moment) how you could select any category number.

    Thread Starter craigs85

    (@craigs85)

    I wouldn’t necessarily need to select it. I could enter the ID. (Or IDs)…

    Thread Starter craigs85

    (@craigs85)

    Hi Michel,

    Have you come up with any solution to my issue?

    Many thanks,
    Craig

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Sorry Craig that I kept silent so long.

    No, I’m still confused by what could cause this issue. Not helping is that I can’t replicate it on my server, and to be honest I don’t have the time to enter 5500+ categories manually on my test server :-(.

    Do you by any chance use a local server program like DesktopServer or Local?

    Best regards,
    Michel

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Craig,

    Could you check your WooCommerce -> Status page and tell me what values your “WP Memory Limit” and “PHP post max size” are set to?

    Best regards,
    Michel

    Thread Starter craigs85

    (@craigs85)

    Hi Michel,

    No problem!
    I’ve got WP Memory Limit = 1GB and PHP Post Max Size = 10MB.

    Is this sufficient?

    Thanks,
    Craig

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Yes, that should be more than enough.

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Craig,

    I still don’t understand why it is not working, but I added three filters you could use to limit the list of categories.

    wppfm_category_mapping_max_categories => here you can set a number that will limit the number of categories in the list.

    wppfm_category_mapping_exclude => here you can enter an array or comma separated string with category ids that you would like to exclude from the list.

    wppfm_category_mapping_exclude_tree => here you can enter an array or comma separated string with category ids that will be excluded, including the children categories belonging to that id, from the list. I think this would be the most suitable for your situation.

    Could you please send me an email to [email protected] so I can send you an patch file?

    Also tell me if you know how to use filters or if you would like me to explain it to you in the mail.

    Best regards,
    Michel

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Timing out due to large number of Categories’ is closed to new replies.