elementor / elementor

The most advanced frontend drag & drop page builder. Create high-end, pixel perfect websites at record speeds. Any theme, any page, any design.
https://elementor.com/
GNU General Public License v3.0
6.53k stars 1.41k forks source link

My account page: Storefront error messages not shown with Elementor Pro #8981

Open milouser opened 5 years ago

milouser commented 5 years ago

Prerequisites

Description

Steps to reproduce

Isolating the problem

Environment

System Info ``` ```
milouser commented 4 years ago

This problem still exists. I've already reported this issue to Elementor support and in your internal system as a possible theme compatibility issue, and was told to post here.

From My-Account Page Login messages like "ERROR: The password field is empty." are not displayed when:

The are displayed when:

All tests were done with the child theme deactivated and the latest version as for 2 weeks ago.

I had a lengthy support chat with Automattic (Storefront) and went through the cases "live" with them. They confirmed the issue, but see the problem on the side of Elementor...

Two screenshots for a better understanding: Elementor Pro & Storefront: Pro activated - Screenshot 2019-08-17 at 10 51 12

Elementor without Pro and Storefront:

Pro deactivated - Screenshot 2019-08-17 at 10 54 18
EricYangTL commented 4 years ago

I'm having the same problem, spent a couple hours on this. Here's how I fixed it:

// In your functions.php
function remove_storefront_notices(){
    remove_action('storefront_content_top', 'storefront_shop_messages', 15 );
}
add_action( 'wp_head', 'remove_storefront_notices' );

The problem is related with elementor pro's theme-support.php#get_header function around line 70, which gets storefront/header.php that contains the storefront_content_top hook. That hook displays and clears WC notices, but because of the way it's set up it's not actually rendered. The above snippet just removes messages from that particular hook, which leaves them free to be displayed later on. I don't believe this will cause any compatibility issues if you're using Elementor Pro's header instead of Storefront. Happy building.

milouser commented 4 years ago

Hi Eric, Thanks for your answer! I cleared the messages in storefront using your snippet, then I added the messages in the Elementor Pro Header using the shortcut [woocommerce_messages].

lewclarke commented 4 years ago

Just wanted to pass on my thanks Eric. I've also had this issue for some time, I was following the original issue that was closed without fix! This worked great for me :)

dimoteca commented 4 years ago

Hello, using this function in functions.php and manully adding to the theme's header the shortcode you mentions seems to work. Thanks

madeleine416 commented 4 years ago

O'm gosh thank you. I reported this to Elementor and they refused to help.

dimoteca commented 4 years ago

Me too, fact is, they said Elementor PRO and Storefront ain't compatible and also for many other reasons. That's why the best solution is either to switch theme or switch builder...

madeleine416 commented 4 years ago

@dimoteca I chose the combination based on their video! https://elementor.com/blog/create-ecommerce-website/ Elementor's lack of support is quite shocking. It was Woo Storefront support who found this post for me.

Bugreal commented 4 years ago

The issue has been reviewed by the support. It is possible to simply add the shortcode [woocommerce_messages] manually and it will solve the issue. The issue happens only when the theme builder is used because it replaces the header of the theme and the code of Storefront is inserted via the header.

madeleine416 commented 4 years ago

Where would that shortcode be entered?

Thank you in advance, Madeleine

On Thu, Dec 5, 2019 at 7:30 AM Bugreal notifications@github.com wrote:

The issue has been reviewed by the support. It is possible to simply add the shortcode [woocommerce_messages] manually and it will solve the issue. The issue happens only when the theme builder is used because it replaces the header of the theme and the code of Storefront is inserted via the header.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/elementor/elementor/issues/8981?email_source=notifications&email_token=ANRSQ74ALFUYMZU2ZT7H743QXDX6NA5CNFSM4ITUUZ4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGARVUQ#issuecomment-562109138, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANRSQ72LIYCFEM4AVVIKI5LQXDX6NANCNFSM4ITUUZ4A .

-- Madeleine Pengelley Birds and Beans Inc

josegallo commented 4 years ago

I put the shortcode on "Elementor Header" with Storefront Theme and Elementor Pro and worked perfectly.

ardianys commented 3 years ago

Thanks, viola, it's work

mena-sim commented 2 months ago

I'm having the same problem, spent a couple hours on this. Here's how I fixed it:

// In your functions.php
function remove_storefront_notices(){
  remove_action('storefront_content_top', 'storefront_shop_messages', 15 );
}
add_action( 'wp_head', 'remove_storefront_notices' );

The problem is related with elementor pro's theme-support.php#get_header function around line 70, which gets storefront/header.php that contains the storefront_content_top hook. That hook displays and clears WC notices, but because of the way it's set up it's not actually rendered. The above snippet just removes messages from that particular hook, which leaves them free to be displayed later on. I don't believe this will cause any compatibility issues if you're using Elementor Pro's header instead of Storefront. Happy building.

You Saved my life. Thank you sir.