• Resolved herukakmc

    (@herukakmc)


    Hi

    I added some JavaScript and CSS in Tools > Layout CSS & JavaScript and since then the BB admin bar has stopped appearing when I click on Beaver Builder from the WP admin bar on any page of the site: https://www.meditateinlondon.org

    This is the page I added the Javascript to:https://test.meditateinlondon.org/building-inner-strength-copy

    This is the JavaScript I added to make a BB module show / hide. The toggle button is at the bottom of the page.

    When you load the page this error appears in the console:

    Uncaught SyntaxError: missing ) after argument list

    and this is the JavaScript I added which is missing the ) at the very end

    const targetDiv = document.querySelector('.target-div');
    const toggleBtn = document.querySelector('.toggle-button');
    toggleBtn.addEventListener('click', (e) => {
      targetDiv.classList.toggle('display-none');
    }

    How can I edit or remove this JavaScript? I can’t access it from WordPress because the admin bar is always hidden.

    I have set up a testing environment. The only two active plugins are BB and Woocommerce.

    Here is a login to the testing environment:

    https://test.meditateinlondon.org/wp-admin
    username: bb_user
    password: BeaverBuilder108!

    I would greatly appreciate any help with this.

    Many thanks,
    Roland

    • This topic was modified 6 years, 1 month ago by herukakmc.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter herukakmc

    (@herukakmc)

    Hi,

    I have fixed the problem. For anyone who has a similar problem, this is how I did it:

    The JavaScript code created in Beaver Builder is not saved as files. The JavaScript code is saved in database tables.

    I was able to removed the JavaScript that was causing the error by doing the following:

    In cPanel > phpMyAdmin I went to the website’s database and searched for this pattern “const toggleBtn = document.querySelector”

    There were a few results found in the tables wprf_options and wprf_postmeta

    I was able to carefully remove the JavaScript code from

    – the option_value field of wprf_options table
    – the meta_value field of the wprf_postmeta table

    This fixed the problem. I hope this helps.

    Thanks,
    Roland

    Plugin Contributor Ben Carlo

    (@hinampaksh)

    Hey @herukakmc,

    Glad to hear you figured it out! And thanks for taking the time to inform us. 🙂

    Just letting you know the builder offers a safe mode option.
    https://kb.wpbeaverbuilder.com/article/518-troubleshooting-i-added-custom-code-and-now-i-cant-open-beaver-builder

    You should be able to use it to remove recently added code that may have caused issues. You no longer need to mess with the database which is risky.

    Ben

    Thread Starter herukakmc

    (@herukakmc)

    Hi Ben,

    Thanks for letting me know about the safe mode option. That’s a great solution and will be helpful if I ever run into any code related issues again.

    I appreciate you getting back to me 😄

    Have a great day,
    Roland

    • This reply was modified 6 years, 1 month ago by herukakmc.
    Plugin Contributor Ben Carlo

    (@hinampaksh)

    No worries at all, @herukakmc! We added that mode specifically for those instances! 🙂

    Enjoy BB!

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

The topic ‘BB admin bar has stopped appearing’ is closed to new replies.