• Resolved Pandananana

    (@andreaswendelboe)


    The review submission form does not display any stars when I inserted it into an Elementor Popup. However, when it is just inserted normally on a page, it shows up (Although the stars still aren’t visible in the Elementor Editor)

    If I inspect the page using Chrome Developer tools I see that the popup-form is missing a <span class=”gl-star-rating-stars”> that is on the normal page-form.

    This issue has been irritating me the whole day, I hope somebody knows how to fix it.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    Site Reviews initialises the star rating control when the page is loaded.

    Elementor initialises the popup when the popup is triggered. Because this happens manually after the page is loaded, the star rating control is never able to be initialised.

    For a solution, please see: https://www.ads-software.com/support/topic/stars-do-not-appear-on-the-form/#post-12008630

    Plugin Author Gemini Labs

    (@geminilabs)

    FYI: A compatibility fix has been added to the upcoming v5.0 that will add this javascript snippet to the page automatically if Elementor is active.

    Thread Starter Pandananana

    (@andreaswendelboe)

    Thanks for the quick answer. I tried your first solution but it didn’t seem to work.

    When is the v5.0 update coming?

    Plugin Author Gemini Labs

    (@geminilabs)

    1. Please use the “Contact Support” section on the Help page to send me your System Info report.

    2. Make sure to include in the email an URL to the page where you are using the popup.

    3. Since you are using the Site Reviews widgets in your Elementor Editor, please also take a screenshot of the widget settings. By the way, I recommend you use the shortcodes in the editor instead of the widgets as the widgets are not full-featured like the shortcodes (i.e. no pagination option). See the Help > Shortcodes page to see the available shortcode options.

    Thread Starter Pandananana

    (@andreaswendelboe)

    Alright, thanks. I just sent the email

    Plugin Author Gemini Labs

    (@geminilabs)

    It looks like a recent Elementor update broke the vanilla javascript custom event that is triggered when a popup is shown (https://github.com/elementor/elementor/issues/10690).

    The solution is to use jQuery to detect the event instead:

    jQuery(document).on('elementor/popup/show', function () {
        if (typeof StarRating === 'undefined') return;
        new StarRating('select.glsr-star-rating', {
            clearable: false,
            showText: false,
        });
    });
    • This reply was modified 4 years, 10 months ago by Gemini Labs.
    Thread Starter Pandananana

    (@andreaswendelboe)

    Ahh okay. How should I implement the solution?

    Should I Insert an html widget in Elementor and paste the code surrounded with <script>?

    Plugin Author Gemini Labs

    (@geminilabs)

    You could also do it like this:

    /*
     * Fix Star Rating control when submission form is used inside an Elementor Popup
     * @return void
     * @see https://www.ads-software.com/plugins/elementor/
     */
    add_action('wp_enqueue_scripts', function () {
        if (defined('ELEMENTOR_VERSION')) {
            wp_add_inline_script('site-reviews',
                'jQuery(document).on("elementor/popup/show",function(){"undefined"!==typeof StarRating&&new StarRating("select.glsr-star-rating",{clearable:0,showText:0})})'
            );
        }
    }, 1000);

    This snippet is very close to what will be included with Site Reviews v5.0.

    • This reply was modified 4 years, 10 months ago by Gemini Labs.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘No Stars Shown When In Popup’ is closed to new replies.