Giter Club home page Giter Club logo

Comments (18)

bahiirwa avatar bahiirwa commented on September 23, 2024 1

That’s messing with the core of other plugins. How about we just signal BPS about that issue their stylings causes?

from classic-commerce.

timbocode avatar timbocode commented on September 23, 2024 1

When the BPS menu is active:

image

When any other menu is active:

image

So yes, BPS is definitely blocking menu.css.

from classic-commerce.

bahiirwa avatar bahiirwa commented on September 23, 2024

Nice catch. I have replicated the issue.

from classic-commerce.

 avatar commented on September 23, 2024

Was it just with BPS or did it do it with other plugins?

from classic-commerce.

timbocode avatar timbocode commented on September 23, 2024

I replicated it with BPS but nothing else. BPS is overriding CC styles.

Try replacing the original SVG with the attached:

classiccommerce-icon-white.zip

from classic-commerce.

 avatar commented on September 23, 2024

It may just be a BPS issue. I haven't seen it anywhere else.

from classic-commerce.

timbocode avatar timbocode commented on September 23, 2024

It's something that could potentially happen with other plugins. The new SVG should prevent it. Plus, all of the Adobe crap has been removed and it's been compressed. So I think it's worth using the updated SVG if it doesn't cause any problems anywhere else (I haven't come across any).

from classic-commerce.

 avatar commented on September 23, 2024

OK. I 'll give it a go. Have to re-install BPS as I gave up on it.

from classic-commerce.

 avatar commented on September 23, 2024

Have just been testing it. It fixes the logo going big issue, but it still does a drop down of a few pixels when going to BPS menu.

cc1

cc2

from classic-commerce.

nylen avatar nylen commented on September 23, 2024

This looks like it may be somewhat similar to ClassicPress/ClassicPress#533 where a theme is including styles that break some images in the admin bar. These images are present in ClassicPress but not WordPress. The fix there was to add a couple of CSS rules to "reinforce" styles that may be overridden by other code.

from classic-commerce.

timbocode avatar timbocode commented on September 23, 2024

The problem seems to be that BPS is preventing CC stylesheets from being loaded, which means the following style isn't being applied:

#adminmenu .wp-menu-image img{max-width:20px;height:20px;-o-object-fit:fill;object-fit:fill;margin-top:-3px}

The important bit being margin-top:-3px.

One way around this would be to remove margin-top:-3px from menu.css and add an inline margin-top:-3px style in the SVG as in the attached. But this obviously isn't ideal.

classiccommerce-icon-white.zip

from classic-commerce.

nylen avatar nylen commented on September 23, 2024

BPS is preventing CC stylesheets from being loaded

Plugins should never block other plugins from loading styles. Are they really being blocked or are some rules just being overridden?

If BPS is preventing some styles from being loaded then I agree this is definitely worth asking its developer about.

from classic-commerce.

timbocode avatar timbocode commented on September 23, 2024

@simplycomputing could you get in touch with the developer please and find out why this is happening?

from classic-commerce.

timbocode avatar timbocode commented on September 23, 2024

Update - just noticed that BPS is throwing loads of PHP errors, such as:

PHP Notice:  Undefined variable: check_string3 in wp-content\plugins\bulletproof-security\includes\mscan-ajax-functions.php on line 869
PHP Warning:  A non-numeric value encountered in wp-content\plugins\bulletproof-security\includes\mscan-ajax-functions.php on line 903
PHP Notice:  Undefined variable: secure_htaccess_file in wp-content\plugins\bulletproof-security\admin\core\core.php on line 1313
PHP Notice:  Undefined variable: default_htaccess_file in wp-content\plugins\bulletproof-security\admin\core\core.php on line 1383
PHP Notice:  Undefined variable: wpadmin_htaccess_file in wp-content\plugins\bulletproof-security\admin\core\core.php on line 1453
PHP Notice:  Undefined variable: root_htaccess_file in wp-content\plugins\bulletproof-security\admin\core\core.php on line 1537
PHP Notice:  Undefined variable: current_wpadmin_htaccess_file in wp-content\plugins\bulletproof-security\admin\core\core.php on line 1613

There may be others but as my debug log was empty until I activated BPS and now has over 157000 lines in it, I don't feel inclined to check. Seems like an ugly bit of software but it has 60000+ users so it is something we need to try and sort out.

from classic-commerce.

timbocode avatar timbocode commented on September 23, 2024

Update 2 - just installed CC and BPS on WP 5.3.2 and menu.css is not being blocked. Seems like this may be a CP-specific issue. It's still throwing errors but not nearly as many.

from classic-commerce.

timbocode avatar timbocode commented on September 23, 2024

Update 3 - I think the best solution might be to ensure that the appropriate style gets loaded rather than try to get 3rd party developers to add a fix.

A simple fix would be something like this:

In class-woocommerce.php:

a) in function init_hooks(), add:

add_action( 'admin_head', array( $this, 'load_icon_style' ) );

b) add new function:

public function load_icon_style() {
  echo '<style>#adminmenu #toplevel_page_woocommerce .wp-menu-image img{max-width:20px;height:20px;margin-top:-3px}</style>';
}

Not ideal but at least it's something we have control over.

There's probably other ways too.

from classic-commerce.

 avatar commented on September 23, 2024

Seems like an ugly bit of software

I certainly don't think it could be called "best practice" by our standards. The 5 line description entry on the plugin page and the 3 top-level items on the admin menu sorta put me off it straight away.

So I think a fix at our end is a better approach. There might be other cases of plugins with similar problems.

from classic-commerce.

timbocode avatar timbocode commented on September 23, 2024

There might be other cases of plugins with similar problems.

Exactly. So I suggest we go with this approach #172 (comment) at least for now.

I'll do a PR.

from classic-commerce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.