Home Forums WoodMart support forum Admin JS error breaks media / video upload buttons (woodmartConfig undefined)

Admin JS error breaks media / video upload buttons (woodmartConfig undefined)

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #705995

    damar272
    Participant

    Hi, My name is Doron.
    I’m getting a JavaScript error in wp-admin that breaks buttons on the WooCommerce product edit screen.

    Important note:
    This error existed from the beginning, when I first started working with the WoodMart theme.
    Only now, when the client asked to upload product videos, I tested it properly and noticed that the media / video upload buttons do not work because of this error.

    Error (see attached console screenshot):
    Uncaught ReferenceError: woodmartConfig is not defined
    From:
    /themes/woodmart/inc/admin/assets/js/options.js

    Result:
    Buttons in product edit do not respond
    Media / Product gallery video upload does not work

    Environment:
    WordPress 6.9.2
    WooCommerce enabled
    WoodMart theme 8.3.9
    WoodMart Core active
    PHP 8.1

    window.woodmartConfig is undefined, which causes options.js to fail.
    I’d appreciate your guidance on whether this is a known issue and how it should be fixed.

    Thank you,
    Doron

    Attachments:
    You must be logged in to view attached files.
    #706212

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    To assist you better, we kindly request that you disable all plugins not directly associated with our theme. Additionally, please provide us with your admin access credentials, so we can log in and diagnose the issue. For the proper functioning of our theme, please ensure the following essential plugins remain activated:

    WoodMart core
    WooCommerce
    Elementor/WPBakery page builder

    Thank you in advance for your cooperation.

    Best regards

    #706241

    damar272
    Participant

    Staging environment prepared for debugging

    Hello,
    Thank you for your reply.
    I’ve created a dedicated staging environment specifically for your debugging.
    So you can work safely without affecting our main development process.

    Staging for your testing:
    https://newkedem.briukda.quick-servers.com/woodmart/wp-admin/

    Main development staging (please do not work here):
    https://newkedem.briukda.quick-servers.com/wp-admin

    Important note:
    We are currently in the middle of a data migration process (products, ACF, relationships, media).
    For this reason, please limit your work to the /woodmart/ staging only.

    If a fix is required, we kindly ask that you:
    Provide a patch/list of modified files, or clearly specify what was changed (theme files, core plugin files, or settings)
    So we can safely apply the fix to our main staging environment without overwriting migrated data.

    Regarding plugins, I disable all plugins, but only essential plugins remain activated:
    WoodMart Core
    WooCommerce
    Elementor

    You are welcome to disable non-essential plugins only within this staging environment as needed for debugging.
    Please let us know once you’re done or if you need anything else from our side.

    Thank you,
    Doron

    #706306

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    Please disable all the plugins that are not related to our theme temporarily so we can test how it works without them.

    Kind Regards

    #706308

    damar272
    Participant

    hi,

    All the plugins are disabled

    doron

    #706368

    Artem Temos
    Keymaster
    Xtemos team

    This error is caused by the custom PHP code you added to your website. You need to remove it to fix the issue. Here is a screenshot https://monosnap.ai/file/rcSWiprAT3Xru37BRLqwwJJHqTWOXU

    #706382

    damar272
    Participant

    Hi,

    Thank you very much for your help, Artem.
    I removed the code, and everything is working perfectly now.
    Really appreciate your support..

    #706407

    Artem Temos
    Keymaster
    Xtemos team

    Hi Doron,

    Great to hear it’s resolved and the media/video upload buttons are working again after removing the custom PHP code.

    If you need any further help or want us to review future changes on staging, just let us know. You are always welcome.

    We’ll mark this topic as solved, but feel free to open a new one anytime.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Admin JS error breaks media / video upload buttons (woodmartConfig undefined)’ is closed to new replies.