get_object_term_cache duplicate terms after update to wordpress 6

After WordPress update to 6 versions receives an issue. receive duplicated terms on function echo wp_kses_post(get_the_term_list($product->get_id(), 'product_cat', '', ', ', '')); and echo wp_kses_post( get_the_term_list( $product->get_id(), 'pa_material', '<li class="material">', ', ', '</li>' )) ? : ''; All work correctly before the update. I found that get_object_term_cache( $post->ID, $taxonomy ); give me duplicated terms What can cause this issue? Plugin or function change? (unable to find detail WP 6 changelog)
Category: Web

The Commercial tab is missing from the Plugins page when trying to update Types 1.7

I have Types installed and registered on my live server, but also want to get it installed on my development server (which of course has a different URL so will have to be registered separately). However, the Commercial tab is entirely missing from my Plugins page on the development server - I also can't get to it manually by going to http://localhost/wordpress/wp-admin/plugin-install.php?tab=commercial, which should otherwise work. Below are screenshots from my development and live servers respectively. Without this, I can't …
Category: Web

Custom Menu Broken WP 3.8.1 Update

Custom menu has stopped working since upgrading to 3.8.1. When trying to add items from the left they do not show up as movable items as they should do under Menu 1, however the text changes to: "Drag each item into the order you prefer. Click the arrow on the right of the item to reveal additional configuration options.". Clicking Save then takes me back to Screenshot 1 i.e. nothing is saved (See Screenshots 1 & 2) Things tried: Disabled …
Category: Web

How to Fix WordPress Not Saving Settings?

How Can I Manually Fix & What is The Root Cause? The Site Language setting in Settings > General for my site, will not update. It is stuck on English (United States). I have done all the usually debugging procedures, such as disabling all my plugins etc, reinstalling WordPress etc. But the issue remains. Q: What is the best way to manually fix this, and what is the root cause of the issue likely to be?
Category: Web

Featured Images most often doesnt appear

I recently facing a problem that never occure before. When i open "add new post" page most of the time "Featured Image" option doesnt appear.However if i keep refreshing the webpage, sometimes "Featured Image" appear. And also i would like to inform that if i open it on mozilla, the chance of Featured Image appeared is more often. If i open on chrome / google edge, the featured image is rarely appeared.
Category: Web

Sending multipart (text/html) emails via wp_mail() will likely get your domain banned

Summary Because of a bug in WP Core, sending multipart emails (html/text) with wp_mail() (to reduce chance of emails ending up in spam folders) will ironically result with your domain being blocked by Hotmail (and other Microsoft emails). This is a complex problem that I'll aim to break down in great detail in an attempt to help someone find a workable solution which may eventually be implemented in core. It's going to be a rewarding read. Let's begin... The bug …
Category: Web

WooCommerce variable product can not add to cart using ajax after updating latest version of WooCommerce

if ($passed_validation && WC()->cart->add_to_cart($product_id, $quantity, $variation_id) && 'publish' === $product_status) { In this condition WC()->cart->add_to_cart($product_id, $quantity, $variation_id) getting false while add to cart. function woocommerce_ajax_add_to_cart() { $product_id = apply_filters('woocommerce_add_to_cart_product_id', absint($_POST['product_id'])); $quantity = empty($_POST['quantity']) ? 1 : wc_stock_amount($_POST['quantity']); $variation_id = absint($_POST['variation_id']); $passed_validation = apply_filters('woocommerce_add_to_cart_validation', true, $product_id, $quantity); $product_status = get_post_status($product_id); if ($passed_validation && WC()->cart->add_to_cart($product_id, $quantity, $variation_id) && 'publish' === $product_status) { do_action('woocommerce_ajax_added_to_cart', $product_id); if ('yes' === get_option('woocommerce_cart_redirect_after_add')) { wc_add_to_cart_message(array($product_id => $quantity), true); } WC_AJAX:: get_refreshed_fragments(); } else { $data = array( …
Category: Web

Received Updateing failed. not a valid JSON response. linked with _locale=user

I’ve been struggling for few days to resolve the issue with “Updating failed. Non-valid JSON response message at the top of my page. The issue comes with the image block and the icon box block from Gutenberg. When I remove the blocks the issue is resolved. I’ve tried everything I found on the net: deactivating all the plugins, saving permalinks structure, modifying htaccess, whitelisting IPs and json paths…nothing seems to work. And what is worse, I do think that the …
Category: Web

Default image size not working

I have some hooks on my WordPress Theme in order to customize the default images sizes, but it does not work. Here is the code: function my_custom_image_size() { add_image_size( 'post_size', 730); } add_action( 'after_setup_theme', 'my_custom_image_size' ); // Cambia el nombre del tamano de imagen function my_custom_image_size_name( $sizes ) { return array_merge( $sizes, array( 'post_size' => __( 'Tamaño Post' ), ) ); } add_filter( 'image_size_names_choose', 'my_custom_image_size_name' ); function my_default_image_size() { update_option('image_default_size', 'post_size'); update_option('image_default_align', 'right'); } add_action('after_setup_theme', 'my_default_image_size'); function my_remove_default_images( $sizes ) …
Category: Web

WP Dashboard -> Posts-> Filter > BUG!

I've a problem in the Posts List in the Dashboard. When I filter (by POST) the Posts the results aren't the same than to pass the category slug by GET. Here the examples: by GET: by POST: Can you help me? Where is the error? In the DB (MySql)? In the core code? In the sever setting? In the WP config setting? I'm going crazy! Thank you!!!!!
Category: Web

Fixed: Console.log twice in the edit function

Hi Guys I am using $ npx @wordpress/create-block todo-list package and I found something interesting. I have not changed everything in the file structure but my console.log or any variable get outputted twice. How to reproduce this problem? Installing the @wordpress/create-block package Opening edit.js and adding console.log("test") above the render My index and edit.js files /** * Registers a new block provided a unique name and an object defining its behavior. * * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ */ import { registerBlockType } …
Category: Web

No longer able to attach S3 bucket files to emails being sent by WordPress due to PHPMailer security update

I've been trying to track down why my s3 bucket files are no longer being attached to automated emails being sent out by WordPress (using the Gravity Forms Entry Automation plugin). I've been able to identify the latest version of PHPMailer being the reason why the attachments no longer get added. From the PHPMailer ticket response: This is due to a bug fix that also closed a major security hole. PHPMailer deliberately avoids being a client for HTTP or other …
Category: Web

Fixing WordPress's Bug (failed to send buffer of zlib output compression) results in "White Screen of Death"

Problem: A user using my plugin experienced the infamous 'White Screen of Death' (WSD) on their homepage, all other pages worked correctly. Cause: My plugin implements a fix to the infamous WordPress error ob_end_flush(): failed to send buffer of zlib output compression (1) in ...\wp-includes\functions.php on line 4556, see here for more details and here for the solution I use. This code caused the users WSD. When I removed it, the problem stopped. My Question: Why did the WSD occur …
Category: Web

Why is wordpress removing some unicode characters (e.g. some emojis) when I save my post?

Try making a new post, pasting this string of emojis: "" and then saving that post as a draft. When I do this (in WP version 4.7.4), it removes the emojis. First I create the post: After clicking "Save Draft": The culprit here seems to be the crab emoji: If you take it out the the emoji string everything works fine. I'm guessing this is a bug where wordpress isn't handling new emojis properly? Can anyone help me disable the …
Category: Web

Can I alter the block editor's paste text behavior?

In the sample editor, create a paragraph with just Hello world, copy it and--while still selected--paste over it. You get the expected pasted text. But if there's a leading word with a colon (Hello: world) then pasting puts the entire text into 1 link. I don't think I've seen this auto-linking in any other WYSIWYG editor, but I don't know that it's a bug. Is this a feature that can be disabled?
Category: Web

WP_editor problem

A few days ago I asked this question. Today I started building a new website in which I copied the code of my plugin used at the website from my previous question. And I was surprised when I saw that the exact same code that was bugging at my previous website is working perfectly fine in the new website I'm building. For the people who did not read my previous topic: At my another website WP_editor is opening in the …
Category: Web

A bug happens in the Footer and the code keeps appearing

On this WordPress site with the Newspaper theme, the footer appears and looks normal (as you can see in https://www.vendaonline.pt/), but I installed a question plugin (DW Question Answer) and on the pages corresponding to the content of each subject, keep the footer with bug (https://www.vendaonline.pt/foruns/teste1/). The problem happens only on pages dedicated to the individual subject only. Can anyone help me solve the problem?
Category: Web

Undeletable posts, users or other content

Recently I tried to move a WordPress instance to a production server and (besides other issues) had to deal with a page that could not be deleted via the admin panel. The success message would show up but the entry remains in the list and doesn't get removed. Also the content association with this page was somehow broken. It would always show an empty box when editing but the content that should have been there was showing up on the …
Category: Web

How can you receive the most recent permalink or terms of the newly saved post?

When using the Gutenberg Block Editor the normal hooks for saving a post don't have the same behavior as with the classic editor. pre_post_update save_post wp_insert_post For example, if you hook into the save_post-hook the $permalink and the $categories will not return the new value, but instead the old value. Which is not the behavior that I expected from the classic editor. add_action( 'save_post', 'custom_save_post', 10, 3 ); function custom_save_post( $post_id, $post, $update ) { $permalink = get_permalink( $post_id ); …
Category: Web

Media Dialog CSS broken in WP v.5.3.2

My plugin displays the media picker dialog on the users front end. If a user has WordPress 5.2.2 installed then the media picker dialog looks nice/normal (see the first image). If they have WordPress 5.3.2 installed then the dialog seems to be affected by the front-end (theme?) styling. Does anyone know how I can overcome this? Is this a known problem that WordPress knows about and is fixing? Edit Actually, it seems to be looking normal on my v5.2.2 website …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.