• Resolved Leo.Lin

    (@bi1012037)


    I did not intend to forcibly add <br>between buttons. After updating to version 3.26.0 or 3.26.1, your plugin keeps automatically adding <br>. Is there any way to disable this automatic addition of <br> tags?
    Versions 3.26.* and later

    Versions before 3.26.*


    • This topic was modified 3 months ago by Leo.Lin.
    • This topic was modified 3 months ago by Leo.Lin.
Viewing 12 replies - 1 through 12 (of 12 total)
  • shadrix

    (@shadrix)

    Same for me! In checkout it renders like this:

    <p><a  class="checkout-button button alt wc-forward"><br>
    Weiter zur Kasse</a></p>
    Thread Starter Leo.Lin

    (@bi1012037)

    Upgrade to version 3.6.2 not only forces a line break in the shopping cart but also causes line breaks between the li elements and icons in the my-account section. Please conduct thorough testing before releasing updates and avoid forcing changes that break user styles.
    Is there an option in the new version to disable the forced line breaks for these elements?

    3.25.* Normal version

    • This reply was modified 3 months ago by Leo.Lin.
    • This reply was modified 3 months ago by Leo.Lin.
    Thread Starter Leo.Lin

    (@bi1012037)

    Both login and registration are forcibly appended with line break tags.

    Plugin Support Nemanja

    (@nemanjat)

    Hi @bi1012037

    Thank you for contacting Elementor Support. We apologize for any inconvenience caused by the update.

    Have you tried rolling back the version to 3.25 and confirming that the update is causing the problem? Another test I suggest is navigating to Elementor Settings > Features > temporarily deactivate the Element Caching experiment.

    Please let us know if that makes any difference.
    Kind regards!

    Thread Starter Leo.Lin

    (@bi1012037)

    @nemanjat 3.25 is normal. Our website has both a production site and a testing site. We won’t upgrade to the production site until the testing site is stable.

    Plugin Support Milos

    (@miloss84)

    Hi there,

    Thanks for reaching out to us, and I’m sorry to hear about the issues you’re encountering.

    Please note that there are conflicts with some plugins after the update, and these are being investigated to determine if the issue is related to Elementor or if the third-party plugins need to release an update on their end to stay compatible with the latest Elementor update and development deprecations.

    To troubleshoot this, please try the following steps:

    1. Deactivate Third-Party Plugins:
      • Deactivate all third-party plugins except Elementor and Elementor Pro.
      • Update Elementor and Elementor Pro to the latest versions.
    2. Check for Plugin Updates:
      • Some plugins have already issued fixes for compatibility issues. Keep an eye out for plugin updates and update them accordingly.
    3. Reference Guide:

    If the issue persists after following these steps, please let us know so we can further investigate.

    Kind regards

    Thread Starter Leo.Lin

    (@bi1012037)

    @miloss84
    I have confirmed that versions before 3.25.* are fine. After updating to 3.26, you automatically insert <br> tags into certain HTML elements, such as between two buttons, or between <i> and <a>, as well as between <label> and <input>. Would it be possible to remove the automatic addition of <br> tags in future versions? Otherwise, it will disrupt the layout design we have created.

    Two buttons-Layout break(3.26.4)

    Two buttons-Normal(3.25.11)

    <i> and <a>-Layout break(3.26.4)

    <i> and <a>-Normal(3.25.11)

    <label> and <input>-Layout break(3.26.4)

    <label> and <input>-Normal(3.25.11)

    Plugin Support Richard from Elementor

    (@richardk23)

    Hello @bi1012037, Thank you for the update. I checked for any bug reports or cases related to this to no avail. I can also not replicate it on my test site. The issue appears to be more related to WooCommerce, as all the examples are from their classes.

    I have created a test page here for you to check (two buttons, the checkout widget, and a form): https://fvwucgie.elementor.cloud/buttons/.

    Kind regards,

    Thread Starter Leo.Lin

    (@bi1012037)

    @richardk23 The interesting part is that before version 3.25.*, your versions were working fine, so I’m not sure which change caused this incompatibility. It definitely happens with WooCommerce buttons and links. I also tested it just now and found that the text within the links is automatically adding <br>.

    The theme I am using is: Envo eCommerce, version: 1.2.1
    WooCommerce version: 9.5.1
    Cart shortcode provided(woocommerce/templates/cart/cart.php):
    add <button type=”submit” class=”button” name=”clear_cart”>clear_cart</button>

                            <?php do_action( 'woocommerce_cart_contents' ); ?>

    <tr>
    <td colspan="6" class="actions">

    <?php if ( wc_coupons_enabled() ) { ?>
    <div class="coupon">
    <label for="coupon_code" class="screen-reader-text"><?php esc_html_e( 'Coupon:', 'woocommerce' ); ?></label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" /> <button type="submit" class="button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button>
    <?php do_action( 'woocommerce_cart_coupon' ); ?>
    </div>
    <?php } ?>
    <button type="submit" class="button" name="clear_cart">clear_cart</button>
    <button type="submit" class="button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="update_cart" value="<?php esc_attr_e( 'Update cart', 'woocommerce' ); ?>"><?php esc_html_e( 'Update cart', 'woocommerce' ); ?></button>

    <?php do_action( 'woocommerce_cart_actions' ); ?>

    <?php wp_nonce_field( 'woocommerce-cart', 'woocommerce-cart-nonce' ); ?>
    </td>
    </tr>

    <?php do_action( 'woocommerce_after_cart_contents' ); ?>

    Links also break into new lines, screensho-Layout break(3.26.4)t:

    Links also break into new lines, screensho-Normal(3.25.11)

    Additional information: We will also check the PHP encoding (big5, utf-8), whitespace characters, newline characters, etc., as we have already checked other plugins. The issue only occurs after upgrading your plugin to version 3.26.*.

    Thread Starter Leo.Lin

    (@bi1012037)

    @richardk23 I just tested and found that the cause of the issue is that the PHP code triggers a line break, which automatically generates a <br> tag. However, manually deleting all the line breaks would affect the readability of the code. I am still looking into other possible ways to resolve this issue!

    eg.woocommerce/templates/cart/proceed-to-checkout-button.php

    <?php
    //Original code
    /**
    * Proceed to checkout button
    *
    * Contains the markup for the proceed to checkout button on the cart.
    *
    * This template can be overridden by copying it to yourtheme/woocommerce/cart/proceed-to-checkout-button.php.
    *
    * HOWEVER, on occasion WooCommerce will need to update template files and you
    * (the theme developer) will need to copy the new files to your theme to
    * maintain compatibility. We try to do this as little as possible, but it does
    * happen. When this occurs the version of the template file will be bumped and
    * the readme will list any important changes.
    *
    * @see https://woocommerce.com/document/template-structure/
    * @package WooCommerce\Templates
    * @version 7.0.1
    */

    if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
    }
    ?>

    <a href="<?php echo esc_url( wc_get_checkout_url() ); ?>" class="checkout-button button alt wc-forward<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>">
    <?php esc_html_e( 'Proceed to checkout', 'woocommerce' ); ?>
    </a>
    <?php
    //Modified code
    /**
    * Proceed to checkout button
    *
    * Contains the markup for the proceed to checkout button on the cart.
    *
    * This template can be overridden by copying it to yourtheme/woocommerce/cart/proceed-to-checkout-button.php.
    *
    * HOWEVER, on occasion WooCommerce will need to update template files and you
    * (the theme developer) will need to copy the new files to your theme to
    * maintain compatibility. We try to do this as little as possible, but it does
    * happen. When this occurs the version of the template file will be bumped and
    * the readme will list any important changes.
    *
    * @see https://woocommerce.com/document/template-structure/
    * @package WooCommerce\Templates
    * @version 7.0.1
    */

    if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
    }
    ?>

    <a href="<?php echo esc_url( wc_get_checkout_url() ); ?>" class="checkout-button button alt wc-forward<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>"><?php esc_html_e( 'Proceed to checkout', 'woocommerce' ); ?></a>
    • This reply was modified 2 months, 2 weeks ago by Leo.Lin.
    Thread Starter Leo.Lin

    (@bi1012037)

    @richardk23 I am currently keeping the latest version, along with the page where the button is being forcibly appended with <br>, for your investigation. The URL is as follows: https://test3.lugeshop.com/cart/?add-to-cart=693

    Thread Starter Leo.Lin

    (@bi1012037)

    I found the problem! Previously, the content editor supported shortcodes, and older pages were built using the following format (A). Currently, you need to switch to using shortcodes (B) to avoid auto-modified partial code.
    After upgrading to version 3.26.*, all content using shortcodes must be switched to the shortcode format in the content editor to function properly. I have fixed the issue with the line breaks in the <li> elements on the member login page!

    <A>
    <p>[woocommerce_cart]<!-- /wp:shortcode --></p>
    <b>
    [woocommerce_my_account]
Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.