Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elementor patch bug: disappearing media view #141

Open
sangerunified opened this issue Nov 2, 2022 · 0 comments
Open

Elementor patch bug: disappearing media view #141

sangerunified opened this issue Nov 2, 2022 · 0 comments

Comments

@sangerunified
Copy link

Thanks for this patch, however, I am experiencing a bug that is rather annoying.

After 'Global Media' action has been selected and jumping back to either 'Insert Media' or 'Insert from URL' the view draws blank. The fix: select in sequence 'Insert Media' then 'Insert from URL' (or vice versa) then their views will be restored.

Also, when deselecting a global media image, the view draws blank. The fix: select any of the other actions and return to 'Global Media' to restore the view.

I singled it out to the function 'createAttachments()' line 123 in global-media.js, however that's my extent as I'm not sure what happens in the background after that.

Any insights?

I'm on Elementor 3.7.8 & WordPress 6.0

<?php
// Add Global Media Gallery JS to Customize.php
function add_multisite_global_media_to_customizer() {
    wp_register_script(
        'multisite_global_media',
        '/wp-content/plugins/multisite-global-media/assets/js/global-media.js',
        ['jquery'],
        '1.1',
        true
    );
    wp_enqueue_script( 'multisite_global_media' );
}
add_action( 'customize_controls_print_footer_scripts', 'add_multisite_global_media_to_customizer' );
add_action( 'wp_enqueue_media', 'add_multisite_global_media_to_customizer' );

Originally posted by @marktenney in #84 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant