industrialweb
Forum Replies Created
-
Forum: Plugins
In reply to: [Post Grid] Newest Update 2.2.94 from 10/3/2024 Breaks Site AppearanceSame issue. Looking more closely, CSS does not seem to be applying or present when on the front end.
I think it might be this, for the circles. I’d imagine that the same issue happened with the nav arrows, that the CSS has disappeared from the newer versions:
If I inspect the circles, before updating, these are the styles applied.pg416ffcfcd57c .splide__pagination__page {
padding: undefined undefined undefined undefined;
border: 2px solid #1f2e45;
height: 30px;
width: 30px;
border-radius: 50% 50% 50% 50%;
}After updating, this is the only set of rules applied to the circles:
.splide__pagination li {
line-height: 1;
list-style-type: none;
pointer-events: auto;
}
With this newer version, also, the carousel shows properly in the editor, but on the front end these styles aren’t loading, or maybe there is a typo, changed class name, something along those lines.
The javascript error from above is still there, but I think that’s a red herring at this point.Forum: Plugins
In reply to: [Post Grid] Newest Update 2.2.94 from 10/3/2024 Breaks Site AppearanceIt fixed that issue, but now the blocks carousels are broken.
How it looks in the editor (correct)
How it looks on the website (broken)

Here is an error code console is giving me. This is probably a red herring. When I rolled the site back the carousel displays fine, while the error is pretty much the same cause (but maybe another line?). Here is how the error shows in the new:
Uncaught DOMException: Document.querySelector: '# .next ' is not a valid selector
initTabs https://--------.wpenginepowered.com/wp-content/plugins/post-grid/assets/block-js/block-scripts.js?ver=6.6.2:1
<anonymous> https://--------.wpenginepowered.com/wp-content/plugins/post-grid/assets/block-js/block-scripts.js?ver=6.6.2:1
block-scripts.js:1
initTabs https://--------.wpenginepowered.com/wp-content/plugins/post-grid/assets/block-js/block-scripts.js?ver=6.6.2:1
<anonymous> https://--------.wpenginepowered.com/wp-content/plugins/post-grid/assets/block-js/block-scripts.js?ver=6.6.2:1Here is how the error shows in the old (where the carousel is not broken)
Uncaught DOMException: Document.querySelector: '# .next ' is not a valid selector
initTabs https://--------.wpenginepowered.com/wp-content/plugins/post-grid/assets/block-js/block-scripts.js?ver=6.6.2:1
<anonymous> https://--------.wpenginepowered.com/wp-content/plugins/post-grid/assets/block-js/block-scripts.js?ver=6.6.2:1
EventListener.handleEvent* https://--------.wpenginepowered.com/wp-content/plugins/post-grid/assets/block-js/block-scripts.js?ver=6.6.2:1
<anonymous> https://--------.wpenginepowered.com/wp-content/plugins/post-grid/assets/block-js/block-scripts.js?ver=6.6.2:1
block-scripts.js:1Forum: Plugins
In reply to: [R+L Carriers Shipping Rates for WooCommerce] 1.8.3 breaks shippingI tried updating several times, and each time, R + L stops showing in shipping on the cart and checkout. One strange thing, with this plugin: every update attempt I get a warning that says it failed to initiate because of missing files. I am able to click “Activate” and it activates. I go to the plugins and it *looks* like all the settings are still there (API key, selected shipping methods, etc..). It just won’t load on the cart or checkout side.
.. then I roll my site back to the earlier version, and there are two versions of this plugin, the old and the new, with the old enabled. The shipping works then, and I delete the new version, 1.8.3.
I am starting to wonder if the plugin is the issue, or the update. Maybe the update when updating over an older version isn’t complete?I had to disable it for now. Previously I found that the 10 plugins I had in the manager were the ones being disabled. I changed the settings so that only 6 plugins were managed, and sure enough, only those 6 were getting disabled. I really like how well it was working to speed up the site and how easily this plugin worked. Unfortunately we lost a lot in sales all the times these have disabled on us. I just couldn’t keep it running.
Looking through the error log, I found an error (the same one someone else had 7 months ago, but a different line number). This is the only error in our system. On a related note: disabling the plugin did not remove this MU plugin that is certainly something that could be fixed in future builds.
PHP Warning: Undefined array key “HTTP_HOST” in /home/XXXXXXXXX/public_html/wp-content/mu-plugins/htpm-mu-plugin.php on line 64I found the pattern. The request is being denied whenever the weight is not an integer. It was fixed for me by changing line 284 of RLC_RateQuote.php to use int such as this: ‘Weight’=>(intval(floatval…
I don’t like updating the plugin directly since the fix will just disappear next update. Could you add this fix (or something better) to the next version?Below is the updated line if anyone would like to copy/paste into theirs to make due.
$Items[] = array_filter(['Width'=>$itemWidthInches, 'Height'=>$itemHeightInches, 'Length'=>$itemLengthInches, 'Class'=>$item['class'], 'Weight'=>(intval(floatval($item['weight'])*$item['quantity']))]);100% agreed. Just migrating from Twentytwentyfour to Twentytwentyfour child theme I lost everything I had worked on. It took all day and a lot of work to reclaim it. Why work in blocks, which are supposed to be portable, if they are going to vanish like this and take so much work to reclaim?
I was thinking I could write a plugin to do this from one theme to another, but I really hope the need disappears before then.I found a somewhat solution out of desperation searching the database. You’ll want to make a backup and this will only work if you have access to the database.
Go to WP posts and under [your prefix]_posts, search by post type.
When you enter %template_part%, you’ll see a type called “wp_template_part” these entries will have their own titles such as “Header”. They will only exist for your current template if you have saved this template part since switching. If you haven’t, you’ll only see the old theme’s entry. In your site editor, you can go to this block, make an edit and save it. Then you’ll see this new row when you search for wp_template_part in the posts under post type. Copy the old value to the new. You’ll need to do this for any template parts you find, title to title.
In your site editor be sure to make a style change to your new theme and save. Then you’ll see another of these when you search. Search the same column (post type) for %global%, you’ll see a wp_global_styles type. The title for these records should be “Custom Styles”. Copy the value from the old to the new.All those nav, header, footer and other block settings lost even though they are completely compatible. It negates the portability completely.
I just realized after a day’s work that I hadn’t made a child theme, made one, and of course lost all the settings and have to start over.
There really should be an easy way to export and import template layout & settings. I hope they do that soon.
I wish I hadn’t used the ‘recommended’ customization methods and did it all in CSS and functions.php like I used to before this. Copy, paste, done.Forum: Plugins
In reply to: [WooCommerce] “There are no payment methods available.”I have this issue. I fixed it months ago by using the shortcode for checkout in the block ( [woocommerce_checkout] ). BUT – a few days ago the issue came back
I found that if I duplicate the checkout page, the duplicate works fine, then when I make this page the checkout in Woocommerce settings payment methods are broken again, despite the page only having the shortcode as it should. I remove it as the checkout page, and payment on the duplicate works again.
Unfortunately, rolling the plugin back doesn’t fix this. Some part of this issue must be in the database. If I roll the site back to a few days ago, payments work again, but then any settings or sales from days earlier are lost.- This reply was modified 2 years, 8 months ago by industrialweb. Reason: clarity
Forum: Plugins
In reply to: [WooCommerce] Payment method bugI applied this fix months ago for another issue. Now it has returned. When I edit the checkout page, the shortcode is still there, but all payment methods are now broken. Oddly, if I duplicate the Checkout page, the payment methods on that one work… but not the actual page that is assigned as the checkout page.
If I set checkout in Woocommerce settings to the newly created page, then that one is broken just like the original.
- This reply was modified 2 years, 8 months ago by industrialweb. Reason: clarity
Forum: Plugins
In reply to: [WooCommerce] Manual Order Not Showing Payment Gateway?I am sorry about that. I had multiple windows open and it seems I replied to the wrong thread. Please disregard my above reply. It only confuses matters.
Forum: Plugins
In reply to: [WooCommerce] Manual Order Not Showing Payment Gateway?I applied this fix months ago for another issue. Now it has returned. When I edit the checkout page, the shortcode is still there, but all payment methods are now broken. Oddly, if I duplicate the Checkout page, the payment methods on *that* one work… but not the actual page that is assigned as the checkout page.
If I change the endpoint to the newly created page, then *that* one is broken just like the original.- This reply was modified 2 years, 8 months ago by industrialweb. Reason: further assessment
I made this little patch.
This might not keep working when the new version comes out. Better yet it may no longer be necessary. It just adds a class to the body tag of the cart or checkout page if the default shipping is set to local pickup (local pickup is my current default when no shipping is selected).
I managed this by adding the below to functions.php. You can see I am looking for the current shipping method to begin with “local”)///** /* Hide accessorials when RL not available by using body class. */ function my_body_classes( $classes ) { $classes[] = 'rl-unavailable'; return $classes; } function my_body_classes2( $classes ) { $classes[] = 'rl-available'; return $classes; } // Get Current Shipping Method WooCommerce add_action('wp_head', 'get_current_shipping_method'); function get_current_shipping_method(){ $current_shipping_method = WC()->session->get( 'chosen_shipping_methods' ); if(substr($current_shipping_method[0], 0, 5) == "local") { add_filter( 'body_class','my_body_classes' ); } else { add_filter( 'body_class','my_body_classes2' ); } } ///** /* END Hide accessorials when RL not available by using body class. ***///Then I added this to CSS:
body.rl-unavailable div.rlc-special-shipping { display: none; }Unfortunately, the function to hook/filter is protected within a class.
Double-unfortunately you can’t even override the variables, because their function reaches back to the base product properties in the DB rather than the weights and dimensions available in the cart data.
I really hope they make their functions hookable/filterable in the next version, or at least this one. I also hope they decide to use cart data instead of reaching all the way back to product data.
The only solution for me is modifying the plugin and renaming it – and hoping I can apply my fixes to the next version.
For now, here are my mods made to make shipping work with measurements from the cart.public function add_package_items_to_request($package, &$request) { $contents = $package['contents']; foreach ( $contents as $key => $item ) { $id = intval($item['variation_id'])?$item['variation_id']:$item['product_id']; $_pf = new WC_Product_Factory(); $product = $_pf->get_product($id); $request['items'][$key] = array( 'product_id' => $item['product_id'], 'variation_id' => $item['variation_id'], 'quantity' => $item['quantity'], 'origin' => array_key_exists('origin', $package)?$package['origin']:null, 'class' => wc_rlc_get_item_shipping_class($id, $package, $this), // Editing to get proper weight and size from cart variables. //'weight' => $product->get_weight(), 'weight' => $item['data']->get_weight(), 'is_hazmat' => wc_rlc_is_product_hazmat($id), //'height'=> $product->get_height(), (... etc...) 'length' => $item['pricing_item_meta_data']['length'] ? $item['pricing_item_meta_data']['length'] : $product->get_length(), 'width' => $item['pricing_item_meta_data']['width'] ? $item['pricing_item_meta_data']['width'] : $product->get_width(), 'height'=> $item['pricing_item_meta_data']['height'] ? $item['pricing_item_meta_data']['height'] : $product->get_height() // END Editing to get proper weight and size from cart variables. ); } }- This reply was modified 3 years ago by industrialweb.
I have found out from them that there will be an update around Aug 8.
That is fortunate for stability and compatibility… unfortunate for my chance to direct edit.Around 1026 I found and changed two lines (not recommended).
public function add_package_items_to_request($package, &$request) { $contents = $package['contents']; foreach ( $contents as $key => $item ) { $id = intval($item['variation_id'])?$item['variation_id']:$item['product_id']; $_pf = new WC_Product_Factory(); $product = $_pf->get_product($id); $request['items'][$key] = array( 'product_id' => $item['product_id'], 'variation_id' => $item['variation_id'], 'quantity' => $item['quantity'], 'origin' => array_key_exists('origin', $package)?$package['origin']:null, 'class' => wc_rlc_get_item_shipping_class($id, $package, $this), // Myke Editing to get proper weight and size from cart variables. //'weight' => $product->get_weight(), 'weight' =>$item['data']->get_weight(), 'is_hazmat' => wc_rlc_is_product_hazmat($id), //'length' => $product->get_length(), 'length' => $item['pricing_item_meta_data']['length'] ? $item['pricing_item_meta_data']['length'] : $product->get_length(), 'width' => $item['data']->get_width(), 'height'=> $item['data']->get_height() // END Myke Editing to get proper weight and size from cart variables. ); } }If I could re-create these edits as a hook/filter in functions.php I’d probably be set.