• hello!

    Our client site is using a couple of plugins in their eCommerce site including
    Woocommerce Stock Manager
    wc-frontend-manager
    sumomemberships
    with multiple languages, tried WPML and Translatepress

    However, we found that when woocommerce-stock-manager is activated. It will randomly generate apache error “LimitInternalRecursion” especially the with language path attached eg. domain.com/en, domain.com/zh_tw/.
    We tested extensively with different combinations of plugins and sort out this result.

    Then we take a closer look in the code to see what is happening.

    In class-stock-manager.php, there is a function create_table() which is doing require_once WP upgrade API for using the dbdelta() function. We have done an experiment that without loading anything in the plugin and requiring this file. The “LimitInternalRecursion” error will occur immediately.
    It might be the fact that the upgrade.php is not suitable to be used in that way or for other reasons.

    We have deployed the test packages into different hosting including AWS, SG Shared Hosting, SG Managed Cloud. All give the same result. We have eliminated other factors such as individual code by turning them off and on and minimise the set of plugins to test together.

    After consideration, we raise the issue here and hopefully it could be resolved or providing alternative options, workaround or updating the code.

    Thanks for providing the plugin with essential features and thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter 西門 正 Code Guy

    (@simongcc)

    Hello!

    For instance, we have prepared a debug site for all plugins involved in making the mysterious 500 error which I have mentioned before.
    Please leave me an email or a contact method so I could send you the credentials.

    Environment
    ======================
    Basic setup
    ———–
    Woocommerce
    Translatepress (2 languages, zh hk as main and en as 2nd)
    rewardsystem
    sumomemberships
    wc-frontend-manager
    wc-multivendor-marketplace
    Any theme(for testing purpose, our client theme is remain unchanged in testing server)

    How to reproduce
    ======================
    activate Woocommerce Stock Manager
    clear permalink by going to permalink page and click save
    run the bash script below to see how it react

    Plugins involved
    rewardsystem
    sumomemberships
    wc-frontend-manager
    wc-multivendor-marketplace (ultimate is only enhancement)

    Woocommerce Stock Manager will trigger the following problem with one of the 4 plugins above.
    Because Woocommerce Stock Manager include the Core db api for ugrade use(upgrade.php), inside this file, it include another file that will trigger the flush procedures.

    The 4 plugins have written the same logic that the flush is under a function that will be called in each page load when plugin is initialised and being triggered by the wp-admin/includes/misc.php included by the upgrade API. In fact, the flush should only be put inside activation or deactivation or when needed but not on each loading.

    Condition to make the problem appearing: Translatepress or any rewrite-based multilingual plugins

    Testing procedure
    ======================
    You may test by 2 parts

    # watch http reply
    # prepare a bash script or batch file if using Windows
    for i in {1..100000}
    do
    curl -I domain/en/%E5%B8%B8%E8%A6%8B%E5%95%8F%E9%A1%8C/
    done

    procedure to clear the problem
    stop previously running bash script
    deactivate stock manager
    clear permalink by going to permalink page and click save
    run the bash script to see how it react
    at the same time, you may check the .htaccess, it is being changed on each page load. And thus because 4 plugins is clearing the .htaccess in each load, Server(Apache) confused, give 500 errors before .htaccess could be outputted again on time.

    Observable phenomenon
    1
    You could see that after activating stock manger, the http begin to reply with 500 error and
    stop producing 500 after deactivating it.

    2
    If turning off all of these 4 plugins
    rewardsystem
    sumomemberships
    wc-frontend-manager (ultimate is only enhancement)
    wc-multivendor-marketplace

    Woocommerce Stock Manager alone will not trigger any problem because there is no flush routines on each load normally.

    I suggest Woocommerce Stock Manager to communicate with these 4 plugins to resolve the problem together because it is mutually affecting each other including reputations while layman users will get confused and created a substantial support tickets to them including Translatepress.

    Thanks a lot.

    Plugin Author storeapps

    (@storeapps)

    Hi Simon,

    We have received your ticket in our support system and we will continue conversation over there.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stock Manager will cause several plugin rewrite error’ is closed to new replies.