• xanuex

    (@xanuex)


    I’ve been trying to analyse this problem for quite a bit now and I think it is time to ask for some help.

    Issue:
    My Mega-Menu CSS is not loaded properly after activating the Polylang plugin.

    Breakdown:
    – I’m using the latest wordpress version 6.8
    – Salient theme is up-to-date
    – All plugins are up-to-date
    – All plugins have been disabled before to check if it was another plugin that was causing the issue
    – .htaccess has been reset to wordpress standard
    – All cache (server and client) have been deleted
    – WPBakery Page Builder has the latest version

    Analysis:
    Since cache plays a role here it sometimes is a bit tricky to see if changes worked or not but I did find out the following: If I delete or rename the file “menu-dynamic.css” in the folder “/wp-content/uploads/salient/” the menu works like a charm. Until this file is being placed back and then it doesn’t.

    – It is being placed back as soon as I update something (Page, Post) in WordPress.
    – Without Polylang active this problem does not exist.

    Question:
    Can someone tell me where to look next? It seems like Polylang does something during the update of a Page/Post (or others) which messes up the menu-dynamic.css file.

    Thanks in advance!
    If you need more info, please let me know.

    – Marcel


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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter xanuex

    (@xanuex)

    Just to visually see what it should and should not look like, I’ve attached a picture.
    Applies to both menu dropdowns in both English and Dutch.

    Top = Perfect
    Bottom = Problem

    Thread Starter xanuex

    (@xanuex)

    Just to kick this one up again.. anyone who can point me in the right direction?

    Thread Starter xanuex

    (@xanuex)

    So.. It looks like “menu-dynamic.css” is being generated for just one language. When polylang is active this part breaks and the css for the menu is no longer correct.

    I’ve tried to bypass this by deactivating polylang and let wordpress create a good CSS file. I’ve then copied this and renamed it with “fixed”. Then in the functions.php I’ve added the code below, basically to redirect to the right css file.

    I know this is not the solution but I cannot seem to find the real problem yet. Unfortunately this doesn’t work either…

    I cannot believe that there aren’t other people with a similar problem where CSS generated files are not linked correctly when using the polylang plugin. Anyone who can help me further into a direction?

    function override_menu_dynamic_css() {
    wp_dequeue_style('menu-dynamic'); // Verwijder de foutieve
    wp_enqueue_style('menu-dynamic-fixed', content_url('uploads/salient/menu-dynamic-FIXED.css'), array(), null);
    }
    add_action('wp_enqueue_scripts', 'override_menu_dynamic_css', 100);


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

The topic ‘Salient CSS problem after activating polylang plugin’ is closed to new replies.