• Resolved hallcrash

    (@hallcrash)


    Hi,

    I have the CTX feed configured on a multi-site WordPress configuration. It’s been working well on the site it was originally configure on. I was trying to configure it on other site and the web bowser is catching a JavaScript error and stops loading. I thought that maybe settings were missing. But, that’s not loading either.

    Any information you could provide to resolve this is much appreciated.

    Firefox Error:


    TypeError: can't access property "options", k.provider[1] is undefined
    Bp https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    Rs https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    unstable_runWithPriority https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    qo https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    Is https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    vs https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    Ko https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    unstable_runWithPriority https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    qo https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    Ko https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    Yo https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    bs https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    notify https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    notifyNestedSubs https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    a https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    d https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    Ze https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    dispatch https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    h https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    c https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    c https://wwgarden.com/wp-content/plugins/webappick-product-feed-for-woocommerce/admin/js/V5JS/index.js?ver=6.5.74:2
    Chrome Error:
    TypeError: Cannot convert undefined or null to object
    at Object.keys (<anonymous>)
    at Du (index.js?ver=6.5.74:2:701711)
    at aa (index.js?ver=6.5.74:2:91264)
    at Va (index.js?ver=6.5.74:2:100782)
    at Yc (index.js?ver=6.5.74:2:144363)
    at Ps (index.js?ver=6.5.74:2:130667)
    at Cs (index.js?ver=6.5.74:2:130595)
    at Es (index.js?ver=6.5.74:2:130458)
    at vs (index.js?ver=6.5.74:2:127445)
    at index.js?ver=6.5.74:2:77183
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support mansary

    (@mansary)

    Dear @hallcrash

    Thanks for reaching us.

    The possible reason could be caching or a conflict with other JS file. Please, clear your website and browser cache and try again. Also, if you have a staging site, kindly deactivate other plugins and try again and check if it’s due to some sort of plugin conflict. You can also try switching the theme.

    However, if none of the above works, we kindly request you to reach us from here.

    Kind regards,

    Thread Starter hallcrash

    (@hallcrash)

    After a little more investigating, I found that the requests for 3 files are reciving 403’s. I’m not sure why it works on the original site , but not on any others.. I might be able to fiddle with a staging environment later in the week

    Failed to load resource: the server responded with a status of 403 ()
    /wp-json/ctxfeed/v1/manage_feeds:1 Failed to load resource: the server responded with a status of 403 ()
    /wp-json/ctxfeed/v1/manage_feeds/schedules:1 Failed to load resource: the server responded with a status of 403 ()

    Plugin Support mansary

    (@mansary)

    Hi @hallcrash

    Thanks for reaching us again.

    Is it’s working on the main site but not on the sub-sites, we kindly request you to install the plugin on each sub-site instead of installing it in network mode. It may help you solve the issue.

    Best regards,

    Thread Starter hallcrash

    (@hallcrash)

    Hi,

    I will try to install in on each site its needed vs network. What seems to be happening is that the “ctx_feed_api_accessed_users” value is not in the $wp_filters global. So, when the get_item_permissions_check function is called in webappick-product-feed-for-woocommerce/V5/API/RestController.php, it fails and throws a 403.

    Thread Starter hallcrash

    (@hallcrash)

    In my testing environment, I network disabled the CTX feed plugin, and used WP-CLI to activate it for the original site and the other site. Unfortunately, that didn’t make a difference.

    I was able to track down the problem, and it had nothing to do with my previous assumption. The user I use is SuperAdmin, but for some reason when creating that new site, wordpress copied that user as a ‘Customer’ into the users of that site, instead of ‘Admin’. The CTX feed pluign resets the global set user capabilities on line 95 of wp-content/plugins/webappick-product-feed-for-woocommerce/V5/API/RestController.php with “user->get_role_caps();” this set the capabilities of the REST request to ‘Customer’, which it would indeed fail. I had to write an SQL Query to update the SuperAdmins roll from ‘Customer’ to ‘Admin’ for that specific site. If I didn’t step through the code like that, checking variables. I probably would have re-installed WP from scratch, and may have ended up with the same error. I’ll have to test that out.

    It may be/was a WP bug.
    I Hope this helps someone.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Javascript error causes plugin to not display settings’ is closed to new replies.