Skip Navigation

[Resolved] CSS Loading Issue with Views active.

This thread is resolved. Here is a description of the problem and solution.

Problem:
Views by default disables the Avada CSS and JS compilers to create files for dynamic theme styles (they are inlined instead), but the client doesn't want that.

Solution:
When Avada is active we have now added a setting for this at Toolset > Settings.

This support ticket is created 5 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 11 replies, has 2 voices.

Last updated by michaelA-13 5 years, 8 months ago.

Assisted by: Nigel.

Author
Posts
#1084467

I had to modify the default style enqueue for Avada from:

wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'avada-stylesheet' ) );
}

to

wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'fusion-dynamic-css' ) );
}

This is to prioritize my css over the dynamic css.

This all works good and fine until views is activated. Then neither the dynamic nor my css is loaded anymore.

As soon as I return to the default loading code, it loads but my css is not top anymore.

Michael

#1084468

Password for protection is same as user and FTP

#1084580

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Michael

Views (and Layouts, if active) disable the Avada CSS and JS compilers that add dynamic stylesheets and scripts, see https://toolset.com/documentation/recommended-themes/toolset-and-avada-theme-layouts-and-custom-templates-without-coding/#avadas-css-and-javascript-compilers-are-not-working-when-using-toolset

We understand that some clients may not want to and are adding the ability to disable disabling the Avada compilers. The work looks complete, but from the internal tickets its not clear when the update should be available, I'm asking now for clarification, and I'll update you soon.

Disabling the Avada CSS and JS compilers was required for adding Avada theme options to Toolset templates, and if you choose to re-enable them then Avada theme options set on Toolset templates won't work reliably.

#1084581

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Actually, the update was included in the Layouts 2.4.1 release published earlier today.

Once you have updated you can go to Toolset > Settings and you will find a section to enable the Fusion compilers.

#1084585

Hi Nigel,

I updated layout and activated the compiler setting.

But my problem still exists that it does not work with my change to "wp_enqueue_style" ....array( 'avada-stylesheet' ) );... works. .....array( 'fusion-dynamic-css' ) );.... does not work. And I need this to have my css be loaded after the avada dynamic css.

Got this from here: hidden link

And it works perfectly fine until views is activated.

Michael

#1084694

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Michael

I tested this and the setting to use the Fusion Compiler is only available when using Layouts, not when just using Views, so Views goes ahead and disables it and inlines the dynamic stylesheet in the header, which means when you try to enqueue your stylesheet dependent upon it the dependency is missing and your stylesheet isn't enqueued at all.

I'm escalating this so my colleagues can take a closer look. It may be possible to use some hook to disable disabling the Fusion compiler ahead of a fix to the options page, but I'll need clarification on that.

I'll keep you posted.

#1085505

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Michael

Checking your site again the setting for the Fusion Compiler doesn't appear to be working, although it does on my local test site.

I note that your Toolset plugins are not up-to-date on your staging site.

Is it okay if I update them so I can check again whether it works?

#1085506

Hi Nigel, that would be perfect since I am currently not in the office to to it myself 🙂

Michael

#1085525

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Michael

I updated your Toolset plugins.

I edited your Avada settings (Avada > Theme Options > Advanced > Dynamic CSS & JS) to use Files (otherwise there is no fusion-dynamic-css file which your code to modify enqueuing the child theme CSS uses).

I edited the functions.php of your child theme to re-instate your enqueue code.

Now when I visit the front end and inspect the page source I see that the child theme style.css is loaded *after* the Avada dynamic CSS file, which I think is your intention.

#1085543

Hi Nigel,

That seems to be resolved 🙂 Thx

I now noticed that with types active (as of my instilling the newest version recently) my font awesome icons do not work. anymore.

Can be seen on homepage.

As soon as I deactivate types all is good again.

Michael

New threads created by Nigel and linked to this one are listed below:

https://toolset.com/forums/topic/split-font-awesome-icons-not-working-after-updating-to-types-3-x/

#1085643

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

OK, great. I've split the font awesome issue into another thread (one issue per thread), and I'll take a look at that as soon as I can.

#1093808

Resolved Thanks

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.