Category Page Not Working

My category page display all blog posts in grid. I just discovered after days of upgrading to 7.0.4, all the blocks are combined into one. I’ll need you to take a look of what’s happening.

I’ve done the usual fault finding by deactivating plugins and cache clearing to check for bugs. The problem is, it worked for a while and then the problem came back again.

Martin

Hi Martin,

Can you double check that this file do exists:
/wp-content/themes/wp-content/themes/x/framework/css/dist/site/stacks/ethos.css
It seems missing when I access it on browser. The real issue is this

Refused to apply style from '/wp-content/themes/wp-content/themes/x/framework/css/dist/site/stacks/ethos.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Once confirmed it exists, please check in with your hosting provider about the issue. Please also check this thread.

Hi Lely,

I just downloaded the 7.0.4 x.zip in here and there isn’t a css folder inside x/framework.

The folder order seems to be different from yours:

x\framework\dist\css\site\stacks\ethos.css

Another words, in my host they appear as:

wp-content/themes/x/framework/dist/css/site/stacks/ethos.css

Lely, I don’t understand the mime thing on stackoverflow. My hosting guys aren’t sure if it’s caused by their end. They think it’s the theme.

This is the latest reply from my host,

The error suggests that there is a script on your website which cannot be executed by the browsers. This is not related to the server configuration.

Hello @corsaunelec;

It is not just the category pages. Your homepage is also experiencing the issue.
It is because of this error:

Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Your server is not loading all of the css stylesheet. Please ask further assistance with your hosting provider and ask them “Why all of this css files were not loaded.”

Meanwhile, 2 3rd party plugin maybe causing this. You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Please let us know how it goes.

OK I’ve managed to resolve the issue. I deactivated the entire plugins folder and re-uploaded WordPress 5.2.4 the wp-admin and wp-includes. Upon activating the plugins one by one, I noticed the ubermenu plugin is not playing out and will always crash the site. So I leave out the plugin and the site is restored with X’s default menu.

I visited Seven Sparks site on X theme https://sevenspark.com/docs/ubermenu-3/theme-integration/x

In it I noticed a little difference in the _nav-primary.php. I copied the code and paste it on the _nav-primary.php of X 7.0.4 and everything works like before.

So is there something missing in the _nav-primary.php file of the theme? Would love to hear your view on this.

Here’s what the file looks like in Seven Sparks page,

<?php // ============================================================================= // X THEME VIEWS/GLOBAL/_NAV-PRIMARY.PHP // ----------------------------------------------------------------------------- // Outputs the primary nav. // ============================================================================= ?>
<?php if( function_exists( 'ubermenu' ) ): ?> <?php ubermenu( 'main' , array( 'theme_location' => 'primary' ) ); ?> <?php else: ?> <?php _e( 'Navigation', '__x__' ); ?>
<?php x_output_primary_navigation(); ?>
<?php x_output_primary_navigation(); ?>
<?php endif; ?>

Hi @corsaunelec,

What’s provided there is just customization that you could do and it’s optional since Ubermenu should work without doing that in your child theme. Plus, that’s for old version of the theme, the correct path is \framework\legacy\cranium\headers\views\global\_nav-primary.php and you don’t even need to customize it since the code required is already there

if( function_exists( 'ubermenu' ) && $config_id = ubermenu_get_menu_instance_by_theme_location( 'primary' ) ):
	ubermenu( $config_id, array( 'theme_location' => 'primary') );

Perhaps it’s due to your Ubermenu configuration.

Thanks!

Now the problem is back. I deactivated Ubermenu and the problem didn’t go away.

Hi @corsaunelec,

That means it’s not the real issue, but the ones already provided above. If the CSS files aren’t loading, then the design will be affected, like all blocks will be combined as you said.

Please deactivate any of your optimization plugin or feature then test it again.

If it’s still the same, then please provide your admin login credentials in the secure note.

Thanks!

@Rad Thanks. It seems to work without the optimizer (by the host). I’ve changed to another optimizer plugin. Let’s see how it goes for the next few days.

Thank you for informing us about the progress.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.