Hamburger Menu Mobile

Posted in: Newspaper
Post count: 19

Hello TagDiv Support,
I’m using the Newspaper theme with td-composer – https://www.total-motorsport.com/
On the frontend, td-composer is loading these files:

ext-language_tools.js
ext-searchbox.js

from this path:
/wp-content/plugins/td-composer/css-live/assets/external/ace/
This causes the following console errors:

Uncaught ReferenceError: define is not defined
Uncaught ReferenceError: ace is not defined

Because of these errors, two things are broken in the header:

The hamburger menu does not open on mobile.
The search function in the header does not work.

I have already tried:

Clearing all caches
Re-saving the header template in Composer
Multiple attempts to remove the Ace scripts (both via PHP and JavaScript)

None of these fixed the issue. The site is otherwise stable.
Could you please investigate why td-composer is loading Ace Editor assets on the public frontend and provide a fix?
Thank you.

Post count: 20685

Hi,

We should start with the premise that the theme and it’s plugins have to load files, and each file has a purpose.

Those files are related to the Live CSS option in the admin bar -> https://prnt.sc/Hbv7gmqDGdZJ Only an admin can use the Live CSS option, so the files are only loaded while logged in as an admin. They are not loaded publicly, or for any other user roles.

I don’t recall seeing such an issue before, which means it’s either very specific, or it’s happening only on this website. On my test install for example I have no such errors -> https://prnt.sc/C8yG87yzGOS7

Let’s discuss it more.

If I check your website as a visitor, the mobile menu works fine -> https://prnt.sc/zMcWqAoxw9Gg and the search works fine -> https://prnt.sc/Lwq-DKrIYScY Are these only not working for you when you are logged in as an admin?

Or maybe you solved the problem already.

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.