Comments (18)
That’s messing with the core of other plugins. How about we just signal BPS about that issue their stylings causes?
from classic-commerce.
When the BPS menu is active:
When any other menu is active:
So yes, BPS is definitely blocking menu.css.
from classic-commerce.
Nice catch. I have replicated the issue.
from classic-commerce.
Was it just with BPS or did it do it with other plugins?
from classic-commerce.
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.
It may just be a BPS issue. I haven't seen it anywhere else.
from classic-commerce.
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.
OK. I 'll give it a go. Have to re-install BPS as I gave up on it.
from classic-commerce.
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.
from classic-commerce.
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.
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.
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.
@simplycomputing could you get in touch with the developer please and find out why this is happening?
from classic-commerce.
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.
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.
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.
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.
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)
- Downloadable and virtual products support HOT 2
- Add link in settings page to relaunch ClassicCommerce wizard and/or button to automatically create the pages ClassicCommerce needs HOT 3
- PHP notice: Undefined index: _low_stock_amount
- Implement custom database tables (eg. for orders) HOT 2
- Problem in WC_AJAX::add_to_cart()
- Wrong WC_Data_Store in function wc_update_product_stock()
- Calling wp_die() in the AJAX handlers of WC_AJAX makes it difficult to reuse code.
- replace get_post_status( $product_id ) with $product->get_status() in WC_AJAX::add_to_cart()
- Constructing objects using "$some_object = new Some_Class()" makes subclassing difficult.
- Backport fix for issue #27170 in WooCommerce related to missing product type dropdown HOT 15
- Include an automated check of WC version compatibility in plugins HOT 2
- wc_maybe_adjust_line_item_product_stock() HOT 1
- After deleting an order item the product is not restocked
- Request for additional actions for function wc_update_product_stock() HOT 4
- Check security fixes applied to WC since 3.5.3 HOT 2
- Sale ends at 00:00 instead of 11:59 PM on set day HOT 1
- Do we change WC version number in CC PR? HOT 2
- Travis Build tests failing. Move to Github Actions HOT 1
- Custom settings sections don't works HOT 3
- is_api_request function for MWP Hubspot Integration (and others) plugin(s)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from classic-commerce.