Error while fetching cmb2 files when activating plugin, breaks JS main thread.

#740972
  • Resolved Anonymous
    Rank Math free

    I am having issues to use this plugin while running wordpress in kubernetes, we have a setup of 2 containers one for php and another for apache, for that reason the wp-content is a symbolic link to a shared persisted folder. When activating this plugin it will start breaking the JS code because it will not be able to find the cbmin js and css files, while checking at the console I realize that the url it is trying to use to find those files include the absolute files of those files in the system
    Bot Avatar

    It seems like you are facing an issue with Rank Math plugin while running WordPress in a Kubernetes environment with a setup of two containers for PHP and Apache, where the wp-content directory is a symbolic link to a shared persisted folder. When activating the Rank Math plugin, it breaks the JS code because it cannot find the cbmin.js and cbmin.css files. This issue occurs because the plugin is trying to access the absolute file paths of these resources in the system.

    To resolve this issue, you may need to adjust the way Rank Math plugin references these JS and CSS files. Since the plugin is trying to access the absolute file paths, you can try modifying the plugin code to use relative paths instead. By using relative paths, the plugin will be able to locate the necessary resources within the shared persisted folder.

    If modifying the plugin code is not feasible, you may consider creating symbolic links within the shared persisted folder that point to the actual locations of the cbmin.js and cbmin.css files. This way, when the plugin tries to access these resources using absolute paths, it will be redirected to the correct locations within the shared folder.

    If you encounter any difficulties while implementing these solutions or if you have any further questions, feel free to reach out to Rank Math’s support team directly for more assistance. You can contact them here.

    Please let me know if you need further assistance or have any other questions related to Rank Math.

    Sources

    Ok I tried doing the symbolic links as a partial solution but once I do that it starts to interfere with other plugins (elementor) producing an error called Minified React error #152; visit https://reactjs.org/docs/error-decoder.html?invariant=152&args%5B%5D=It for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at react-dom.min.js?ver=17.0.1:9:40786
    Bot Avatar

    I’m sorry, but I don’t have information on resolving the specific error you mentioned related to creating symbolic links for the Rank Math plugin in a Kubernetes environment with shared persisted folders. For such a complex and specific technical issue, I recommend reaching out to Rank Math’s support team directly for personalized assistance. You can contact them by opening a new support ticket here: Rank Math Support.

    If you have any other questions related to Rank Math or SEO, feel free to ask!

    Sources

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting support.

    We don’t try to access those files with a fully qualified path from within our plugin. We use WordPress functions to enqueue the scripts and styles and always use the relative paths to the vendor folder inside our plugin.

    All the path discovery after that is handled by the helpers on the CMB2 library. We simply call the cmb2-styles and cmb2-scripts with the enqueue functions of WordPress.

    Don’t hesitate to get in touch if you have any other questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Error while fetching cmb2 files when activating plugin, breaks JS main thread.’ is closed to new replies.